mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: William Zhang <william.zhang@broadcom.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:65: sparse: sparse: cast to restricted __be32
Date: Thu, 20 Jul 2023 04:48:04 +0800	[thread overview]
Message-ID: <202307200429.ZJZG9V9A-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-07-19 20:49 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=202307200429.ZJZG9V9A-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=william.zhang@broadcom.com \
    /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®