Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [asahilinux:bits/010-soc 13/13] drivers/cpuidle/cpuidle-apple.c:153:13: warning: variable 'pdev' is uninitialized when used here
@ 2024-09-12 22:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-12 22:34 UTC (permalink / raw)
  To: Janne Grunau; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/AsahiLinux/linux bits/010-soc
head:   0be532d0b8c8e4c9d35c7a7b2199e9296d8f68a8
commit: 0be532d0b8c8e4c9d35c7a7b2199e9296d8f68a8 [13/13] cpuidle: apple: Do not load on unsupported Apple platforms
config: arm64-randconfig-004-20240913 (https://download.01.org/0day-ci/archive/20240913/202409130612.wWkyxkkx-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project bf684034844c660b778f0eba103582f582b710c9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409130612.wWkyxkkx-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409130612.wWkyxkkx-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/cpuidle/cpuidle-apple.c:14:
   In file included from arch/arm64/include/asm/cpuidle.h:8:
   In file included from arch/arm64/include/asm/arch_gicv3.h:17:
   In file included from arch/arm64/include/asm/cacheflush.h:11:
   In file included from include/linux/kgdb.h:19:
   In file included from include/linux/kprobes.h:28:
   In file included from include/linux/ftrace.h:13:
   In file included from include/linux/kallsyms.h:13:
   In file included from include/linux/mm.h:2258:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/cpuidle/cpuidle-apple.c:153:13: warning: variable 'pdev' is uninitialized when used here [-Wuninitialized]
     153 |                 dev_info(&pdev->dev, "cpuidle unavailable CPU does not retain state in deep WFI\n");
         |                           ^~~~
   include/linux/dev_printk.h:160:46: note: expanded from macro 'dev_info'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                     ^~~
   include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/cpuidle/cpuidle-apple.c:142:30: note: initialize the variable 'pdev' to silence this warning
     142 |         struct platform_device *pdev;
         |                                     ^
         |                                      = NULL
   2 warnings generated.


vim +/pdev +153 drivers/cpuidle/cpuidle-apple.c

   139	
   140	static int __init apple_cpuidle_init(void)
   141	{
   142		struct platform_device *pdev;
   143		int ret;
   144	
   145		ret = platform_driver_register(&apple_cpuidle_driver);
   146		if (ret)
   147			return ret;
   148	
   149		if (!of_machine_is_compatible("apple,arm-platform"))
   150			return 0;
   151	
   152		if (!FIELD_GET(DEEP_WFI_STATE_RETENTION, read_sysreg(aidr_el1))) {
 > 153			dev_info(&pdev->dev, "cpuidle unavailable CPU does not retain state in deep WFI\n");

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-12 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 22:34 [asahilinux:bits/010-soc 13/13] drivers/cpuidle/cpuidle-apple.c:153:13: warning: variable 'pdev' is uninitialized when used here kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox