From: kernel test robot <lkp@intel.com>
To: You Kangren <youkangren@vivo.com>,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Adam Guerin <adam.guerin@intel.com>,
Wojciech Ziemba <wojciech.ziemba@intel.com>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
Damian Muszynski <damian.muszynski@intel.com>,
Srinivas Kerekare <srinivas.kerekare@intel.com>,
"open list:QAT DRIVER" <qat-linux@intel.com>,
"open list:CRYPTO API" <linux-crypto@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, opensource.kernel@vivo.com
Subject: Re: [PATCH] crypto: qat - Replace the if statement with min()
Date: Mon, 26 Jun 2023 22:10:51 +0800 [thread overview]
Message-ID: <202306262110.NCIrjtZF-lkp@intel.com> (raw)
In-Reply-To: <20230626091541.1064-1-youkangren@vivo.com>
Hi You,
kernel test robot noticed the following build warnings:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master linus/master v6.4 next-20230626]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/You-Kangren/crypto-qat-Replace-the-if-statement-with-min/20230626-172132
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/20230626091541.1064-1-youkangren%40vivo.com
patch subject: [PATCH] crypto: qat - Replace the if statement with min()
config: i386-randconfig-i001-20230626 (https://download.01.org/0day-ci/archive/20230626/202306262110.NCIrjtZF-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230626/202306262110.NCIrjtZF-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/202306262110.NCIrjtZF-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/crypto/intel/qat/qat_common/qat_uclo.c:1989:12: warning: comparison of distinct pointer types ('typeof (words_num) *' (aka 'unsigned int *') and 'typeof (1024) *' (aka 'int *')) [-Wcompare-distinct-pointer-types]
cpylen = min(words_num, UWORD_CPYBUF_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:67:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +1989 drivers/crypto/intel/qat/qat_common/qat_uclo.c
1972
1973 static void qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle,
1974 struct icp_qat_uclo_encap_page
1975 *encap_page, unsigned int ae)
1976 {
1977 unsigned int uw_physical_addr, uw_relative_addr, i, words_num, cpylen;
1978 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle;
1979 u64 fill_pat;
1980
1981 /* load the page starting at appropriate ustore address */
1982 /* get fill-pattern from an image -- they are all the same */
1983 memcpy(&fill_pat, obj_handle->ae_uimage[0].img_ptr->fill_pattern,
1984 sizeof(u64));
1985 uw_physical_addr = encap_page->beg_addr_p;
1986 uw_relative_addr = 0;
1987 words_num = encap_page->micro_words_num;
1988 while (words_num) {
> 1989 cpylen = min(words_num, UWORD_CPYBUF_SIZE);
1990
1991 /* load the buffer */
1992 for (i = 0; i < cpylen; i++)
1993 qat_uclo_fill_uwords(obj_handle, encap_page,
1994 &obj_handle->uword_buf[i],
1995 uw_physical_addr + i,
1996 uw_relative_addr + i, fill_pat);
1997
1998 /* copy the buffer to ustore */
1999 qat_hal_wr_uwords(handle, (unsigned char)ae,
2000 uw_physical_addr, cpylen,
2001 obj_handle->uword_buf);
2002
2003 uw_physical_addr += cpylen;
2004 uw_relative_addr += cpylen;
2005 words_num -= cpylen;
2006 }
2007 }
2008
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-06-26 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 9:15 [PATCH] crypto: qat - Replace the if statement with min() You Kangren
2023-06-26 14:10 ` kernel test robot [this message]
2023-06-26 16:10 ` David Laight
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=202306262110.NCIrjtZF-lkp@intel.com \
--to=lkp@intel.com \
--cc=adam.guerin@intel.com \
--cc=damian.muszynski@intel.com \
--cc=davem@davemloft.net \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=opensource.kernel@vivo.com \
--cc=qat-linux@intel.com \
--cc=srinivas.kerekare@intel.com \
--cc=tom.zanussi@linux.intel.com \
--cc=wojciech.ziemba@intel.com \
--cc=youkangren@vivo.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