[PATCH] powercap: correct kernel-doc function parameter names

Randy Dunlap posted 1 patch 3 weeks, 5 days ago
include/linux/powercap.h |    4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] powercap: correct kernel-doc function parameter names
Posted by Randy Dunlap 3 weeks, 5 days ago
Use the correct function parameter names in kernel-doc comments to
avoid these warnings:

Warning: include/linux/powercap.h:254 function parameter 'name' not
 described in 'powercap_register_control_type'
Warning: include/linux/powercap.h:298 function parameter 'nr_constraints'
 not described in 'powercap_register_zone'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-pm@vger.kernel.org

 include/linux/powercap.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-next-20260311.orig/include/linux/powercap.h
+++ linux-next-20260311/include/linux/powercap.h
@@ -238,7 +238,7 @@ static inline void *powercap_get_zone_da
 *			Advantage of this parameter is that client can embed
 *			this data in its data structures and allocate in a
 *			single call, preventing multiple allocations.
-* @control_type_name:	The Name of this control_type, which will be shown
+* @name:		The Name of this control_type, which will be shown
 *			in the sysfs Interface.
 * @ops:			Callbacks for control type. This parameter is optional.
 *
@@ -277,7 +277,7 @@ int powercap_unregister_control_type(str
 * @name:	A name for this zone.
 * @parent:	A pointer to the parent power zone instance if any or NULL
 * @ops:		Pointer to zone operation callback structure.
-* @no_constraints: Number of constraints for this zone
+* @nr_constraints: Number of constraints for this zone
 * @const_ops:	Pointer to constraint callback structure
 *
 * Register a power zone under a given control type. A power zone must register
Re: [PATCH] powercap: correct kernel-doc function parameter names
Posted by Rafael J. Wysocki 3 weeks, 3 days ago
On Thu, Mar 12, 2026 at 6:14 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Use the correct function parameter names in kernel-doc comments to
> avoid these warnings:
>
> Warning: include/linux/powercap.h:254 function parameter 'name' not
>  described in 'powercap_register_control_type'
> Warning: include/linux/powercap.h:298 function parameter 'nr_constraints'
>  not described in 'powercap_register_zone'
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org
>
>  include/linux/powercap.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-next-20260311.orig/include/linux/powercap.h
> +++ linux-next-20260311/include/linux/powercap.h
> @@ -238,7 +238,7 @@ static inline void *powercap_get_zone_da
>  *                      Advantage of this parameter is that client can embed
>  *                      this data in its data structures and allocate in a
>  *                      single call, preventing multiple allocations.
> -* @control_type_name:  The Name of this control_type, which will be shown
> +* @name:               The Name of this control_type, which will be shown
>  *                      in the sysfs Interface.
>  * @ops:                        Callbacks for control type. This parameter is optional.
>  *
> @@ -277,7 +277,7 @@ int powercap_unregister_control_type(str
>  * @name:       A name for this zone.
>  * @parent:     A pointer to the parent power zone instance if any or NULL
>  * @ops:                Pointer to zone operation callback structure.
> -* @no_constraints: Number of constraints for this zone
> +* @nr_constraints: Number of constraints for this zone
>  * @const_ops:  Pointer to constraint callback structure
>  *
>  * Register a power zone under a given control type. A power zone must register

Applied as 7.1 material, thanks!