[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1584362304-274-5-git-send-email-akiyano@amazon.com>
Date: Mon, 16 Mar 2020 14:38:21 +0200
From: <akiyano@...zon.com>
To: <davem@...emloft.net>, <netdev@...r.kernel.org>
CC: Arthur Kiyanovski <akiyano@...zon.com>, <dwmw@...zon.com>,
<zorik@...zon.com>, <matua@...zon.com>, <saeedb@...zon.com>,
<msw@...zon.com>, <aliguori@...zon.com>, <nafea@...zon.com>,
<gtzalik@...zon.com>, <netanel@...zon.com>, <alisaidi@...zon.com>,
<benh@...zon.com>, <ndagan@...zon.com>, <shayagr@...zon.com>,
<sameehj@...zon.com>
Subject: [PATCH V1 net 4/7] net: ena: remove code that does nothing
From: Arthur Kiyanovski <akiyano@...zon.com>
Both key and func parameters are pointers on the stack.
Setting them to NULL does nothing.
The original intent was to leave the key and func unset in this case,
but for this to happen nothing needs to be done as the calling
function ethtool_get_rxfh() already clears key and func.
This commit removes the above described useless code.
Fixes: 0c8923c0a64f ("net: ena: rss: fix failure to get indirection table")
Signed-off-by: Sameeh Jubran <sameehj@...zon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@...zon.com>
---
drivers/net/ethernet/amazon/ena/ena_ethtool.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
index d1a320b1774d..0b5adcb40425 100644
--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
@@ -675,11 +675,8 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
*/
rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func);
if (rc) {
- if (rc == -EOPNOTSUPP) {
- key = NULL;
- hfunc = NULL;
+ if (rc == -EOPNOTSUPP)
rc = 0;
- }
return rc;
}
--
2.17.1
Powered by blists - more mailing lists