diff mbox series

[RFC,linux-next] powercap/drivers/dtpm: dtpm_node_callback[] can be static

Message ID 20220301032854.GA65991@baa819af95e9 (mailing list archive)
State Mainlined, archived
Headers show
Series [RFC,linux-next] powercap/drivers/dtpm: dtpm_node_callback[] can be static | expand

Commit Message

kernel test robot March 1, 2022, 3:28 a.m. UTC
drivers/powercap/dtpm.c:525:22: warning: symbol 'dtpm_node_callback' was not declared. Should it be static?

Fixes: 3759ec678e89 ("powercap/drivers/dtpm: Add hierarchy creation")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
 drivers/powercap/dtpm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki March 1, 2022, 5:58 p.m. UTC | #1
On Tue, Mar 1, 2022 at 4:29 AM kernel test robot <lkp@intel.com> wrote:
>
> drivers/powercap/dtpm.c:525:22: warning: symbol 'dtpm_node_callback' was not declared. Should it be static?
>
> Fixes: 3759ec678e89 ("powercap/drivers/dtpm: Add hierarchy creation")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> ---
>  drivers/powercap/dtpm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c
> index 414826a1509b6..6d890d8cf9169 100644
> --- a/drivers/powercap/dtpm.c
> +++ b/drivers/powercap/dtpm.c
> @@ -522,7 +522,7 @@ static struct dtpm *dtpm_setup_dt(const struct dtpm_node *hierarchy,
>
>  typedef struct dtpm * (*dtpm_node_callback_t)(const struct dtpm_node *, struct dtpm *);
>
> -dtpm_node_callback_t dtpm_node_callback[] = {
> +static dtpm_node_callback_t dtpm_node_callback[] = {
>         [DTPM_NODE_VIRTUAL] = dtpm_setup_virtual,
>         [DTPM_NODE_DT] = dtpm_setup_dt,
>  };

Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c
index 414826a1509b6..6d890d8cf9169 100644
--- a/drivers/powercap/dtpm.c
+++ b/drivers/powercap/dtpm.c
@@ -522,7 +522,7 @@  static struct dtpm *dtpm_setup_dt(const struct dtpm_node *hierarchy,
 
 typedef struct dtpm * (*dtpm_node_callback_t)(const struct dtpm_node *, struct dtpm *);
 
-dtpm_node_callback_t dtpm_node_callback[] = {
+static dtpm_node_callback_t dtpm_node_callback[] = {
 	[DTPM_NODE_VIRTUAL] = dtpm_setup_virtual,
 	[DTPM_NODE_DT] = dtpm_setup_dt,
 };