Hi Subash,

Thank you for the patch! Perhaps something to improve:

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

url:    
https://github.com/0day-ci/linux/commits/Subash-Abhinov-Kasiviswanathan/net-qualcomm-rmnet-Updates-2018-05-14/20180515-115355
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c: In function 
'rmnet_map_checksum_downlink_packet':
>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:382:2: warning: this 
>> 'else' clause does not guard... [-Wmisleading-indentation]
     else
     ^~~~
   drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:384:3: note: ...this 
statement, but the latter is misleadingly indented as if it were guarded by the 
'else'
      return -EPROTONOSUPPORT;
      ^~~~~~

vim +/else +382 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c

   349  
   350  /* Validates packet checksums. Function takes a pointer to
   351   * the beginning of a buffer which contains the IP payload +
   352   * padding + checksum trailer.
   353   * Only IPv4 and IPv6 are supported along with TCP & UDP.
   354   * Fragmented or tunneled packets are not supported.
   355   */
   356  int rmnet_map_checksum_downlink_packet(struct sk_buff *skb, u16 len)
   357  {
   358          struct rmnet_priv *priv = netdev_priv(skb->dev);
   359          struct rmnet_map_dl_csum_trailer *csum_trailer;
   360  
   361          if (unlikely(!(skb->dev->features & NETIF_F_RXCSUM))) {
   362                  priv->stats.csum_sw++;
   363                  return -EOPNOTSUPP;
   364          }
   365  
   366          csum_trailer = (struct rmnet_map_dl_csum_trailer *)(skb->data + 
len);
   367  
   368          if (!csum_trailer->valid) {
   369                  priv->stats.csum_valid_unset++;
   370                  return -EINVAL;
   371          }
   372  
   373          if (skb->protocol == htons(ETH_P_IP))
   374                  return rmnet_map_ipv4_dl_csum_trailer(skb, 
csum_trailer, priv);
   375          else if (skb->protocol == htons(ETH_P_IPV6))
   376  #if IS_ENABLED(CONFIG_IPV6)
   377                  return rmnet_map_ipv6_dl_csum_trailer(skb, 
csum_trailer, priv);
   378  #else
   379                  priv->stats.csum_err_invalid_ip_version++;
   380                  return -EPROTONOSUPPORT;
   381  #endif
 > 382          else
   383                  priv->stats.csum_err_invalid_ip_version++;
   384                  return -EPROTONOSUPPORT;
   385  
   386          return 0;
   387  }
   388  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to