lkml.org 
[lkml]   [2020]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 net-next 08/15] net: dsa: sja1105: prepare tagger for handling DSA tags and VLAN simultaneously
On Wed, 13 May 2020 at 03:02, kbuild test robot <lkp@intel.com> wrote:
>
> Hi Vladimir,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on net-next/master]
> [also build test WARNING on next-20200512]
> [cannot apply to linus/master v5.7-rc5]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url: https://github.com/0day-ci/linux/commits/Vladimir-Oltean/Traffic-support-for-dsa_8021q-in-vlan_filtering-1-mode/20200513-012422
> base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 3242956bd610af40e884b530b6c6f76f5bf85f3b
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.1-191-gc51a0382-dirty
> make ARCH=x86_64 allmodconfig
> make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
>
>
> sparse warnings: (new ones prefixed by >>)
>
> >> net/dsa/tag_sja1105.c:76:34: sparse: sparse: cast to restricted __be16
> >> net/dsa/tag_sja1105.c:76:34: sparse: sparse: cast to restricted __be16
> >> net/dsa/tag_sja1105.c:76:34: sparse: sparse: cast to restricted __be16
> >> net/dsa/tag_sja1105.c:76:34: sparse: sparse: cast to restricted __be16
> >> net/dsa/tag_sja1105.c:76:16: sparse: sparse: restricted __be16 degrades to integer
> net/dsa/tag_sja1105.c:79:34: sparse: sparse: cast to restricted __be16
> net/dsa/tag_sja1105.c:79:34: sparse: sparse: cast to restricted __be16
> net/dsa/tag_sja1105.c:79:34: sparse: sparse: cast to restricted __be16
> net/dsa/tag_sja1105.c:79:34: sparse: sparse: cast to restricted __be16
> net/dsa/tag_sja1105.c:79:16: sparse: sparse: restricted __be16 degrades to integer
>
> vim +76 net/dsa/tag_sja1105.c
>
> 71
> 72 static bool sja1105_can_use_vlan_as_tags(const struct sk_buff *skb)
> 73 {
> 74 struct vlan_ethhdr *hdr = vlan_eth_hdr(skb);
> 75
> > 76 if (hdr->h_vlan_proto == ntohs(ETH_P_SJA1105))
> 77 return true;

Oh my, I really suck at this...
I think it's complaining because I should have called htons instead of ntohs?

> 78
> 79 if (hdr->h_vlan_proto != ntohs(ETH_P_8021Q))
> 80 return false;
> 81
> 82 return vid_is_dsa_8021q(ntohs(hdr->h_vlan_TCI) & VLAN_VID_MASK);
> 83 }
> 84
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2020-05-13 02:08    [W:0.073 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site