Re: [PATCH] driver core: Add kernel-doc for DEV_FLAG_COUNT enum value
From: Randy Dunlap
Date: Mon Apr 13 2026 - 23:43:09 EST
On 4/13/26 7:59 PM, Douglas Anderson wrote:
> Even though nobody should use this value (except when declaring the
> "flags" bitmap), kernel-doc still gets upset that it's not documented.
> It reports:
>
> WARNING: ../include/linux/device.h:519
> Enum value 'DEV_FLAG_COUNT' not described in enum 'struct_device_flags'
>
> Add the description of DEV_FLAG_COUNT.
>
> Fixes: a2225b6e834a ("driver core: Don't let a device probe until it's ready")
> Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/f318cd43-81fd-48b9-abf7-92af85f12f91@xxxxxxxxxxxxx
> Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Reviewed-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Thanks.
> ---
>
> include/linux/device.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 1c27505476bb..9c8fde6a3d86 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -512,6 +512,7 @@ struct device_physical_location {
> *
> * @DEV_FLAG_READY_TO_PROBE: If set then device_add() has finished enough
> * initialization that probe could be called.
> + * @DEV_FLAG_COUNT: Number of defined struct_device_flags.
> */
> enum struct_device_flags {
> DEV_FLAG_READY_TO_PROBE = 0,
--
~Randy