All of lore.kernel.org
 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>
Subject: arch/powerpc/kernel/prom_init.c:2888:22: sparse: sparse: incorrect type in initializer (different base types)
Date: Sat, 17 Jan 2026 17:35:29 +0800	[thread overview]
Message-ID: <202601171708.EMbFwrWA-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d3eeb99bbc99cc5eb94a4a75ed4415a0272254ef
commit: 200f22fa48a8c670a1ba66d18d810c51055e6ae9 powerpc/prom_init: Use IS_ENABLED()
date:   1 year ago
config: powerpc-randconfig-r123-20260117 (https://download.01.org/0day-ci/archive/20260117/202601171708.EMbFwrWA-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260117/202601171708.EMbFwrWA-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/202601171708.EMbFwrWA-lkp@intel.com/

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

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

cf89c9434af122 Michael Ellerman 2024-11-26  2885  
cf89c9434af122 Michael Ellerman 2024-11-26  2886  static void __init fixup_device_tree_pmac(void)
cf89c9434af122 Michael Ellerman 2024-11-26  2887  {
cf89c9434af122 Michael Ellerman 2024-11-26 @2888  	__be32 val = 1;
cf89c9434af122 Michael Ellerman 2024-11-26  2889  	char type[8];
cf89c9434af122 Michael Ellerman 2024-11-26  2890  	phandle node;
cf89c9434af122 Michael Ellerman 2024-11-26  2891  
cf89c9434af122 Michael Ellerman 2024-11-26  2892  	// Some pmacs are missing #size-cells on escc nodes
cf89c9434af122 Michael Ellerman 2024-11-26  2893  	for (node = 0; prom_next_node(&node); ) {
cf89c9434af122 Michael Ellerman 2024-11-26  2894  		type[0] = '\0';
cf89c9434af122 Michael Ellerman 2024-11-26  2895  		prom_getprop(node, "device_type", type, sizeof(type));
cf89c9434af122 Michael Ellerman 2024-11-26  2896  		if (prom_strcmp(type, "escc"))
cf89c9434af122 Michael Ellerman 2024-11-26  2897  			continue;
cf89c9434af122 Michael Ellerman 2024-11-26  2898  
cf89c9434af122 Michael Ellerman 2024-11-26  2899  		if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
cf89c9434af122 Michael Ellerman 2024-11-26  2900  			continue;
cf89c9434af122 Michael Ellerman 2024-11-26  2901  
cf89c9434af122 Michael Ellerman 2024-11-26  2902  		prom_setprop(node, NULL, "#size-cells", &val, sizeof(val));
cf89c9434af122 Michael Ellerman 2024-11-26  2903  	}
cf89c9434af122 Michael Ellerman 2024-11-26  2904  }
9b6b563c0d2d25 Paul Mackerras   2005-10-06  2905  

:::::: The code at line 2888 was first introduced by commit
:::::: cf89c9434af122f28a3552e6f9cc5158c33ce50a powerpc/prom_init: Fixup missing powermac #size-cells

:::::: TO: Michael Ellerman <mpe@ellerman.id.au>
:::::: CC: Madhavan Srinivasan <maddy@linux.ibm.com>

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

                 reply	other threads:[~2026-01-17  9:35 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=202601171708.EMbFwrWA-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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.