mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/powerpc/kernel/prom_init.c:2897:22: sparse: sparse: incorrect type in initializer (different base types)
@ 2024-12-09  4:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-09  4:01 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: oe-kbuild-all, linux-kernel, Madhavan Srinivasan, Rob Herring

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b5f217084ab3ddd4bdd03cd437f8e3b7e2d1f5b6
commit: cf89c9434af122f28a3552e6f9cc5158c33ce50a powerpc/prom_init: Fixup missing powermac #size-cells
date:   10 days ago
config: powerpc64-randconfig-r113-20241207 (https://download.01.org/0day-ci/archive/20241207/202412071026.URGzioD6-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241207/202412071026.URGzioD6-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/202412071026.URGzioD6-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kernel/prom_init.c:2897:22: sparse: sparse: incorrect type in initializer (different base types) @@     expected restricted __be32 [usertype] val @@     got int @@
   arch/powerpc/kernel/prom_init.c:2897:22: sparse:     expected restricted __be32 [usertype] val
   arch/powerpc/kernel/prom_init.c:2897:22: sparse:     got int

vim +2897 arch/powerpc/kernel/prom_init.c

  2893	
  2894	#ifdef CONFIG_PPC_PMAC
  2895	static void __init fixup_device_tree_pmac(void)
  2896	{
> 2897		__be32 val = 1;
  2898		char type[8];
  2899		phandle node;
  2900	
  2901		// Some pmacs are missing #size-cells on escc nodes
  2902		for (node = 0; prom_next_node(&node); ) {
  2903			type[0] = '\0';
  2904			prom_getprop(node, "device_type", type, sizeof(type));
  2905			if (prom_strcmp(type, "escc"))
  2906				continue;
  2907	
  2908			if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
  2909				continue;
  2910	
  2911			prom_setprop(node, NULL, "#size-cells", &val, sizeof(val));
  2912		}
  2913	}
  2914	#else
  2915	static inline void fixup_device_tree_pmac(void) { }
  2916	#endif
  2917	

-- 
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-12-09  4:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-09  4:01 arch/powerpc/kernel/prom_init.c:2897:22: sparse: sparse: incorrect type in initializer (different base types) 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

all inboxes | Powered by JetHome®