From patchwork Tue Sep 8 03:49:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Xu X-Patchwork-Id: 249268 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4200234ilg; Mon, 7 Sep 2020 20:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhwVRwqr8imTSezbYzY4UiGZXsqS23N4NHpmKW9RzZQiGLKib6JNGujVFClbD+obhXQ9AF X-Received: by 2002:a17:907:2078:: with SMTP id qp24mr13675820ejb.500.1599537195713; Mon, 07 Sep 2020 20:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599537195; cv=none; d=google.com; s=arc-20160816; b=OKvSMf626hUiAgjbCbX072MtUJReJaEGTx9VSpPrv+AjWdzTOlb5bjtyyRFi7Oye9t FVCLvKve1UfC+qIpV0ppIiqaJ+/6yCeVdCumr2HjGKWc6mr9kK1THgJMsTGbt7l+c1Eg 6u3B27g/ofVadgw1OjJMonEGMq59B06dHIqa2RBylnbJpzkmPEqkSi+D5lORe7JRicIx 2KNosBc/F1GbHY+jbwyVFnLvaEKWGUfPmeniUwoiLsQw2HHQX0EBwB4hKhcAIn2n5bqF ZHmDEMUc70FbP4FCkGPusIXcg6WZhJkkdzDzJJBYY9HoHDF3L4oz7iNa7/59QWquGcPP pBCw== 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=soWqyB/u9VjEdqaUyOXLqFI0Q9T94FOM/GtbGRdrgdQ=; b=S+j3e4+hwHMDEA97Etr2UFvfNx7EKPr4wGOpsq/uPTCHwPBANpikDy4EptacIQyNtG QhKYYWuGC54594MHV53y1Ej58YFSEpdtlwii0C5AyCofLcMLwD+LstPiB3JCg3G10uyV WTXyzdiRk7mVfBmTQfKfzFQLXC0jkBEL9/pQGKlMg4aoXBK02lGFdp8oTye1HEIFqXiT apq62sLVnYNm1Q5VPB9dvcF/UgjUVGgDiYFxqZ40y7I+JfOWlxf4qDK2Fkwy32HsY5gp Nd5YXZPe4lU/wvhtExXFi8HZYuIVkLyE/ErDBqIWeLoDtICdBcLTbHNQUBldx5uj1bd9 CGgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg11si10473025ejb.700.2020.09.07.20.53.15; Mon, 07 Sep 2020 20:53:15 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728527AbgIHDxI (ORCPT + 9 others); Mon, 7 Sep 2020 23:53:08 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:34288 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728327AbgIHDxH (ORCPT ); Mon, 7 Sep 2020 23:53:07 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B35312A3C66C3DC1D735; Tue, 8 Sep 2020 11:53:05 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Tue, 8 Sep 2020 11:53:00 +0800 From: Wei Xu To: CC: , , , , , , , , , , , , , Steve Glendinning , Jakub Kicinski , Subject: [net-next] net: smsc911x: Remove unused variables Date: Tue, 8 Sep 2020 11:49:25 +0800 Message-ID: <1599536965-162578-1-git-send-email-xuwei5@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/smsc/smsc911x.c: In function ‘smsc911x_rx_fastforward’: drivers/net/ethernet/smsc/smsc911x.c:1199:16: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/smsc/smsc911x.c: In function ‘smsc911x_eeprom_write_location’: drivers/net/ethernet/smsc/smsc911x.c:2058:6: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] Signed-off-by: Wei Xu --- drivers/net/ethernet/smsc/smsc911x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.8.1 diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index fc168f8..823d9a7 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -1196,9 +1196,8 @@ smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktwords) SMSC_WARN(pdata, hw, "Timed out waiting for " "RX FFWD to finish, RX_DP_CTRL: 0x%08X", val); } else { - unsigned int temp; while (pktwords--) - temp = smsc911x_reg_read(pdata, RX_DATA_FIFO); + smsc911x_reg_read(pdata, RX_DATA_FIFO); } } @@ -2055,7 +2054,6 @@ static int smsc911x_eeprom_write_location(struct smsc911x_data *pdata, u8 address, u8 data) { u32 op = E2P_CMD_EPC_CMD_ERASE_ | address; - u32 temp; int ret; SMSC_TRACE(pdata, drv, "address 0x%x, data 0x%x", address, data); @@ -2066,7 +2064,7 @@ static int smsc911x_eeprom_write_location(struct smsc911x_data *pdata, smsc911x_reg_write(pdata, E2P_DATA, (u32)data); /* Workaround for hardware read-after-write restriction */ - temp = smsc911x_reg_read(pdata, BYTE_TEST); + smsc911x_reg_read(pdata, BYTE_TEST); ret = smsc911x_eeprom_send_cmd(pdata, op); }