From patchwork Mon Mar 16 12:38:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kiyanovski, Arthur" X-Patchwork-Id: 222455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E89D9C0044D for ; Mon, 16 Mar 2020 12:39:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BFF80205ED for ; Mon, 16 Mar 2020 12:39:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="MN+snxcx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731183AbgCPMjY (ORCPT ); Mon, 16 Mar 2020 08:39:24 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:8928 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731055AbgCPMjX (ORCPT ); Mon, 16 Mar 2020 08:39:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1584362363; x=1615898363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=/2khqVNRPOGPjyuIDjrs3MmZoMil42ginaBwNCwYBxA=; b=MN+snxcxWPk5tHNNGCombre2QMcnz8SxC3QsvH5S0bqvyFRokOFe3ZFn wRyLgpGMW3jD7cRPbcoVWjDh0HUH5TcqTDhoz2jDbe7PKKklGhiKz98Vt IpXld6kP3LycpMQzqR8/rNu02+9mGMASVOlNkOvfHYXTZguN9BnjyBJ6q E=; IronPort-SDR: gvngpW+4JYKsN4mkLqo7HjflLOGRmfWVNsnHxJ/vzXXNxghXev5HZJH5qDGKRoEwGZitSLwrL+ JkM65HuqORrA== X-IronPort-AV: E=Sophos;i="5.70,560,1574121600"; d="scan'208";a="21214133" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-715bee71.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 16 Mar 2020 12:39:11 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-715bee71.us-east-1.amazon.com (Postfix) with ESMTPS id 9AF9CA2B42; Mon, 16 Mar 2020 12:39:09 +0000 (UTC) Received: from EX13D21UWA001.ant.amazon.com (10.43.160.154) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 16 Mar 2020 12:38:53 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13D21UWA001.ant.amazon.com (10.43.160.154) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 16 Mar 2020 12:38:52 +0000 Received: from HFA15-G63729NC.amazon.com (10.1.213.27) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 16 Mar 2020 12:38:48 +0000 From: To: , CC: Arthur Kiyanovski , , , , , , , , , , , , , , Subject: [PATCH V1 net 4/7] net: ena: remove code that does nothing Date: Mon, 16 Mar 2020 14:38:21 +0200 Message-ID: <1584362304-274-5-git-send-email-akiyano@amazon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584362304-274-1-git-send-email-akiyano@amazon.com> References: <1584362304-274-1-git-send-email-akiyano@amazon.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arthur Kiyanovski 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 Signed-off-by: Arthur Kiyanovski --- 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; }