Content-Type: multipart/mixed; boundary="===============5705367749608418351==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH nf-next] netfilter: nft_cmp: optimize comparison for up to 16-bytes Date: Sat, 05 Feb 2022 09:17:04 +0800 Message-ID: <202202050944.nFxizuBh-lkp@intel.com> In-Reply-To: <20220204151903.320786-3-pablo@netfilter.org> List-Id: --===============5705367749608418351== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Pablo, I love your patch! Perhaps something to improve: [auto build test WARNING on nf-next/master] url: https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilte= r-nft_cmp-optimize-comparison-for-up-to-16-bytes/20220204-232030 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git m= aster config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive= /20220205/202202050944.nFxizuBh-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/91cb7a051c24382b5a7252e59= fc5a6a6e2d62332 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Pablo-Neira-Ayuso/netfilter-nft_cm= p-optimize-comparison-for-up-to-16-bytes/20220204-232030 git checkout 91cb7a051c24382b5a7252e59fc5a6a6e2d62332 # save the config file to linux build tree mkdir build_dir make W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3D= build_dir ARCH=3Dx86_64 SHELL=3D/bin/bash net/netfilter/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) net/netfilter/nft_cmp.c:129:31: sparse: sparse: cast to restricted __be16 net/netfilter/nft_cmp.c:132:31: sparse: sparse: cast to restricted __be32 net/netfilter/nft_cmp.c:135:31: sparse: sparse: cast to restricted __be64 >> net/netfilter/nft_cmp.c:211:33: sparse: sparse: incorrect type in assign= ment (different base types) @@ expected unsigned int @@ got restric= ted __le32 [usertype] @@ net/netfilter/nft_cmp.c:211:33: sparse: expected unsigned int net/netfilter/nft_cmp.c:211:33: sparse: got restricted __le32 [usert= ype] vim +211 net/netfilter/nft_cmp.c 199 = 200 static void nft_cmp16_fast_mask(struct nft_data *data, unsigned int = bitlen) 201 { 202 int len =3D bitlen / BITS_PER_BYTE; 203 int i, words =3D len / sizeof(u32); 204 = 205 for (i =3D 0; i < words; i++) { 206 data->data[i] =3D 0xffffffff; 207 bitlen -=3D sizeof(u32) * BITS_PER_BYTE; 208 } 209 = 210 if (len % sizeof(u32)) > 211 data->data[i++] =3D cpu_to_le32(~0U >> (sizeof(u32) * BITS_PER_BYT= E - bitlen)); 212 = 213 for (; i < 4; i++) 214 data->data[i] =3D 0; 215 } 216 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5705367749608418351==--