Content-Type: multipart/mixed; boundary="===============7436571404742767948==" MIME-Version: 1.0 From: Marcelo Ricardo Leitner To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next 1/3] net: mscc: ocelot: support matching on EtherType Date: Wed, 22 Apr 2020 21:43:58 -0300 Message-ID: <20200423004358.GA2469@localhost.localdomain> In-Reply-To: List-Id: --===============7436571404742767948== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Apr 23, 2020 at 01:50:41AM +0300, Vladimir Oltean wrote: > On Thu, 23 Apr 2020 at 01:36, kbuild test robot wrote: > > > > Hi Vladimir, > > > = > [...] > = > > > > sparse warnings: (new ones prefixed by >>) > > > > >> drivers/net/ethernet/mscc/ocelot_flower.c:184:54: sparse: sparse: in= correct type in assignment (different base types) @@ expected unsigned s= hort [usertype] @@ got resunsigned short [usertype] @@ > = > What's a resunsigned short? Dunno, but seems "restricted unsigned short", considering the below. > = > > >> drivers/net/ethernet/mscc/ocelot_flower.c:184:54: sparse: expecte= d unsigned short [usertype] > > >> drivers/net/ethernet/mscc/ocelot_flower.c:184:54: sparse: got res= tricted __be16 [usertype] > > > = > [...] > = > > 179 if (match_protocol && proto !=3D ETH_P_ALL) { > > 180 /* TODO: support SNAP, LLC etc */ > > 181 if (proto < ETH_P_802_3_MIN) > > 182 return -EOPNOTSUPP; > > 183 ace->type =3D OCELOT_ACE_TYPE_ETYPE; > > > 184 *(u16 *)ace->frame.etype.etype.value =3D htons(= proto); > = > What's wrong with this? Doesn't it like the left hand side or the > right hand side? It's assigning a big-endian value (network endian) to a host-endian variable (u16 cast). > = > > 185 *(u16 *)ace->frame.etype.etype.mask =3D 0xffff; > > 186 } > = > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org > = > -Vladimir >=20 --===============7436571404742767948==--