mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Rob Herring <robh@kernel.org>
Subject: arch/powerpc/kernel/prom_init.c:2897:22: sparse: sparse: incorrect type in initializer (different base types)
Date: Mon, 9 Dec 2024 12:01:10 +0800	[thread overview]
Message-ID: <202412071026.URGzioD6-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-12-09  4:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202412071026.URGzioD6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®