diff mbox series

PM: domains: fix domain_governor kernel-doc warnings

Message ID 20231205225856.32739-1-rdunlap@infradead.org
State Accepted
Commit 3b2714c5d2d26d12b759f7cee9a802a9c8c33936
Headers show
Series PM: domains: fix domain_governor kernel-doc warnings | expand

Commit Message

Randy Dunlap Dec. 5, 2023, 10:58 p.m. UTC
Fix kernel-doc warnings found when using "W=1".

domain_governor.c:54: warning: No description found for return value of 'default_suspend_ok'
domain_governor.c:266: warning: No description found for return value of '_default_power_down_ok'
domain_governor.c:412: warning: cannot understand function prototype: 'struct dev_power_governor pm_domain_always_on_gov = '

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-pm@vger.kernel.org
---
 drivers/base/power/domain_governor.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Ulf Hansson Dec. 7, 2023, 12:45 p.m. UTC | #1
On Tue, 5 Dec 2023 at 23:59, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Fix kernel-doc warnings found when using "W=1".
>
> domain_governor.c:54: warning: No description found for return value of 'default_suspend_ok'
> domain_governor.c:266: warning: No description found for return value of '_default_power_down_ok'
> domain_governor.c:412: warning: cannot understand function prototype: 'struct dev_power_governor pm_domain_always_on_gov = '
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Kevin Hilman <khilman@kernel.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-pm@vger.kernel.org

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
>  drivers/base/power/domain_governor.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff -- a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c
> --- a/drivers/base/power/domain_governor.c
> +++ b/drivers/base/power/domain_governor.c
> @@ -49,6 +49,8 @@ static int dev_update_qos_constraint(str
>  /**
>   * default_suspend_ok - Default PM domain governor routine to suspend devices.
>   * @dev: Device to check.
> + *
> + * Returns: true if OK to suspend, false if not OK to suspend
>   */
>  static bool default_suspend_ok(struct device *dev)
>  {
> @@ -261,6 +263,8 @@ static bool __default_power_down_ok(stru
>   * @now: current ktime.
>   *
>   * This routine must be executed under the PM domain's lock.
> + *
> + * Returns: true if OK to power down, false if not OK to power down
>   */
>  static bool _default_power_down_ok(struct dev_pm_domain *pd, ktime_t now)
>  {
> @@ -406,8 +410,8 @@ struct dev_power_governor simple_qos_gov
>         .power_down_ok = default_power_down_ok,
>  };
>
> -/**
> - * pm_genpd_gov_always_on - A governor implementing an always-on policy
> +/*
> + * pm_domain_always_on_gov - A governor implementing an always-on policy
>   */
>  struct dev_power_governor pm_domain_always_on_gov = {
>         .suspend_ok = default_suspend_ok,
Ulf Hansson Dec. 13, 2023, 10:33 a.m. UTC | #2
On Tue, 5 Dec 2023 at 23:59, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Fix kernel-doc warnings found when using "W=1".
>
> domain_governor.c:54: warning: No description found for return value of 'default_suspend_ok'
> domain_governor.c:266: warning: No description found for return value of '_default_power_down_ok'
> domain_governor.c:412: warning: cannot understand function prototype: 'struct dev_power_governor pm_domain_always_on_gov = '
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Kevin Hilman <khilman@kernel.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-pm@vger.kernel.org

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/base/power/domain_governor.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff -- a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c
> --- a/drivers/base/power/domain_governor.c
> +++ b/drivers/base/power/domain_governor.c
> @@ -49,6 +49,8 @@ static int dev_update_qos_constraint(str
>  /**
>   * default_suspend_ok - Default PM domain governor routine to suspend devices.
>   * @dev: Device to check.
> + *
> + * Returns: true if OK to suspend, false if not OK to suspend
>   */
>  static bool default_suspend_ok(struct device *dev)
>  {
> @@ -261,6 +263,8 @@ static bool __default_power_down_ok(stru
>   * @now: current ktime.
>   *
>   * This routine must be executed under the PM domain's lock.
> + *
> + * Returns: true if OK to power down, false if not OK to power down
>   */
>  static bool _default_power_down_ok(struct dev_pm_domain *pd, ktime_t now)
>  {
> @@ -406,8 +410,8 @@ struct dev_power_governor simple_qos_gov
>         .power_down_ok = default_power_down_ok,
>  };
>
> -/**
> - * pm_genpd_gov_always_on - A governor implementing an always-on policy
> +/*
> + * pm_domain_always_on_gov - A governor implementing an always-on policy
>   */
>  struct dev_power_governor pm_domain_always_on_gov = {
>         .suspend_ok = default_suspend_ok,
diff mbox series

Patch

diff -- a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c
--- a/drivers/base/power/domain_governor.c
+++ b/drivers/base/power/domain_governor.c
@@ -49,6 +49,8 @@  static int dev_update_qos_constraint(str
 /**
  * default_suspend_ok - Default PM domain governor routine to suspend devices.
  * @dev: Device to check.
+ *
+ * Returns: true if OK to suspend, false if not OK to suspend
  */
 static bool default_suspend_ok(struct device *dev)
 {
@@ -261,6 +263,8 @@  static bool __default_power_down_ok(stru
  * @now: current ktime.
  *
  * This routine must be executed under the PM domain's lock.
+ *
+ * Returns: true if OK to power down, false if not OK to power down
  */
 static bool _default_power_down_ok(struct dev_pm_domain *pd, ktime_t now)
 {
@@ -406,8 +410,8 @@  struct dev_power_governor simple_qos_gov
 	.power_down_ok = default_power_down_ok,
 };
 
-/**
- * pm_genpd_gov_always_on - A governor implementing an always-on policy
+/*
+ * pm_domain_always_on_gov - A governor implementing an always-on policy
  */
 struct dev_power_governor pm_domain_always_on_gov = {
 	.suspend_ok = default_suspend_ok,