[soc:drivers/genpd 5/18] drivers/genpd/bcm/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
kernel test robot
lkp at intel.com
Wed Jul 26 13:39:27 PDT 2023
tree: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git drivers/genpd
head: 7ed363cd8d0a3e4fbe3c37b7458420f82ef9a106
commit: aded002384c13a473af7d519e38ff59bf6056289 [5/18] soc: bcm: Move power-domain drivers to the genpd dir
config: um-randconfig-r072-20230725 (https://download.01.org/0day-ci/archive/20230727/202307270439.UhLDzRiQ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307270439.UhLDzRiQ-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307270439.UhLDzRiQ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/genpd/bcm/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/genpd/bcm/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/genpd/bcm/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/genpd/bcm/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/genpd/bcm/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/genpd/bcm/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
>> drivers/genpd/bcm/bcm-pmb.c:103:45: sparse: sparse: cast to restricted __le32
>> drivers/genpd/bcm/bcm-pmb.c:115:36: sparse: sparse: restricted __le32 degrades to integer
>> drivers/genpd/bcm/bcm-pmb.c:115:55: sparse: sparse: restricted __be32 degrades to integer
vim +103 drivers/genpd/bcm/bcm-pmb.c
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 90
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 91 static int bcm_pmb_bpcm_read(struct bcm_pmb *pmb, int bus, u8 device,
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 92 int offset, u32 *val)
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 93 {
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 94 void __iomem *base = pmb->base + bus * 0x20;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 95 unsigned long flags;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 96 int err;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 97
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 98 spin_lock_irqsave(&pmb->lock, flags);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 99 err = bpcm_rd(base, device, offset, val);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 100 spin_unlock_irqrestore(&pmb->lock, flags);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 101
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 102 if (!err)
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 @103 *val = pmb->little_endian ? le32_to_cpu(*val) : be32_to_cpu(*val);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 104
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 105 return err;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 106 }
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 107
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 108 static int bcm_pmb_bpcm_write(struct bcm_pmb *pmb, int bus, u8 device,
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 109 int offset, u32 val)
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 110 {
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 111 void __iomem *base = pmb->base + bus * 0x20;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 112 unsigned long flags;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 113 int err;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 114
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 @115 val = pmb->little_endian ? cpu_to_le32(val) : cpu_to_be32(val);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 116
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 117 spin_lock_irqsave(&pmb->lock, flags);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 118 err = bpcm_wr(base, device, offset, val);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 119 spin_unlock_irqrestore(&pmb->lock, flags);
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 120
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 121 return err;
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c Rafał Miłecki 2020-12-14 122 }
8bcac4011ebe0d drivers/soc/bcm/bcm63xx/bcm-pmb.c 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 at milecki.pl>
:::::: CC: Florian Fainelli <f.fainelli at gmail.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list