Content-Type: multipart/mixed; boundary="===============4392823448592864202==" MIME-Version: 1.0 From: Alex Elder To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next 6/6] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header Date: Fri, 05 Mar 2021 06:59:50 -0600 Message-ID: <2bcbefab-7c4d-dd36-01f8-9759ba4b2bdf@linaro.org> In-Reply-To: <202103051434.KSZRphLE-lkp@intel.com> List-Id: --===============4392823448592864202== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 3/5/21 12:22 AM, kernel test robot wrote: > Hi Alex, > = > I love your patch! Perhaps something to improve: > = > [auto build test WARNING on net-next/master] Well that's embarrassing. It explains why I had to make a change or two after testing though. I will fix this so the bit fields are defined in host byte order, and will fix the encoding calls to use u32_encode_bits() instead of be32_encode_bits(). I will redo my testing (for all of the patches) and will then submit version 2 of the series. -Alex > = > url: https://github.com/0day-ci/linux/commits/Alex-Elder/net-qualcomm-= rmnet-stop-using-C-bit-fields/20210305-064128 > base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.gi= t d310ec03a34e92a77302edb804f7d68ee4f01ba0 > config: riscv-randconfig-s031-20210305 (attached as .config) > compiler: riscv64-linux-gcc (GCC) 9.3.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # apt-get install sparse > # sparse version: v0.6.3-245-gacc5c298-dirty > # https://github.com/0day-ci/linux/commit/dba638b67dff001926855ed= 81e35e52bd54880ea > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Alex-Elder/net-qualcomm-rmnet-st= op-using-C-bit-fields/20210305-064128 > git checkout dba638b67dff001926855ed81e35e52bd54880ea > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-9.3.0 make.cros= s C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=3Driscv = > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > = > "sparse warnings: (new ones prefixed by >>)" >>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:208:13: sparse: sp= arse: incorrect type in assignment (different base types) @@ expected u= nsigned short [usertype] val @@ got restricted __be16 @@ > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:208:13: sparse: = expected unsigned short [usertype] val > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:208:13: sparse: = got restricted __be16 >>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:210:21: sparse: sp= arse: invalid assignment: |=3D >>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:210:21: sparse: = left side has type unsigned short >>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:210:21: sparse: = right side has type restricted __be16 > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:211:13: sparse: s= parse: invalid assignment: |=3D > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:211:13: sparse: = left side has type unsigned short > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:211:13: sparse: = right side has type restricted __be16 > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:247:13: sparse: s= parse: incorrect type in assignment (different base types) @@ expected = unsigned short [usertype] val @@ got restricted __be16 @@ > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:247:13: sparse: = expected unsigned short [usertype] val > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:247:13: sparse: = got restricted __be16 > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:249:21: sparse: s= parse: invalid assignment: |=3D > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:249:21: sparse: = left side has type unsigned short > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:249:21: sparse: = right side has type restricted __be16 > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:250:13: sparse: s= parse: invalid assignment: |=3D > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:250:13: sparse: = left side has type unsigned short > drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:250:13: sparse: = right side has type restricted __be16 > = > vim +208 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c > = > 195 = > 196 static void > 197 rmnet_map_ipv4_ul_csum_header(void *iphdr, > 198 struct rmnet_map_ul_csum_header *ul_header, > 199 struct sk_buff *skb) > 200 { > 201 struct iphdr *ip4h =3D iphdr; > 202 u16 offset; > 203 u16 val; > 204 = > 205 offset =3D skb_transport_header(skb) - (unsigned char *)iphdr; > 206 ul_header->csum_start_offset =3D htons(offset); > 207 = > > 208 val =3D be16_encode_bits(1, MAP_CSUM_UL_ENABLED_FMASK); > 209 if (ip4h->protocol =3D=3D IPPROTO_UDP) > > 210 val |=3D be16_encode_bits(1, MAP_CSUM_UL_UDP_FMASK); > 211 val |=3D be16_encode_bits(skb->csum_offset, MAP_CSUM_UL_OFFSET_FM= ASK); > 212 = > 213 ul_header->csum_info =3D htons(val); > 214 = > 215 skb->ip_summed =3D CHECKSUM_NONE; > 216 = > 217 rmnet_map_complement_ipv4_txporthdr_csum_field(iphdr); > 218 } > 219 = > = > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org >=20 --===============4392823448592864202==--