[PATCH v2] sched/fair: fix all kernel-doc warnings

Randy Dunlap posted 1 patch 4 years, 6 months ago
kernel/sched/fair.c |    8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
[PATCH v2] sched/fair: fix all kernel-doc warnings
Posted by Randy Dunlap 4 years, 6 months ago
Quieten all kernel-doc warnings in kernel/sched/fair.c:

kernel/sched/fair.c:3663: warning: No description found for return value of 'update_cfs_rq_load_avg'
kernel/sched/fair.c:8601: warning: No description found for return value of 'asym_smt_can_pull_tasks'
kernel/sched/fair.c:8673: warning: Function parameter or member 'sds' not described in 'update_sg_lb_stats'
kernel/sched/fair.c:9483: warning: contents before sections

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
---
v2: Tweak the Return: text of asym_smt_can_pull_tasks() [per Ricardo]

 kernel/sched/fair.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- linux-next-20211217.orig/kernel/sched/fair.c
+++ linux-next-20211217/kernel/sched/fair.c
@@ -3652,7 +3652,7 @@ static inline void add_tg_cfs_propagate(
  *
  * cfs_rq->avg is used for task_h_load() and update_cfs_share() for example.
  *
- * Returns true if the load decayed or we removed load.
+ * Return: true if the load decayed or we removed load.
  *
  * Since both these conditions indicate a changed cfs_rq->avg.load we should
  * call update_tg_load_avg() when this function returns true.
@@ -8539,6 +8539,8 @@ group_type group_classify(unsigned int i
  *
  * If @sg does not have SMT siblings, only pull tasks if all of the SMT siblings
  * of @dst_cpu are idle and @sg has lower priority.
+ *
+ * Return: true if @dst_cpu can pull tasks, false otherwise.
  */
 static bool asym_smt_can_pull_tasks(int dst_cpu, struct sd_lb_stats *sds,
 				    struct sg_lb_stats *sgs,
@@ -8614,6 +8616,7 @@ sched_asym(struct lb_env *env, struct sd
 /**
  * update_sg_lb_stats - Update sched_group's statistics for load balancing.
  * @env: The load balancing environment.
+ * @sds: Load-balancing data with statistics of the local group.
  * @group: sched_group whose statistics are to be updated.
  * @sgs: variable to hold the statistics for this group.
  * @sg_status: Holds flag indicating the status of the sched_group
@@ -9421,12 +9424,11 @@ static inline void calculate_imbalance(s
 /**
  * find_busiest_group - Returns the busiest group within the sched_domain
  * if there is an imbalance.
+ * @env: The load balancing environment.
  *
  * Also calculates the amount of runnable load which should be moved
  * to restore balance.
  *
- * @env: The load balancing environment.
- *
  * Return:	- The busiest group if imbalance exists.
  */
 static struct sched_group *find_busiest_group(struct lb_env *env)
Re: [PATCH v2] sched/fair: fix all kernel-doc warnings
Posted by Vincent Guittot 4 years, 6 months ago
On Sat, 18 Dec 2021 at 06:59, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Quieten all kernel-doc warnings in kernel/sched/fair.c:
>
> kernel/sched/fair.c:3663: warning: No description found for return value of 'update_cfs_rq_load_avg'
> kernel/sched/fair.c:8601: warning: No description found for return value of 'asym_smt_can_pull_tasks'
> kernel/sched/fair.c:8673: warning: Function parameter or member 'sds' not described in 'update_sg_lb_stats'
> kernel/sched/fair.c:9483: warning: contents before sections
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>

Acked-by: Vincent Guittot <vincent.guittot@linaro.org>

> ---
> v2: Tweak the Return: text of asym_smt_can_pull_tasks() [per Ricardo]
>
>  kernel/sched/fair.c |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> --- linux-next-20211217.orig/kernel/sched/fair.c
> +++ linux-next-20211217/kernel/sched/fair.c
> @@ -3652,7 +3652,7 @@ static inline void add_tg_cfs_propagate(
>   *
>   * cfs_rq->avg is used for task_h_load() and update_cfs_share() for example.
>   *
> - * Returns true if the load decayed or we removed load.
> + * Return: true if the load decayed or we removed load.
>   *
>   * Since both these conditions indicate a changed cfs_rq->avg.load we should
>   * call update_tg_load_avg() when this function returns true.
> @@ -8539,6 +8539,8 @@ group_type group_classify(unsigned int i
>   *
>   * If @sg does not have SMT siblings, only pull tasks if all of the SMT siblings
>   * of @dst_cpu are idle and @sg has lower priority.
> + *
> + * Return: true if @dst_cpu can pull tasks, false otherwise.
>   */
>  static bool asym_smt_can_pull_tasks(int dst_cpu, struct sd_lb_stats *sds,
>                                     struct sg_lb_stats *sgs,
> @@ -8614,6 +8616,7 @@ sched_asym(struct lb_env *env, struct sd
>  /**
>   * update_sg_lb_stats - Update sched_group's statistics for load balancing.
>   * @env: The load balancing environment.
> + * @sds: Load-balancing data with statistics of the local group.
>   * @group: sched_group whose statistics are to be updated.
>   * @sgs: variable to hold the statistics for this group.
>   * @sg_status: Holds flag indicating the status of the sched_group
> @@ -9421,12 +9424,11 @@ static inline void calculate_imbalance(s
>  /**
>   * find_busiest_group - Returns the busiest group within the sched_domain
>   * if there is an imbalance.
> + * @env: The load balancing environment.
>   *
>   * Also calculates the amount of runnable load which should be moved
>   * to restore balance.
>   *
> - * @env: The load balancing environment.
> - *
>   * Return:     - The busiest group if imbalance exists.
>   */
>  static struct sched_group *find_busiest_group(struct lb_env *env)
Re: [PATCH v2] sched/fair: fix all kernel-doc warnings
Posted by Ricardo Neri 4 years, 6 months ago
On Fri, Dec 17, 2021 at 09:59:00PM -0800, Randy Dunlap wrote:
> Quieten all kernel-doc warnings in kernel/sched/fair.c:
> 
> kernel/sched/fair.c:3663: warning: No description found for return value of 'update_cfs_rq_load_avg'
> kernel/sched/fair.c:8601: warning: No description found for return value of 'asym_smt_can_pull_tasks'
> kernel/sched/fair.c:8673: warning: Function parameter or member 'sds' not described in 'update_sg_lb_stats'
> kernel/sched/fair.c:9483: warning: contents before sections
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> v2: Tweak the Return: text of asym_smt_can_pull_tasks() [per Ricardo]

Thank you very much considering the proposed tweak, and also taking care
of this issue.

FWIW, Reviewed-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
[tip: sched/urgent] sched/fair: Fix all kernel-doc warnings
Posted by tip-bot2 for Randy Dunlap 4 years, 5 months ago
The following commit has been merged into the sched/urgent branch of tip:

Commit-ID:     a315da5e686b02b20c1713dda818e8fb691526bb
Gitweb:        https://git.kernel.org/tip/a315da5e686b02b20c1713dda818e8fb691526bb
Author:        Randy Dunlap <rdunlap@infradead.org>
AuthorDate:    Fri, 17 Dec 2021 21:59:00 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 18 Jan 2022 12:09:59 +01:00

sched/fair: Fix all kernel-doc warnings

Quieten all kernel-doc warnings in kernel/sched/fair.c:

kernel/sched/fair.c:3663: warning: No description found for return value of 'update_cfs_rq_load_avg'
kernel/sched/fair.c:8601: warning: No description found for return value of 'asym_smt_can_pull_tasks'
kernel/sched/fair.c:8673: warning: Function parameter or member 'sds' not described in 'update_sg_lb_stats'
kernel/sched/fair.c:9483: warning: contents before sections

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20211218055900.2704-1-rdunlap@infradead.org
---
 kernel/sched/fair.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f4f02c2..5146163 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3668,7 +3668,7 @@ static inline void add_tg_cfs_propagate(struct cfs_rq *cfs_rq, long runnable_sum
  *
  * cfs_rq->avg is used for task_h_load() and update_cfs_share() for example.
  *
- * Returns true if the load decayed or we removed load.
+ * Return: true if the load decayed or we removed load.
  *
  * Since both these conditions indicate a changed cfs_rq->avg.load we should
  * call update_tg_load_avg() when this function returns true.
@@ -8573,6 +8573,8 @@ group_type group_classify(unsigned int imbalance_pct,
  *
  * If @sg does not have SMT siblings, only pull tasks if all of the SMT siblings
  * of @dst_cpu are idle and @sg has lower priority.
+ *
+ * Return: true if @dst_cpu can pull tasks, false otherwise.
  */
 static bool asym_smt_can_pull_tasks(int dst_cpu, struct sd_lb_stats *sds,
 				    struct sg_lb_stats *sgs,
@@ -8648,6 +8650,7 @@ sched_asym(struct lb_env *env, struct sd_lb_stats *sds,  struct sg_lb_stats *sgs
 /**
  * update_sg_lb_stats - Update sched_group's statistics for load balancing.
  * @env: The load balancing environment.
+ * @sds: Load-balancing data with statistics of the local group.
  * @group: sched_group whose statistics are to be updated.
  * @sgs: variable to hold the statistics for this group.
  * @sg_status: Holds flag indicating the status of the sched_group
@@ -9455,12 +9458,11 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
 /**
  * find_busiest_group - Returns the busiest group within the sched_domain
  * if there is an imbalance.
+ * @env: The load balancing environment.
  *
  * Also calculates the amount of runnable load which should be moved
  * to restore balance.
  *
- * @env: The load balancing environment.
- *
  * Return:	- The busiest group if imbalance exists.
  */
 static struct sched_group *find_busiest_group(struct lb_env *env)