Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp248606ybh; Wed, 11 Mar 2020 00:03:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs13OndU89o1FL2bk2/J7VhYyuHp7jIcSCqOI8HwyTACWjdznOP4OcXAUDUatFwOcLQBTRW X-Received: by 2002:aca:fcd6:: with SMTP id a205mr1002847oii.28.1583910230698; Wed, 11 Mar 2020 00:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583910230; cv=none; d=google.com; s=arc-20160816; b=vwWRLt1duAMvUr0eN/tOR16oCyl8gKH2wOFbAMhlGbnoc/b2FzIzDjFF4/Mv4/vS2H s8SyeVbiU94wXsWUGNLpvAhIgfJoFrEbGXUud0Vuh+XdNAfYC1o+wRB034QxbleVsMzA 85dxYGkC8KoHukNEOqDERxfJ9UbD18ULB3FAdVpcrjgejLNUFeWlHfKJhmUoe9+/5rHH TJU6KObpYyW+SbXYdReQOxLRm7Ft5cvCjvtXp4iph73DzbqGR6wZYTfvtRNdYgClDvw9 gTBOANqUFBy8ornFf+xKYNcALOVxgW1usPYMTVxCU8YgY3UuIWsAtctWxbSHk4Yjoy6i 5uaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=UGGAQ9IrCasHPDbCaDDl+mqTtGClWa6VV9JH53F8rD4=; b=sdBHCWAFowDQYqr9VBGHg3afvGRhvwU5pNR+BjKcNUm5fmUIgPuN63acHyR9fP9zbw s1+2XQfKRNInZPhZBKSfxWqBP4npOK6KF9wff1xJJtUA6QYVKsJA0/+dApQsUtDbfMEp YuipMIZxwLtJJrKV7kZztkxp8AlNb5haIG15mKXh6UctMv89xfGSV1/T1Hna8CKeCOCQ VhPO4rmtAk+6VqxoocfrB7d6pbX2zUGTrZIumFAksa2jsrwPXowcIaUjwTuSL2Rm6jWR uy/tEMRLGaAV+2h2peK3XWG9/MTJkZcHodsKaZB28cOmqDi0A0SuksZGwuZjhmULJ6ts M2tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z16si843512otj.5.2020.03.11.00.03.38; Wed, 11 Mar 2020 00:03:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728408AbgCKHCD (ORCPT + 99 others); Wed, 11 Mar 2020 03:02:03 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52394 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726160AbgCKHCD (ORCPT ); Wed, 11 Mar 2020 03:02:03 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DC51B1098833C4977055; Wed, 11 Mar 2020 15:01:47 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Wed, 11 Mar 2020 15:01:40 +0800 From: Chen Zhou To: CC: , , , , , , Subject: [PATCH -next] net: ibm: remove set but not used variables 'err' Date: Wed, 11 Mar 2020 14:54:11 +0800 Message-ID: <20200311065411.172692-1-chenzhou10@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/ibm/emac/core.c: In function __emac_mdio_write: drivers/net/ethernet/ibm/emac/core.c:875:9: warning: variable err set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/net/ethernet/ibm/emac/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index b7fc177..06248a7 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -872,7 +872,7 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg, { struct emac_regs __iomem *p = dev->emacp; u32 r = 0; - int n, err = -ETIMEDOUT; + int n; mutex_lock(&dev->mdio_lock); @@ -919,7 +919,6 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg, goto bail; } } - err = 0; bail: if (emac_has_feature(dev, EMAC_FTR_HAS_RGMII)) rgmii_put_mdio(dev->rgmii_dev, dev->rgmii_port); -- 2.7.4