Re: [PATCH 16/18] mtd: rawnand.h: use nested union kernel-doc markups
From: Boris Brezillon <hidden>
Date: 2018-05-09 12:02:41
Also in:
lkml
On Mon, 7 May 2018 08:32:32 -0300 Mauro Carvalho Chehab [off-list ref] wrote:
Hi Boris, Em Mon, 7 May 2018 11:46:50 +0200 Boris Brezillon [off-list ref] escreveu:quoted
Hi Mauro,quoted
quoted
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 5dad59b31244..b986f94906df 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h@@ -740,8 +740,9 @@ enum nand_data_interface_type { /** * struct nand_data_interface - NAND interface timing - * @type: type of the timing - * @timings: The timing, type according to @type + * @type: type of the timing + * @timings: The timing, type according to @type + * @timings.sdr: Use it when @type is %NAND_SDR_IFACE.Hm, really feels weird to do that. I mean, either we describe timings.sdr or timings, but not both. I this case, I agree that describing timings.sdr would make more sense than generically describing any possible entries in the timings union.This struct is funny, as the union has just one item. I assume that the original intend is to be ready to have more timing types (or you had it in the past). By the time you have a second value there, describing the union would make more sense.quoted
Is there a simple way we can get rid of the warning we have when not describing timings but all of its fields?There's no direct way. It won't be hard to add a way to do it, like applying the enclosed patch with ends by declaring timings as: * @timings: -- undescribed -- IMHO, this is uglier.
Yep, don't like it either. I'll just take your initial patch. Thanks, Boris -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html