Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [bcain:bcain/hmx 26/66] arch/hexagon/kernel/devtree.c:107:16: warning: variable 'dt_root' set but not used
@ 2026-04-28 16:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-28 16:03 UTC (permalink / raw)
  To: Richard Kuo; +Cc: llvm, oe-kbuild-all, Brian Cain

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux.git bcain/hmx
head:   1d0fb0b4cf1764f00775cff1c17c2b3494b6b94e
commit: 4f3ac18400ea643ada1af624c617c61f2b32aa5e [26/66] hexagon: add memory management enhancements
config: hexagon-allnoconfig (https://download.01.org/0day-ci/archive/20260428/202604282333.UkZL41Tj-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260428/202604282333.UkZL41Tj-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/202604282333.UkZL41Tj-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/hexagon/kernel/devtree.c:50:44: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'int *' [-Wincompatible-pointer-types]
      50 |         p = of_get_flat_dt_prop(node, "bootargs", &l);
         |                                                   ^~
   include/linux/of_fdt.h:57:17: note: passing argument to parameter 'size' here
      57 |                                        int *size);
         |                                             ^
   arch/hexagon/kernel/devtree.c:50:4: error: assigning to 'char *' from 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      50 |         p = of_get_flat_dt_prop(node, "bootargs", &l);
         |           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/hexagon/kernel/devtree.c:107:16: warning: variable 'dt_root' set but not used [-Wunused-but-set-variable]
     107 |         unsigned long dt_root;
         |                       ^
   1 warning and 2 errors generated.


vim +/dt_root +107 arch/hexagon/kernel/devtree.c

51ba881ada7104 Brian Cain  2026-01-24   89  
efcb3f02069d74 Richard Kuo 2025-08-18   90  /*
efcb3f02069d74 Richard Kuo 2025-08-18   91   * setup_machine_fdt - set up machine based on dtb passed to kernel
efcb3f02069d74 Richard Kuo 2025-08-18   92   * @dt_phys: physical address of dtb
efcb3f02069d74 Richard Kuo 2025-08-18   93   *
efcb3f02069d74 Richard Kuo 2025-08-18   94   * Sets up some of the earliest stuff -- setting the machine type,
efcb3f02069d74 Richard Kuo 2025-08-18   95   * pulling the command line options, and finding the memory.
efcb3f02069d74 Richard Kuo 2025-08-18   96   *
efcb3f02069d74 Richard Kuo 2025-08-18   97   * Since we're calling this from setup_arch, this is going to happen
efcb3f02069d74 Richard Kuo 2025-08-18   98   * very, very early.  Prior to even the bootmem being set up in the
efcb3f02069d74 Richard Kuo 2025-08-18   99   * old scheme I think.
efcb3f02069d74 Richard Kuo 2025-08-18  100   *
efcb3f02069d74 Richard Kuo 2025-08-18  101   * Also since we're always being fired up by the hypervisor, then
efcb3f02069d74 Richard Kuo 2025-08-18  102   * we are already running with the MMU on with an init segtable.
efcb3f02069d74 Richard Kuo 2025-08-18  103   */
51ba881ada7104 Brian Cain  2026-01-24  104  const struct machine_desc * __init setup_machine_fdt(void *dt_phys)
efcb3f02069d74 Richard Kuo 2025-08-18  105  {
51ba881ada7104 Brian Cain  2026-01-24  106  	const struct machine_desc *mdesc_best = NULL;
efcb3f02069d74 Richard Kuo 2025-08-18 @107  	unsigned long dt_root;
efcb3f02069d74 Richard Kuo 2025-08-18  108  

:::::: The code at line 107 was first introduced by commit
:::::: efcb3f02069d744d73c43ded9cc7d7b20454e203 hexagon: add device tree support

:::::: TO: Richard Kuo <rkuo@quicinc.com>
:::::: CC: Brian Cain <brian.cain@oss.qualcomm.com>

-- 
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:[~2026-04-28 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 16:03 [bcain:bcain/hmx 26/66] arch/hexagon/kernel/devtree.c:107:16: warning: variable 'dt_root' set but not used 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