Skip to contentSkip to conversation

drivers/base: remove kernel-doc warnings

PATCH In review Pierre-Louis Bossart 4 participants 13 messages Mar 31, 2021 – Apr 7, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover drivers/base: remove kernel-doc warnings

Trivial fixes to reduce the number of warnings with make W=1

After this patchset, there are still a number of false positives reported, I left them as is.

drivers/base/power/runtime.c:347: warning: Excess function parameter 'dev' description in '__rpm_callback'

drivers/base/platform.c:1545:20: warning: no previous prototype for ‘early_platform_cleanup’ [-Wmissing-prototypes]
1545 | void __weak __init early_platform_cleanup(void) { }

      |                    ^~~~~~~~~~~~~~~~~~~~~~

drivers/base/attribute_container.c:304: warning: Function parameter or member 'fn' not described in 'attribute_container_device_trigger_safe'

drivers/base/attribute_container.c:304: warning: Function parameter or member 'undo' not described in 'attribute_container_device_trigger_safe'

drivers/base/attribute_container.c:357: warning: Function parameter or member 'fn' not described in 'attribute_container_device_trigger'

drivers/base/module.c: In function ‘module_add_driver’:
drivers/base/module.c:36:6: warning: variable ‘no_warn’ set but not used [-Wunused-but-set-variable]

   36 |  int no_warn;
      |      ^~~~~~~

Pierre-Louis Bossart (7):
driver core: remove kernel-doc warnings
driver core: attribute_container: remove kernel-doc warnings
PM: runtime: remove kernel-doc warnings
PM: wakeup: fix kernel-doc warnings and fix typos
PM: clk: remove kernel-doc warning
platform-msi: fix kernel-doc warnings
devcoredump: fix kernel-doc warning

 drivers/base/attribute_container.c |  4 ++++
 drivers/base/core.c                | 11 ++++++-----
 drivers/base/devcoredump.c         |  4 ++--
 drivers/base/platform-msi.c        |  3 ++-
 drivers/base/power/clock_ops.c     |  2 +-
 drivers/base/power/runtime.c       |  2 +-
 drivers/base/power/wakeup.c        | 17 +++++++++--------
 7 files changed, 25 insertions(+), 18 deletions(-)

base-commit: 7a43c78d0573e0bbbb0456b033e2b9a895b89464

Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/7 driver core: remove kernel-doc warnings

remove make W=1 warning:

drivers/base/core.c:1670: warning: Function parameter or member 'flags' not described in 'fw_devlink_create_devlink'

drivers/base/core.c:1670: warning: Function parameter or member 'con' not described in 'fw_devlink_create_devlink'

drivers/base/core.c:1670: warning: Function parameter or member 'sup_handle' not described in 'fw_devlink_create_devlink'

drivers/base/core.c:1670: warning: Function parameter or member 'flags' not described in 'fw_devlink_create_devlink'

drivers/base/core.c:1763: warning: Function parameter or member 'dev' not described in '__fw_devlink_link_to_consumers'

drivers/base/core.c:1844: warning: Function parameter or member 'dev' not described in '__fw_devlink_link_to_suppliers'

drivers/base/core.c:1844: warning: Function parameter or member 'fwnode' not described in '__fw_devlink_link_to_suppliers'

---
 drivers/base/core.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/base/core.c +6 -5
