Skip to contentSkip to conversation

kernel-doc no longer warns about leftover argument doc?

DISCUSSION Jakub Kicinski 3 participants 3 messages May 15 Documentation

lore
Share & tools
lore
#0 lore raw

Hi!

Looks like the new python kernel-doc does not warn when there are stray arguments in function kdoc. Eg

/**
* ksz_wol_pre_shutdown - Prepares the switch device for shutdown while
* considering Wake-on-LAN (WoL) settings.
* @dev: The switch device structure.
* @wol_enabled: Pointer to a boolean which will be set to true if WoL is
* enabled on any port.
*
* This function prepares the switch device for a safe shutdown while taking
* into account the Wake-on-LAN (WoL) settings on the user ports. It updates
* the wol_enabled flag accordingly to reflect whether WoL is active on any
* port.
*/
static void ksz_wol_pre_shutdown(struct ksz_device *dev)

AIs seem to catch it but that's not ideal..

reviewer
#1 lore raw
Quoted 20 lines · Jakub Kicinski

Hi!

Looks like the new python kernel-doc does not warn when there are stray arguments in function kdoc. Eg

/**
* ksz_wol_pre_shutdown - Prepares the switch device for shutdown while
* considering Wake-on-LAN (WoL) settings.
* @dev: The switch device structure.
* @wol_enabled: Pointer to a boolean which will be set to true if WoL is
* enabled on any port.
*
* This function prepares the switch device for a safe shutdown while taking
* into account the Wake-on-LAN (WoL) settings on the user ports. It updates
* the wol_enabled flag accordingly to reflect whether WoL is active on any
* port.
*/
static void ksz_wol_pre_shutdown(struct ksz_device *dev)

Quoted 2 lines

AIs seem to catch it but that's not ideal..

Yes, hopefully we can have this patch merged soon:
https://lore.kernel.org/all/[email protected]/

giving:
Warning: init/test001.c:13 Excess function parameter 'wol_enabled' description in 'ksz_wol_pre_shutdown'

Signature · 1 line
~Randy
maintainer
#2 lore raw
Quoted 21 lines · Randy Dunlap
Quoted 20 lines · Jakub Kicinski

Hi!

Looks like the new python kernel-doc does not warn when there are stray arguments in function kdoc. Eg

/**
* ksz_wol_pre_shutdown - Prepares the switch device for shutdown while
* considering Wake-on-LAN (WoL) settings.
* @dev: The switch device structure.
* @wol_enabled: Pointer to a boolean which will be set to true if WoL is
* enabled on any port.
*
* This function prepares the switch device for a safe shutdown while taking
* into account the Wake-on-LAN (WoL) settings on the user ports. It updates
* the wol_enabled flag accordingly to reflect whether WoL is active on any
* port.
*/
static void ksz_wol_pre_shutdown(struct ksz_device *dev)

Quoted 5 lines
Quoted 2 lines

AIs seem to catch it but that's not ideal..

Yes, hopefully we can have this patch merged soon:
https://lore.kernel.org/all/[email protected]/

The odds of such things increase significantly when the patch is actually sent to the maintainer; in the midst of travel such I missed this one. Looking at it now.

jon