Hi Subash, Thank you for the patch! Yet something to improve:
[auto build test ERROR 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: x86_64-randconfig-s4-05160610 (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=x86_64 All error/warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:10:0, from include/linux/list.h:9, from include/linux/timer.h:5, from include/linux/netdevice.h:28, from drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:16: drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c: In function 'rmnet_map_checksum_downlink_packet': include/linux/compiler.h:58:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^ include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^~~~~~~~~~ >> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:375:7: note: in >> expansion of macro 'if' else if (skb->protocol == htons(ETH_P_IPV6)) ^~ drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:380:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' return -EPROTONOSUPPORT; ^~~~~~ >> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:382:2: error: 'else' >> without a previous 'if' else ^~~~ vim +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
.config.gz
Description: application/gzip