From: kernel test robot <lkp@intel.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: drivers/crypto/sa2ul.c:1674:6: warning: variable 'auth_len' set but not used
Date: Thu, 3 Jun 2021 03:53:14 +0800 [thread overview]
Message-ID: <202106030304.crsT6r76-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5096 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 231bc539066760aaa44d46818c85b14ca2f56d9f
commit: 00c9211f60db2dead16856f81a3e6ab86b31f275 crypto: sa2ul - Fix DMA mapping API usage
date: 8 months ago
config: arm64-randconfig-r005-20210601 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d41cb6bb2607fa5c7a9df2b3dab361353657d225)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=00c9211f60db2dead16856f81a3e6ab86b31f275
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 00c9211f60db2dead16856f81a3e6ab86b31f275
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/crypto/sa2ul.c:1674:6: warning: variable 'auth_len' set but not used [-Wunused-but-set-variable]
u16 auth_len;
^
1 warning generated.
vim +/auth_len +1674 drivers/crypto/sa2ul.c
2dc53d0047458e2 Keerthy 2020-07-13 1662
d2c8ac187fc922e Keerthy 2020-07-13 1663 static void sa_aead_dma_in_callback(void *data)
d2c8ac187fc922e Keerthy 2020-07-13 1664 {
d2c8ac187fc922e Keerthy 2020-07-13 1665 struct sa_rx_data *rxd = (struct sa_rx_data *)data;
d2c8ac187fc922e Keerthy 2020-07-13 1666 struct aead_request *req;
d2c8ac187fc922e Keerthy 2020-07-13 1667 struct crypto_aead *tfm;
d2c8ac187fc922e Keerthy 2020-07-13 1668 unsigned int start;
d2c8ac187fc922e Keerthy 2020-07-13 1669 unsigned int authsize;
d2c8ac187fc922e Keerthy 2020-07-13 1670 u8 auth_tag[SA_MAX_AUTH_TAG_SZ];
d2c8ac187fc922e Keerthy 2020-07-13 1671 size_t pl, ml;
00c9211f60db2de Peter Ujfalusi 2020-09-23 1672 int i;
d2c8ac187fc922e Keerthy 2020-07-13 1673 int err = 0;
d2c8ac187fc922e Keerthy 2020-07-13 @1674 u16 auth_len;
d2c8ac187fc922e Keerthy 2020-07-13 1675 u32 *mdptr;
d2c8ac187fc922e Keerthy 2020-07-13 1676
00c9211f60db2de Peter Ujfalusi 2020-09-23 1677 sa_sync_from_device(rxd);
d2c8ac187fc922e Keerthy 2020-07-13 1678 req = container_of(rxd->req, struct aead_request, base);
d2c8ac187fc922e Keerthy 2020-07-13 1679 tfm = crypto_aead_reqtfm(req);
d2c8ac187fc922e Keerthy 2020-07-13 1680 start = req->assoclen + req->cryptlen;
d2c8ac187fc922e Keerthy 2020-07-13 1681 authsize = crypto_aead_authsize(tfm);
d2c8ac187fc922e Keerthy 2020-07-13 1682
d2c8ac187fc922e Keerthy 2020-07-13 1683 mdptr = (u32 *)dmaengine_desc_get_metadata_ptr(rxd->tx_in, &pl, &ml);
d2c8ac187fc922e Keerthy 2020-07-13 1684 for (i = 0; i < (authsize / 4); i++)
d2c8ac187fc922e Keerthy 2020-07-13 1685 mdptr[i + 4] = swab32(mdptr[i + 4]);
d2c8ac187fc922e Keerthy 2020-07-13 1686
d2c8ac187fc922e Keerthy 2020-07-13 1687 auth_len = req->assoclen + req->cryptlen;
d2c8ac187fc922e Keerthy 2020-07-13 1688
d2c8ac187fc922e Keerthy 2020-07-13 1689 if (rxd->enc) {
d2c8ac187fc922e Keerthy 2020-07-13 1690 scatterwalk_map_and_copy(&mdptr[4], req->dst, start, authsize,
d2c8ac187fc922e Keerthy 2020-07-13 1691 1);
d2c8ac187fc922e Keerthy 2020-07-13 1692 } else {
00c9211f60db2de Peter Ujfalusi 2020-09-23 1693 auth_len -= authsize;
d2c8ac187fc922e Keerthy 2020-07-13 1694 start -= authsize;
d2c8ac187fc922e Keerthy 2020-07-13 1695 scatterwalk_map_and_copy(auth_tag, req->src, start, authsize,
d2c8ac187fc922e Keerthy 2020-07-13 1696 0);
d2c8ac187fc922e Keerthy 2020-07-13 1697
d2c8ac187fc922e Keerthy 2020-07-13 1698 err = memcmp(&mdptr[4], auth_tag, authsize) ? -EBADMSG : 0;
d2c8ac187fc922e Keerthy 2020-07-13 1699 }
d2c8ac187fc922e Keerthy 2020-07-13 1700
00c9211f60db2de Peter Ujfalusi 2020-09-23 1701 sa_free_sa_rx_data(rxd);
d2c8ac187fc922e Keerthy 2020-07-13 1702
d2c8ac187fc922e Keerthy 2020-07-13 1703 aead_request_complete(req, err);
d2c8ac187fc922e Keerthy 2020-07-13 1704 }
d2c8ac187fc922e Keerthy 2020-07-13 1705
:::::: The code at line 1674 was first introduced by commit
:::::: d2c8ac187fc922e73930a1b2f6a211e27f595d01 crypto: sa2ul - Add AEAD algorithm support
:::::: TO: Keerthy <j-keerthy@ti.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: 31314 bytes --]
next reply other threads:[~2021-06-02 19:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 19:53 kernel test robot [this message]
2021-06-15 6:14 ` [PATCH] crypto: sa2ul - Remove unused auth_len variable 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=202106030304.crsT6r76-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.ujfalusi@ti.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