linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH linux-next] powercap/drivers/dtpm: dtpm_node_callback[] can be static
  2022-03-01  4:19 [linux-next:master 3353/9295] drivers/powercap/dtpm.c:525:22: sparse: sparse: symbol 'dtpm_node_callback' was not declared. Should it be static? kernel test robot
@ 2022-03-01  3:28 ` kernel test robot
  2022-03-01 17:58   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-03-01  3:28 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: kbuild-all, Linux Memory Management List, Ulf Hansson,
	Rafael J. Wysocki, linux-pm, linux-kernel

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,
 };

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [linux-next:master 3353/9295] drivers/powercap/dtpm.c:525:22: sparse: sparse: symbol 'dtpm_node_callback' was not declared. Should it be static?
@ 2022-03-01  4:19 kernel test robot
  2022-03-01  3:28 ` [RFC PATCH linux-next] powercap/drivers/dtpm: dtpm_node_callback[] can be static kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-03-01  4:19 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: kbuild-all, Linux Memory Management List, Ulf Hansson,
	Rafael J. Wysocki, linux-pm, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6705cd745adbbeac6b13002c7a30060f7b2568a5
commit: 3759ec678e8944dc2ea70cab77a300408f78ae27 [3353/9295] powercap/drivers/dtpm: Add hierarchy creation
config: x86_64-randconfig-s021-20220228 (https://download.01.org/0day-ci/archive/20220301/202203011104.TkmvSjFD-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3759ec678e8944dc2ea70cab77a300408f78ae27
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 3759ec678e8944dc2ea70cab77a300408f78ae27
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/powercap/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   drivers/powercap/dtpm.c: note: in included file:
   drivers/powercap/dtpm_subsys.h:12:24: sparse: sparse: symbol 'dtpm_subsys' was not declared. Should it be static?
>> drivers/powercap/dtpm.c:525:22: sparse: sparse: symbol 'dtpm_node_callback' was not declared. Should it be static?

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH linux-next] powercap/drivers/dtpm: dtpm_node_callback[] can be static
  2022-03-01  3:28 ` [RFC PATCH linux-next] powercap/drivers/dtpm: dtpm_node_callback[] can be static kernel test robot
@ 2022-03-01 17:58   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2022-03-01 17:58 UTC (permalink / raw)
  To: kernel test robot
  Cc: Daniel Lezcano, kbuild-all, Linux Memory Management List,
	Ulf Hansson, Rafael J. Wysocki, Linux PM,
	Linux Kernel Mailing List

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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-01 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01  4:19 [linux-next:master 3353/9295] drivers/powercap/dtpm.c:525:22: sparse: sparse: symbol 'dtpm_node_callback' was not declared. Should it be static? kernel test robot
2022-03-01  3:28 ` [RFC PATCH linux-next] powercap/drivers/dtpm: dtpm_node_callback[] can be static kernel test robot
2022-03-01 17:58   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).