Hi Jose,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Jose-Abreu/net-stmmac-Improvements-for-next/20191007-013324
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-42-g38eda53-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <l...@intel.com>


sparse warnings: (new ones prefixed by >>)

   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: sparse: sparse: 
incorrect type in argument 1 (different address spaces) @@    expected void 
[noderef] <asn:2> *ioaddr @@    got void [noderef] <asn:2> *ioaddr @@
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: sparse:    
expected void [noderef] <asn:2> *ioaddr
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: sparse:    got 
struct mac_device_info *hw
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4224:21: sparse: sparse: 
>> incorrect type in assignment (different base types) @@    expected unsigned 
>> short [assigned] [usertype] vid @@    got  short [assigned] [usertype] vid @@
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4224:21: sparse:    
>> expected unsigned short [assigned] [usertype] vid
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4224:21: sparse:    got 
>> restricted __le16 [usertype]

vim +4224 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

  4206  
  4207  static int stmmac_vlan_update(struct stmmac_priv *priv, bool is_double)
  4208  {
  4209          u32 crc, hash = 0;
  4210          int count = 0;
  4211          u16 vid = 0;
  4212  
  4213          for_each_set_bit(vid, priv->active_vlans, VLAN_N_VID) {
  4214                  __le16 vid_le = cpu_to_le16(vid);
  4215                  crc = bitrev32(~stmmac_vid_crc32_le(vid_le)) >> 28;
  4216                  hash |= (1 << crc);
  4217                  count++;
  4218          }
  4219  
  4220          if (!priv->dma_cap.vlhash) {
  4221                  if (count > 2) /* VID = 0 always passes filter */
  4222                          return -EOPNOTSUPP;
  4223  
> 4224                  vid = cpu_to_le16(vid);
  4225                  hash = 0;
  4226          }
  4227  
  4228          return stmmac_update_vlan_hash(priv, priv->hw, hash, vid, 
is_double);
  4229  }
  4230  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Reply via email to