mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
@ 2023-07-19 20:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-19 20:48 UTC (permalink / raw)
  To: William Zhang; +Cc: oe-kbuild-all, linux-kernel, Florian Fainelli

Hi William,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bfa3037d828050896ae52f6467b6ca2489ae6fb1
commit: 7bb49d774f481fdd7bd053e034e4d206770fda04 arm64: bcmbca: Make BCM4908 drivers depend on ARCH_BCMBCA
date:   11 months ago
config: arm64-randconfig-r092-20230720 (https://download.01.org/0day-ci/archive/20230720/202307200429.ZJZG9V9A-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230720/202307200429.ZJZG9V9A-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/202307200429.ZJZG9V9A-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:45: sparse: sparse: cast to restricted __le32
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:115:36: sparse: sparse: restricted __le32 degrades to integer
>> drivers/soc/bcm/bcm63xx/bcm-pmb.c:115:55: sparse: sparse: restricted __be32 degrades to integer

vim +103 drivers/soc/bcm/bcm63xx/bcm-pmb.c

8bcac4011ebe0db Rafał Miłecki 2020-12-14   90  
8bcac4011ebe0db Rafał Miłecki 2020-12-14   91  static int bcm_pmb_bpcm_read(struct bcm_pmb *pmb, int bus, u8 device,
8bcac4011ebe0db Rafał Miłecki 2020-12-14   92  			     int offset, u32 *val)
8bcac4011ebe0db Rafał Miłecki 2020-12-14   93  {
8bcac4011ebe0db Rafał Miłecki 2020-12-14   94  	void __iomem *base = pmb->base + bus * 0x20;
8bcac4011ebe0db Rafał Miłecki 2020-12-14   95  	unsigned long flags;
8bcac4011ebe0db Rafał Miłecki 2020-12-14   96  	int err;
8bcac4011ebe0db Rafał Miłecki 2020-12-14   97  
8bcac4011ebe0db Rafał Miłecki 2020-12-14   98  	spin_lock_irqsave(&pmb->lock, flags);
8bcac4011ebe0db Rafał Miłecki 2020-12-14   99  	err = bpcm_rd(base, device, offset, val);
8bcac4011ebe0db Rafał Miłecki 2020-12-14  100  	spin_unlock_irqrestore(&pmb->lock, flags);
8bcac4011ebe0db Rafał Miłecki 2020-12-14  101  
8bcac4011ebe0db Rafał Miłecki 2020-12-14  102  	if (!err)
8bcac4011ebe0db Rafał Miłecki 2020-12-14 @103  		*val = pmb->little_endian ? le32_to_cpu(*val) : be32_to_cpu(*val);
8bcac4011ebe0db Rafał Miłecki 2020-12-14  104  
8bcac4011ebe0db Rafał Miłecki 2020-12-14  105  	return err;
8bcac4011ebe0db Rafał Miłecki 2020-12-14  106  }
8bcac4011ebe0db Rafał Miłecki 2020-12-14  107  
8bcac4011ebe0db Rafał Miłecki 2020-12-14  108  static int bcm_pmb_bpcm_write(struct bcm_pmb *pmb, int bus, u8 device,
8bcac4011ebe0db Rafał Miłecki 2020-12-14  109  			      int offset, u32 val)
8bcac4011ebe0db Rafał Miłecki 2020-12-14  110  {
8bcac4011ebe0db Rafał Miłecki 2020-12-14  111  	void __iomem *base = pmb->base + bus * 0x20;
8bcac4011ebe0db Rafał Miłecki 2020-12-14  112  	unsigned long flags;
8bcac4011ebe0db Rafał Miłecki 2020-12-14  113  	int err;
8bcac4011ebe0db Rafał Miłecki 2020-12-14  114  
8bcac4011ebe0db Rafał Miłecki 2020-12-14 @115  	val = pmb->little_endian ? cpu_to_le32(val) : cpu_to_be32(val);
8bcac4011ebe0db Rafał Miłecki 2020-12-14  116  
8bcac4011ebe0db Rafał Miłecki 2020-12-14  117  	spin_lock_irqsave(&pmb->lock, flags);
8bcac4011ebe0db Rafał Miłecki 2020-12-14  118  	err = bpcm_wr(base, device, offset, val);
8bcac4011ebe0db Rafał Miłecki 2020-12-14  119  	spin_unlock_irqrestore(&pmb->lock, flags);
8bcac4011ebe0db Rafał Miłecki 2020-12-14  120  
8bcac4011ebe0db Rafał Miłecki 2020-12-14  121  	return err;
8bcac4011ebe0db Rafał Miłecki 2020-12-14  122  }
8bcac4011ebe0db Rafał Miłecki 2020-12-14  123  

:::::: The code at line 103 was first introduced by commit
:::::: 8bcac4011ebe0dbdd46fd55b036ee855c95702d3 soc: bcm: add PM driver for Broadcom's PMB

:::::: TO: Rafał Miłecki <rafal@milecki.pl>
:::::: CC: Florian Fainelli <f.fainelli@gmail.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:[~2023-07-19 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 20:48 drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32 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®