From patchwork Fri Jun 11 07:11:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wong Vee Khee X-Patchwork-Id: 458991 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 23567C48BD1 for ; Fri, 11 Jun 2021 07:07:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1AFC61364 for ; Fri, 11 Jun 2021 07:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbhFKHJj (ORCPT ); Fri, 11 Jun 2021 03:09:39 -0400 Received: from mga12.intel.com ([192.55.52.136]:17509 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbhFKHJi (ORCPT ); Fri, 11 Jun 2021 03:09:38 -0400 IronPort-SDR: qMP3c1W5YYO7OcH7rYaVk3YWGfN+wDpfBFzBXH5nZfP1ZXX15r1DHi6hixFxq9Ff6JatA9X6zd EvKv6AilKZHQ== X-IronPort-AV: E=McAfee;i="6200,9189,10011"; a="185166837" X-IronPort-AV: E=Sophos;i="5.83,265,1616482800"; d="scan'208";a="185166837" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2021 00:07:04 -0700 IronPort-SDR: afjxRnVnKdW7kcXTge4k/NNkVMeLOqvtprD/PsspPRHe5JKjDig+E7erlN7fy+rUahcnJ5tQvL rc0eajHzK7NA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,265,1616482800"; d="scan'208";a="486491531" Received: from linux.intel.com ([10.54.29.200]) by fmsmga002.fm.intel.com with ESMTP; 11 Jun 2021 00:07:02 -0700 Received: from glass.png.intel.com (glass.png.intel.com [10.158.65.69]) by linux.intel.com (Postfix) with ESMTP id B189F580BD5; Fri, 11 Jun 2021 00:06:59 -0700 (PDT) From: Wong Vee Khee To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin Cc: Joakim Zhang , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong , Voon Wei Feng Subject: [PATCH net-next v1 1/1] net: stmmac: Fix unused values warnings Date: Fri, 11 Jun 2021 15:11:43 +0800 Message-Id: <20210611071143.987866-1-vee.khee.wong@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The commit 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX") introduced the converity warnings:- 1. Unused value (UNUSED_VALUE) assigned_value: Assigning value REQ_IRQ_ERR_MAC to irq_err here, but that stored value is not used. 2. Unused value (UNUSED_VALUE) assigned_value: Assigning value REQ_IRQ_ERR_NO to irq_err here, but that stored value is overwritten before it can used. 3. Unused value (UNUSED_VALUE) assigned_value: Assigning value REQ_IRQ_ERR_WOL to irq_err here, but that stored value is not used. Fixed these by removing the unnecessary value assignments. Fixes: 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX") Signed-off-by: Wong Vee Khee --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index db97cd4b871d..4177fd6a9db5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3406,8 +3406,8 @@ static void stmmac_free_irq(struct net_device *dev, static int stmmac_request_irq_multi_msi(struct net_device *dev) { - enum request_irq_err irq_err = REQ_IRQ_ERR_NO; struct stmmac_priv *priv = netdev_priv(dev); + enum request_irq_err irq_err; cpumask_t cpu_mask; int irq_idx = 0; char *int_name; @@ -3554,8 +3554,8 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev) static int stmmac_request_irq_single(struct net_device *dev) { - enum request_irq_err irq_err = REQ_IRQ_ERR_NO; struct stmmac_priv *priv = netdev_priv(dev); + enum request_irq_err irq_err; int ret; ret = request_irq(dev->irq, stmmac_interrupt, @@ -3565,7 +3565,7 @@ static int stmmac_request_irq_single(struct net_device *dev) "%s: ERROR: allocating the IRQ %d (error: %d)\n", __func__, dev->irq, ret); irq_err = REQ_IRQ_ERR_MAC; - return ret; + goto irq_error; } /* Request the Wake IRQ in case of another line @@ -3579,7 +3579,7 @@ static int stmmac_request_irq_single(struct net_device *dev) "%s: ERROR: allocating the WoL IRQ %d (%d)\n", __func__, priv->wol_irq, ret); irq_err = REQ_IRQ_ERR_WOL; - return ret; + goto irq_error; } }