index de518178ac36..ad0d26f04215 100644
@@ -1647,8 +1647,9 @@ static int fw_devlink_relax_cycle(struct device *con, void *sup)
 
 /**
  * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
- * @con - Consumer device for the device link
- * @sup_handle - fwnode handle of supplier
+ * @con: consumer device for the device link
+ * @sup_handle: fwnode handle of supplier
+ * @flags: devlink flags
  *
  * This function will try to create a device link between the consumer device
  * @con and the supplier device represented by @sup_handle.
@@ -1744,7 +1745,7 @@ static int fw_devlink_create_devlink(struct device *con,
 
 /**
  * __fw_devlink_link_to_consumers - Create device links to consumers of a device
- * @dev - Device that needs to be linked to its consumers
+ * @dev: Device that needs to be linked to its consumers
  *
  * This function looks at all the consumer fwnodes of @dev and creates device
  * links between the consumer device and @dev (supplier).
@@ -1814,8 +1815,8 @@ static void __fw_devlink_link_to_consumers(struct device *dev)
 
 /**
  * __fw_devlink_link_to_suppliers - Create device links to suppliers of a device
- * @dev - The consumer device that needs to be linked to its suppliers
- * @fwnode - Root of the fwnode tree that is used to create device links
+ * @dev: The consumer device that needs to be linked to its suppliers
+ * @fwnode: Root of the fwnode tree that is used to create device links
  *
  * This function looks at all the supplier fwnodes of fwnode tree rooted at
  * @fwnode and creates device links between @dev (consumer) and all the
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/7 driver core: attribute_container: remove kernel-doc warnings

In reply to Pierre-Louis Bossart

Remove make W=1 warnings

drivers/base/attribute_container.c:471: warning: Function parameter or member 'cont' not described in 'attribute_container_add_class_device_adapter'

drivers/base/attribute_container.c:471: warning: Function parameter or member 'dev' not described in 'attribute_container_add_class_device_adapter'

drivers/base/attribute_container.c:471: warning: Function parameter or member 'classdev' not described in 'attribute_container_add_class_device_adapter'

---
 drivers/base/attribute_container.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/base/attribute_container.c +4 -0
index f7bd0f4db13d..9c00d203d61e 100644
@@ -461,6 +461,10 @@ attribute_container_add_class_device(struct device *classdev)
 /**
  * attribute_container_add_class_device_adapter - simple adapter for triggers
  *
+ * @cont: the container to register.
+ * @dev:  the generic device to activate the trigger for
+ * @classdev:	the class device to add
+ *
  * This function is identical to attribute_container_add_class_device except
  * that it is designed to be called from the triggers
  */
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/7 PM: runtime: remove kernel-doc warnings

In reply to Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn'

drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn'

---
 drivers/base/power/runtime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/runtime.c +1 -1
index fe1dad68aee4..1fc1a992f90c 100644
@@ -951,7 +951,7 @@ static void pm_runtime_work(struct work_struct *work)
 
 /**
  * pm_suspend_timer_fn - Timer function for pm_schedule_suspend().
- * @data: Device pointer passed by pm_schedule_suspend().
+ * @timer: hrtimer used by pm_schedule_suspend().
  *
  * Check if the time is right and queue a suspend request.
  */
Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH 3/7] PM: runtime: remove kernel-doc warnings

Quoted 19 lines · Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn'

drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn'

---
 drivers/base/power/runtime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/runtime.c +0 -0
index fe1dad68aee4..1fc1a992f90c 100644

drivers/base/power/runtime.c static void pm_runtime_work(struct work_struct *work)

Quoted 9 lines
drivers/base/power/runtime.c +1 -2
@@ -951,7 +951,7 @@ static void pm_runtime_work(struct work_struct *work)
 
 /**
  * pm_suspend_timer_fn - Timer function for pm_schedule_suspend().
- * @data: Device pointer passed by pm_schedule_suspend().
+ * @timer: hrtimer used by pm_schedule_suspend().
  *
  * Check if the time is right and queue a suspend request.
  */
--

I can apply this along with the [4-5/7]. Do you want me to do that?

#5 lore raw

Re: [PATCH 3/7] PM: runtime: remove kernel-doc warnings

Quoted 22 lines · Rafael J. Wysocki
Quoted 20 lines · Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn'

drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn'

---
  drivers/base/power/runtime.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/runtime.c +0 -0
index fe1dad68aee4..1fc1a992f90c 100644
@@ -951,7 +951,7 @@ static void pm_runtime_work(struct work_struct *work)
 
