From: kernel test robot <lkp@intel.com>
To: "Rafał Miłecki" <rafal@milecki.pl>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
arm@kernel.org, kbuild-all@lists.01.org,
linux-arm-kernel@lists.infradead.org
Subject: [soc:broadcom/drivers 2/4] drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:45: sparse: sparse: cast to restricted __le32
Date: Thu, 11 Feb 2021 05:48:33 +0800 [thread overview]
Message-ID: <202102110531.Y3nmtX3o-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3039 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git broadcom/drivers
head: 8b8f095b9076ca61107c0910c9273afd1dfa1f04
commit: 8bcac4011ebe0dbdd46fd55b036ee855c95702d3 [2/4] soc: bcm: add PM driver for Broadcom's PMB
config: i386-randconfig-s002-20210211 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/commit/?id=8bcac4011ebe0dbdd46fd55b036ee855c95702d3
git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
git fetch --no-tags soc broadcom/drivers
git checkout 8bcac4011ebe0dbdd46fd55b036ee855c95702d3
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <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
90
91 static int bcm_pmb_bpcm_read(struct bcm_pmb *pmb, int bus, u8 device,
92 int offset, u32 *val)
93 {
94 void __iomem *base = pmb->base + bus * 0x20;
95 unsigned long flags;
96 int err;
97
98 spin_lock_irqsave(&pmb->lock, flags);
99 err = bpcm_rd(base, device, offset, val);
100 spin_unlock_irqrestore(&pmb->lock, flags);
101
102 if (!err)
> 103 *val = pmb->little_endian ? le32_to_cpu(*val) : be32_to_cpu(*val);
104
105 return err;
106 }
107
108 static int bcm_pmb_bpcm_write(struct bcm_pmb *pmb, int bus, u8 device,
109 int offset, u32 val)
110 {
111 void __iomem *base = pmb->base + bus * 0x20;
112 unsigned long flags;
113 int err;
114
> 115 val = pmb->little_endian ? cpu_to_le32(val) : cpu_to_be32(val);
116
117 spin_lock_irqsave(&pmb->lock, flags);
118 err = bpcm_wr(base, device, offset, val);
119 spin_unlock_irqrestore(&pmb->lock, flags);
120
121 return err;
122 }
123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52791 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-02-10 21:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 21:48 kernel test robot [this message]
2021-02-11 6:44 ` [soc:broadcom/drivers 2/4] drivers/soc/bcm/bcm63xx/bcm-pmb.c:103:45: sparse: sparse: cast to restricted __le32 Rafał Miłecki
2021-02-11 11:05 ` Arnd Bergmann
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=202102110531.Y3nmtX3o-lkp@intel.com \
--to=lkp@intel.com \
--cc=arm@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=rafal@milecki.pl \
/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;
as well as URLs for NNTP newsgroup(s).