kernel-doc: parse DECLARE_KFIFO and DECLARE_KFIFO_PTR()
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Dec 2017 14:05:12 +0000 (09:05 -0500)
committerJonathan Corbet <corbet@lwn.net>
Mon, 11 Dec 2017 21:20:13 +0000 (14:20 -0700)
commit45005b27c191826dd88622c1e35a9448d861af3b
tree7e631eb1402dac29f7fda1d8226a059ba7e92622
parentc1de03a4cee1e71b3ad7680b9faef87fb09b91d4
kernel-doc: parse DECLARE_KFIFO and DECLARE_KFIFO_PTR()

On media, we now have an struct declared with:

struct lirc_fh {
        struct list_head list;
        struct rc_dev *rc;
        int                             carrier_low;
        bool                            send_timeout_reports;
        DECLARE_KFIFO_PTR(rawir, unsigned int);
        DECLARE_KFIFO_PTR(scancodes, struct lirc_scancode);
        wait_queue_head_t               wait_poll;
        u8                              send_mode;
        u8                              rec_mode;
};

gpiolib.c has a similar declaration with DECLARE_KFIFO().

Currently, those produce the following error:

./include/media/rc-core.h:96: warning: No description found for parameter 'int'
./include/media/rc-core.h:96: warning: No description found for parameter 'lirc_scancode'
./include/media/rc-core.h:96: warning: Excess struct member 'rawir' description in 'lirc_fh'
./include/media/rc-core.h:96: warning: Excess struct member 'scancodes' description in 'lirc_fh'
../drivers/gpio/gpiolib.c:601: warning: No description found for parameter '16'
../drivers/gpio/gpiolib.c:601: warning: Excess struct member 'events' description in 'lineevent_state'

So, teach kernel-doc how to parse DECLARE_KFIFO() and DECLARE_KFIFO_PTR().

While here, relax at the past DECLARE_foo() macros, accepting a random
number of spaces after comma.

The addition of DECLARE_KFIFO() was
Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/kernel-doc