Quoted 10 lines

drivers/base/power/runtime.c static void pm_runtime_work(struct work_struct *work)

Quoted 8 lines
drivers/base/power/runtime.c +1 -2
  /**
   * pm_suspend_timer_fn - Timer function for pm_schedule_suspend().
- * @data: Device pointer passed by pm_schedule_suspend().
+ * @timer: hrtimer used by pm_schedule_suspend().
   *
   * Check if the time is right and queue a suspend request.
   */
--

I can apply this along with the [4-5/7]. Do you want me to do that?

Works for me. I wasn't sure by looking at the MAINTAINERS file which files in drivers/base/ are maintained by whom, so sent the patches as a single set.

#6 lore raw

Re: [PATCH 3/7] PM: runtime: remove kernel-doc warnings

Quoted 36 lines · Pierre-Louis Bossart
Quoted 22 lines · Rafael J. Wysocki
Quoted 20 lines · Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn'

drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn'

---
  drivers/base/power/runtime.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/runtime.c +0 -0
index fe1dad68aee4..1fc1a992f90c 100644
@@ -951,7 +951,7 @@ static void pm_runtime_work(struct work_struct *work)
 
Quoted 10 lines

drivers/base/power/runtime.c static void pm_runtime_work(struct work_struct *work)

Quoted 8 lines
drivers/base/power/runtime.c +1 -2
  /**
   * pm_suspend_timer_fn - Timer function for pm_schedule_suspend().
- * @data: Device pointer passed by pm_schedule_suspend().
+ * @timer: hrtimer used by pm_schedule_suspend().
   *
   * Check if the time is right and queue a suspend request.
   */
--

I can apply this along with the [4-5/7]. Do you want me to do that?

Quoted 3 lines

Works for me. I wasn't sure by looking at the MAINTAINERS file which files in drivers/base/ are maintained by whom, so sent the patches as a single set.

That's fine, we can work it out :)

#7 lore raw

Re: [PATCH 3/7] PM: runtime: remove kernel-doc warnings

In reply to Pierre-Louis Bossart
Quoted 37 lines · Pierre-Louis Bossart
Quoted 22 lines · Rafael J. Wysocki
Quoted 20 lines · Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn'

drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn'

---
  drivers/base/power/runtime.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/runtime.c +0 -0
index fe1dad68aee4..1fc1a992f90c 100644
@@ -951,7 +951,7 @@ static void pm_runtime_work(struct work_struct *work)
 
Quoted 10 lines

drivers/base/power/runtime.c static void pm_runtime_work(struct work_struct *work)

Quoted 8 lines
drivers/base/power/runtime.c +1 -2
  /**
   * pm_suspend_timer_fn - Timer function for pm_schedule_suspend().
- * @data: Device pointer passed by pm_schedule_suspend().
+ * @timer: hrtimer used by pm_schedule_suspend().
   *
   * Check if the time is right and queue a suspend request.
   */
--

I can apply this along with the [4-5/7]. Do you want me to do that?

Quoted 3 lines

Works for me. I wasn't sure by looking at the MAINTAINERS file which files in drivers/base/ are maintained by whom, so sent the patches as a single set.

All three applied now as 5.13 material, thanks!

#8 lore raw

PATCH 4/7 PM: wakeup: fix kernel-doc warnings and fix typos

In reply to Pierre-Louis Bossart

Remove make W=1 warnings and fit 'Itereates' typos

drivers/base/power/wakeup.c:403: warning: wrong kernel-doc identifier on line:
* device_wakeup_arm_wake_irqs(void)

drivers/base/power/wakeup.c:419: warning: wrong kernel-doc identifier on line:
* device_wakeup_disarm_wake_irqs(void)

drivers/base/power/wakeup.c:537: warning: Function parameter or member 'enable' not described in 'device_set_wakeup_enable'

