From: kernel test robot <lkp@intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/crypto/stm32/stm32-cryp.c:1232:47: sparse: sparse: incorrect type in argument 2 (different base types)
Date: Tue, 29 Dec 2020 11:26:45 +0800 [thread overview]
Message-ID: <202012291139.8JYuVQ00-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4191 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dea8dcf2a9fa8cc540136a6cd885c3beece16ec3
commit: bbb2832620ac4e136416aa97af7310636422dea9 crypto: stm32 - Fix sparse warnings
date: 4 months ago
config: arm-randconfig-s032-20201220 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbb2832620ac4e136416aa97af7310636422dea9
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bbb2832620ac4e136416aa97af7310636422dea9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
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/crypto/stm32/stm32-cryp.c:1232:47: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be32 [usertype] *[assigned] iv @@ got unsigned int [usertype] * @@
drivers/crypto/stm32/stm32-cryp.c:1232:47: sparse: expected restricted __be32 [usertype] *[assigned] iv
drivers/crypto/stm32/stm32-cryp.c:1232:47: sparse: got unsigned int [usertype] *
vim +1232 drivers/crypto/stm32/stm32-cryp.c
9d3b5030bc1e44f Fabien DESSENNE 2018-02-07 1215
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1216 static void stm32_cryp_check_ctr_counter(struct stm32_cryp *cryp)
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1217 {
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1218 u32 cr;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1219
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1220 if (unlikely(cryp->last_ctr[3] == 0xFFFFFFFF)) {
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1221 cryp->last_ctr[3] = 0;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1222 cryp->last_ctr[2]++;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1223 if (!cryp->last_ctr[2]) {
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1224 cryp->last_ctr[1]++;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1225 if (!cryp->last_ctr[1])
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1226 cryp->last_ctr[0]++;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1227 }
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1228
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1229 cr = stm32_cryp_read(cryp, CRYP_CR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1230 stm32_cryp_write(cryp, CRYP_CR, cr & ~CR_CRYPEN);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1231
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 @1232 stm32_cryp_hw_write_iv(cryp, (u32 *)cryp->last_ctr);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1233
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1234 stm32_cryp_write(cryp, CRYP_CR, cr);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1235 }
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1236
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1237 cryp->last_ctr[0] = stm32_cryp_read(cryp, CRYP_IV0LR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1238 cryp->last_ctr[1] = stm32_cryp_read(cryp, CRYP_IV0RR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1239 cryp->last_ctr[2] = stm32_cryp_read(cryp, CRYP_IV1LR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1240 cryp->last_ctr[3] = stm32_cryp_read(cryp, CRYP_IV1RR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1241 }
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 1242
:::::: The code at line 1232 was first introduced by commit
:::::: 9e054ec21ef8344345b28603fb272fe999f735db crypto: stm32 - Support for STM32 CRYP crypto module
:::::: TO: Fabien DESSENNE <fabien.dessenne@st.com>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>
---
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: 31907 bytes --]
next reply other threads:[~2020-12-29 3:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-29 3:26 kernel test robot [this message]
2021-01-04 6:15 ` crypto: stm32 - Fix last sparse warning in stm32_cryp_check_ctr_counter Herbert Xu
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=202012291139.8JYuVQ00-lkp@intel.com \
--to=lkp@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/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®