From: kernel test robot <lkp@intel.com>
To: Richard van Schagen <vschagen@icloud.com>,
herbert@gondor.apana.org.au, davem@davemloft.net,
matthias.bgg@gmail.com, robh+dt@kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-crypto@vger.kernel.org,
Richard van Schagen <vschagen@icloud.com>
Subject: Re: [PATCH v3 2/2] crypto: mtk-eip93 - Add Mediatek EIP-93 crypto engine
Date: Thu, 28 Oct 2021 14:27:07 +0800 [thread overview]
Message-ID: <202110281412.4M0edOjI-lkp@intel.com> (raw)
In-Reply-To: <20211027091329.3093641-3-vschagen@icloud.com>
[-- Attachment #1: Type: text/plain, Size: 13500 bytes --]
Hi Richard,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master robh/for-next v5.15-rc7 next-20211027]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Richard-van-Schagen/Enable-the-Mediatek-EIP-93-crypto-engine/20211027-171429
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: riscv-randconfig-r031-20211027 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/b4ea2578718d77c7cbac42427a511182d91ac5f1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Richard-van-Schagen/Enable-the-Mediatek-EIP-93-crypto-engine/20211027-171429
git checkout b4ea2578718d77c7cbac42427a511182d91ac5f1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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 >>):
In file included from drivers/crypto/mtk-eip93/eip93-common.c:15:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/crypto/mtk-eip93/eip93-common.c:15:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/crypto/mtk-eip93/eip93-common.c:15:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
drivers/crypto/mtk-eip93/eip93-common.c:282:6: warning: no previous prototype for function 'mtk_set_saRecord' [-Wmissing-prototypes]
void mtk_set_saRecord(struct saRecord_s *saRecord, const unsigned int keylen,
^
drivers/crypto/mtk-eip93/eip93-common.c:282:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void mtk_set_saRecord(struct saRecord_s *saRecord, const unsigned int keylen,
^
static
drivers/crypto/mtk-eip93/eip93-common.c:527:18: warning: cast to smaller integer type 'u32' (aka 'unsigned int') from 'const u8 *' (aka 'const unsigned char *') [-Wpointer-to-int-cast]
if (!IS_ALIGNED((u32)reqiv, rctx->ivsize) || IS_RFC3686(flags)) {
^~~~~~~~~~
include/linux/align.h:13:30: note: expanded from macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
drivers/crypto/mtk-eip93/eip93-common.c:527:18: warning: cast to smaller integer type 'u32' (aka 'unsigned int') from 'const u8 *' (aka 'const unsigned char *') [-Wpointer-to-int-cast]
if (!IS_ALIGNED((u32)reqiv, rctx->ivsize) || IS_RFC3686(flags)) {
^~~~~~~~~~
include/linux/align.h:13:44: note: expanded from macro 'IS_ALIGNED'
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
^
drivers/crypto/mtk-eip93/eip93-common.c:593:19: warning: cast to smaller integer type 'u32' (aka 'unsigned int') from 'struct crypto_async_request *' [-Wpointer-to-int-cast]
cdesc.arc4Addr = (u32)async;
^~~~~~~~~~
drivers/crypto/mtk-eip93/eip93-common.c:693:5: warning: no previous prototype for function 'mtk_skcipher_send_req' [-Wmissing-prototypes]
int mtk_skcipher_send_req(struct crypto_async_request *async)
^
drivers/crypto/mtk-eip93/eip93-common.c:693:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mtk_skcipher_send_req(struct crypto_async_request *async)
^
static
drivers/crypto/mtk-eip93/eip93-common.c:709:6: warning: no previous prototype for function 'mtk_skcipher_handle_result' [-Wmissing-prototypes]
void mtk_skcipher_handle_result(struct mtk_device *mtk,
^
drivers/crypto/mtk-eip93/eip93-common.c:709:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void mtk_skcipher_handle_result(struct mtk_device *mtk,
^
static
>> drivers/crypto/mtk-eip93/eip93-common.c:725:5: warning: no previous prototype for function 'mtk_authenc_setkey' [-Wmissing-prototypes]
int mtk_authenc_setkey(struct crypto_shash *cshash, struct saRecord_s *sa,
^
drivers/crypto/mtk-eip93/eip93-common.c:725:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mtk_authenc_setkey(struct crypto_shash *cshash, struct saRecord_s *sa,
^
static
14 warnings generated.
--
In file included from drivers/crypto/mtk-eip93/eip93-aead.c:24:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/crypto/mtk-eip93/eip93-aead.c:24:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/crypto/mtk-eip93/eip93-aead.c:24:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/crypto/mtk-eip93/eip93-aead.c:30:6: warning: no previous prototype for function 'mtk_aead_handle_result' [-Wmissing-prototypes]
void mtk_aead_handle_result(struct mtk_device *mtk,
^
drivers/crypto/mtk-eip93/eip93-aead.c:30:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void mtk_aead_handle_result(struct mtk_device *mtk,
^
static
>> drivers/crypto/mtk-eip93/eip93-aead.c:49:5: warning: no previous prototype for function 'mtk_aead_send_req' [-Wmissing-prototypes]
int mtk_aead_send_req(struct crypto_async_request *async)
^
drivers/crypto/mtk-eip93/eip93-aead.c:49:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mtk_aead_send_req(struct crypto_async_request *async)
^
static
>> drivers/crypto/mtk-eip93/eip93-aead.c:152:7: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (keys.enckeylen < CTR_RFC3686_NONCE_SIZE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/mtk-eip93/eip93-aead.c:209:9: note: uninitialized use occurs here
return err;
^~~
drivers/crypto/mtk-eip93/eip93-aead.c:152:3: note: remove the 'if' if its condition is always false
if (keys.enckeylen < CTR_RFC3686_NONCE_SIZE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/mtk-eip93/eip93-aead.c:145:9: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
10 warnings generated.
vim +/mtk_authenc_setkey +725 drivers/crypto/mtk-eip93/eip93-common.c
708
> 709 void mtk_skcipher_handle_result(struct mtk_device *mtk,
710 struct crypto_async_request *async,
711 int err)
712 {
713 struct skcipher_request *req = skcipher_request_cast(async);
714 struct mtk_cipher_reqctx *rctx = skcipher_request_ctx(req);
715
716 mtk_unmap_dma(mtk, rctx, req->src, req->dst);
717 mtk_handle_result(mtk, rctx, req->iv);
718
719 skcipher_request_complete(req, err);
720 }
721 #endif
722
723 #if IS_ENABLED(CONFIG_CRYPTO_DEV_EIP93_HMAC)
724 /* basically this is set hmac - key */
> 725 int mtk_authenc_setkey(struct crypto_shash *cshash, struct saRecord_s *sa,
---
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: 39802 bytes --]
next prev parent reply other threads:[~2021-10-28 6:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 9:13 [PATCH v3 0/2] Enable the Mediatek EIP-93 crypto engine Richard van Schagen
2021-10-27 9:13 ` [PATCH v3 1/2] dt-bindings: crypto: Add " Richard van Schagen
2021-10-27 13:58 ` Rob Herring
2021-10-27 9:13 ` [PATCH v3 2/2] crypto: mtk-eip93 - " Richard van Schagen
2021-10-28 5:12 ` kernel test robot
2021-10-28 6:27 ` kernel test robot [this message]
2021-10-29 6:41 ` Richard van Schagen
2021-10-28 7:49 ` kernel test robot
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=202110281412.4M0edOjI-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@lists.01.org \
--cc=linux-crypto@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=vschagen@icloud.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