drivers/base/power/wakeup.c:592: warning: expecting prototype for wakup_source_activate(). Prototype was for wakeup_source_activate() instead

drivers/base/power/wakeup.c:697: warning: expecting prototype for wakup_source_deactivate(). Prototype was for wakeup_source_deactivate() instead

drivers/base/power/wakeup.c:795: warning: Function parameter or member 't' not described in 'pm_wakeup_timer_fn'

drivers/base/power/wakeup.c:795: warning: Excess function parameter 'data' description in 'pm_wakeup_timer_fn'

drivers/base/power/wakeup.c:1027: warning: Function parameter or member 'set' not described in 'pm_wakep_autosleep_enabled'

drivers/base/power/wakeup.c:1027: warning: Excess function parameter 'enabled' description in 'pm_wakep_autosleep_enabled'

---
 drivers/base/power/wakeup.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/base/power/wakeup.c +9 -8
index 92073ac68473..f0b37c188514 100644
@@ -400,9 +400,9 @@ void device_wakeup_detach_irq(struct device *dev)
 }
 
 /**
- * device_wakeup_arm_wake_irqs(void)
+ * device_wakeup_arm_wake_irqs -
  *
- * Itereates over the list of device wakeirqs to arm them.
+ * Iterates over the list of device wakeirqs to arm them.
  */
 void device_wakeup_arm_wake_irqs(void)
 {
@@ -416,9 +416,9 @@ void device_wakeup_arm_wake_irqs(void)
 }
 
 /**
- * device_wakeup_disarm_wake_irqs(void)
+ * device_wakeup_disarm_wake_irqs -
  *
- * Itereates over the list of device wakeirqs to disarm them.
+ * Iterates over the list of device wakeirqs to disarm them.
  */
 void device_wakeup_disarm_wake_irqs(void)
 {
@@ -532,6 +532,7 @@ EXPORT_SYMBOL_GPL(device_init_wakeup);
 /**
  * device_set_wakeup_enable - Enable or disable a device to wake up the system.
  * @dev: Device to handle.
+ * @enable: enable/disable flag
  */
 int device_set_wakeup_enable(struct device *dev, bool enable)
 {
@@ -581,7 +582,7 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws)
  */
 
 /**
- * wakup_source_activate - Mark given wakeup source as active.
+ * wakeup_source_activate - Mark given wakeup source as active.
  * @ws: Wakeup source to handle.
  *
  * Update the @ws' statistics and, if @ws has just been activated, notify the PM
@@ -686,7 +687,7 @@ static inline void update_prevent_sleep_time(struct wakeup_source *ws,
 #endif
 
 /**
- * wakup_source_deactivate - Mark given wakeup source as inactive.
+ * wakeup_source_deactivate - Mark given wakeup source as inactive.
  * @ws: Wakeup source to handle.
  *
  * Update the @ws' statistics and notify the PM core that the wakeup source has
@@ -785,7 +786,7 @@ EXPORT_SYMBOL_GPL(pm_relax);
 
 /**
  * pm_wakeup_timer_fn - Delayed finalization of a wakeup event.
- * @data: Address of the wakeup source object associated with the event source.
+ * @t: timer list
  *
  * Call wakeup_source_deactivate() for the wakeup source whose address is stored
  * in @data if it is currently active and its timer has not been canceled and
@@ -1021,7 +1022,7 @@ bool pm_save_wakeup_count(unsigned int count)
 #ifdef CONFIG_PM_AUTOSLEEP
 /**
  * pm_wakep_autosleep_enabled - Modify autosleep_enabled for all wakeup sources.
- * @enabled: Whether to set or to clear the autosleep_enabled flags.
+ * @set: Whether to set or to clear the autosleep_enabled flags.
  */
 void pm_wakep_autosleep_enabled(bool set)
 {
Signature · 1 line
2.25.1
#9 lore raw

PATCH 5/7 PM: clk: remove kernel-doc warning

In reply to Pierre-Louis Bossart

Remove make W=1 warning:

drivers/base/power/clock_ops.c:148: warning: expecting prototype for pm_clk_enable(). Prototype was for __pm_clk_enable() instead

---
 drivers/base/power/clock_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/clock_ops.c +1 -1
index 84d5acb6301b..0251f3e6e61d 100644
@@ -140,7 +140,7 @@ static void pm_clk_op_unlock(struct pm_subsys_data *psd, unsigned long *flags)
 }
 
 /**
- * pm_clk_enable - Enable a clock, reporting any errors
+ * __pm_clk_enable - Enable a clock, reporting any errors
  * @dev: The device for the given clock
  * @ce: PM clock entry corresponding to the clock.
  */
Signature · 1 line
2.25.1
#10 lore raw

PATCH 6/7 platform-msi: fix kernel-doc warnings

In reply to Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/platform-msi.c:336: warning:
Function parameter or member 'is_tree' not described in '__platform_msi_create_device_domain'

drivers/base/platform-msi.c:336: warning:
expecting prototype for platform_msi_create_device_domain(). Prototype was for __platform_msi_create_device_domain() instead

---
 drivers/base/platform-msi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/base/platform-msi.c +2 -1
index 2c1e2e0c1a59..0b72b134a304 100644
@@ -316,10 +316,11 @@ void *platform_msi_get_host_data(struct irq_domain *domain)
 }
 
 /**
- * platform_msi_create_device_domain - Create a platform-msi domain
+ * __platform_msi_create_device_domain - Create a platform-msi domain
  *
  * @dev:		The device generating the MSIs
  * @nvec:		The number of MSIs that need to be allocated
+ * @is_tree:		flag to indicate tree hierarchy
  * @write_msi_msg:	Callback to write an interrupt message for @dev
  * @ops:		The hierarchy domain operations to use
  * @host_data:		Private data associated to this domain
Signature · 1 line
2.25.1
#11 lore raw

PATCH 7/7 devcoredump: fix kernel-doc warning

In reply to Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/devcoredump.c:208: warning:
Function parameter or member 'data' not described in 'devcd_free_sgtable'

drivers/base/devcoredump.c:208: warning:
Excess function parameter 'table' description in 'devcd_free_sgtable'

drivers/base/devcoredump.c:225: warning:
expecting prototype for devcd_read_from_table(). Prototype was for devcd_read_from_sgtable() instead

---
 drivers/base/devcoredump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/devcoredump.c +2 -2
index 352de5d41466..8eec0e0ddff7 100644
@@ -202,7 +202,7 @@ static int devcd_match_failing(struct device *dev, const void *failing)
  * NOTE: if two tables allocated with devcd_alloc_sgtable and then chained
  * using the sg_chain function then that function should be called only once
  * on the chained table
- * @table: pointer to sg_table to free
+ * @data: pointer to sg_table to free
  */
 static void devcd_free_sgtable(void *data)
 {
@@ -210,7 +210,7 @@ static void devcd_free_sgtable(void *data)
 }
 
 /**
- * devcd_read_from_table - copy data from sg_table to a given buffer
+ * devcd_read_from_sgtable - copy data from sg_table to a given buffer
  * and return the number of bytes read
  * @buffer: the buffer to copy the data to it
  * @buf_len: the length of the buffer
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 7/7
#12 lore raw

Re: [PATCH 7/7] devcoredump: fix kernel-doc warning

Quoted 6 lines · Pierre-Louis Bossart

remove make W=1 warnings

drivers/base/devcoredump.c:208: warning:
Function parameter or member 'data' not described in 'devcd_free_sgtable'

Quoted 6 lines

drivers/base/devcoredump.c:208: warning:
Excess function parameter 'table' description in 'devcd_free_sgtable'

drivers/base/devcoredump.c:225: warning:
expecting prototype for devcd_read_from_table(). Prototype was for devcd_read_from_sgtable() instead

Thanks!

johannes