aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/myricom/Kconfig
diff options
context:
space:
mode:
authorAleksey Makarov <aleksey.makarov@caviumnetworks.com>2015-06-02 11:00:24 -0700
committerDavid S. Miller <davem@davemloft.net>2015-06-02 12:49:31 -0700
commit89987844681757f68dd16b96c4d1d0cc1039183c (patch)
treecc0af19d582e6b7cb1c5ee21cd418510747064d8 /drivers/net/ethernet/myricom/Kconfig
parentfd7ec06254b174b1a8170cca66ec35fea299b151 (diff)
downloadkernel_replicant_linux-89987844681757f68dd16b96c4d1d0cc1039183c.tar.gz
kernel_replicant_linux-89987844681757f68dd16b96c4d1d0cc1039183c.tar.bz2
kernel_replicant_linux-89987844681757f68dd16b96c4d1d0cc1039183c.zip
net: thunderx: fix nicvf_set_rxfh()
This fixes a copypaste bug that was discovered by a static analysis tool: The patch 4863dea3fab0: "net: Adding support for Cavium ThunderX network controller" from May 26, 2015, leads to the following static checker warning: drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c:517 nicvf_set_rxfh() warn: we tested 'hkey' before and it was 'false' drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c 506 /* We do not allow change in unsupported parameters */ 507 if (hkey || ^^^^ We return here. 508 (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)) 509 return -EOPNOTSUPP; 510 511 rss->enable = true; 512 if (indir) { 513 for (idx = 0; idx < rss->rss_size; idx++) 514 rss->ind_tbl[idx] = indir[idx]; 515 } 516 517 if (hkey) { ^^^^ So this is dead code. 518 memcpy(rss->key, hkey, RSS_HASH_KEY_SIZE * sizeof(u64)); 519 nicvf_set_rss_key(nic); 520 } 521 522 nicvf_config_rss(nic); 523 return 0; 524 } regards, dan carpenter Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/myricom/Kconfig')
0 files changed, 0 insertions, 0 deletions