Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp637130ybj; Thu, 7 May 2020 04:14:06 -0700 (PDT) X-Google-Smtp-Source: APiQypKKLI7qGAJMISZIfYMkg3+DpjNHmkdLk8/NLpSg7GpTaZbg7UxQ4M+4x0tYuWbtJTK4DATO X-Received: by 2002:a17:906:e90:: with SMTP id p16mr11650111ejf.14.1588850046258; Thu, 07 May 2020 04:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588850046; cv=none; d=google.com; s=arc-20160816; b=lWbNui4YoyQioafQGBI/qMehh7Jwunvxa5spqlzZyJePHGpO9wnqFJ4QR3FmJULql1 d8Vm1WTxMyDdZF++lxVQmL4U7MABUmcZGM5elV0e5w97FEkER/v3LaOXQ0Fzmbm6lx75 H5LqlasrsFwDrimJX/m7AAVM1B6Uynvt5olbsF4SvGBOgVfxYpXR7EQEy4zLhDZUTcb9 m21sxim0ywnq5iqRr59kabwNS1jULpa+hGIFWz/Ihlmtfq98kEzexoTtezHs7+0yKx9o wpQdbpH/0cBuaDYfaDZuOSZM1fuodQVGilXsJCO4doPYp6fh4L8jTapJRvxfW1/aCwLM t60Q== 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:to:from; bh=+MRpUWTVB7G5sNJkCEa6LIP04pQyyQdQlSW8tzq1edc=; b=c1b783d+1jdx7t2fN/ZM6bem94evW+3CCNHz2AdR4A00ubPa7sv9Z7t2A8SmjAjWpB bwWPWEFFSUtwCOesIJhW84wcj3RZv61cGtgDUEYqx/0nUHtoFollHaa4GQrOFCwzdBp2 qrxvx2rBE/seShRrK9B7IDtA0B836hDrYBpA4ckziskpVmNvbat//ZdvOeWdDRcJ0AkB GyNLzoOe1rVWepZuCGjf4ymGORT5OSiR1sEKoLKD17cgHrC1V5+YtbNFo7YUn+A01lQv H7PvacL3Fz4viqD9kJIFm+yVrH4NfWr+OjoqOAsXJzQddEhj4sDZbeHFbziG30YAYwp2 qhKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 n8si2707799edq.213.2020.05.07.04.13.42; Thu, 07 May 2020 04:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727104AbgEGLJi (ORCPT + 99 others); Thu, 7 May 2020 07:09:38 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3843 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725809AbgEGLJh (ORCPT ); Thu, 7 May 2020 07:09:37 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 77D7E37C0B2A99914725; Thu, 7 May 2020 19:09:33 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 7 May 2020 19:09:26 +0800 From: Jason Yan To: , , , , Subject: [PATCH net-next] net: tulip: de4x5: make PCI_signature() return void Date: Thu, 7 May 2020 19:08:47 +0800 Message-ID: <20200507110847.37940-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function always return 0 now, we can make it return void to simplify the code. This fixes the following coccicheck warning: drivers/net/ethernet/dec/tulip/de4x5.c:3908:11-17: Unneeded variable: "status". Return "0" on line 3912 Signed-off-by: Jason Yan --- drivers/net/ethernet/dec/tulip/de4x5.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c index f16853c3c851..0ccd9994ad45 100644 --- a/drivers/net/ethernet/dec/tulip/de4x5.c +++ b/drivers/net/ethernet/dec/tulip/de4x5.c @@ -951,7 +951,7 @@ static void reset_init_sia(struct net_device *dev, s32 sicr, s32 strr, s32 si static int test_ans(struct net_device *dev, s32 irqs, s32 irq_mask, s32 msec); static int test_tp(struct net_device *dev, s32 msec); static int EISA_signature(char *name, struct device *device); -static int PCI_signature(char *name, struct de4x5_private *lp); +static void PCI_signature(char *name, struct de4x5_private *lp); static void DevicePresent(struct net_device *dev, u_long iobase); static void enet_addr_rst(u_long aprom_addr); static int de4x5_bad_srom(struct de4x5_private *lp); @@ -3902,14 +3902,14 @@ EISA_signature(char *name, struct device *device) /* ** Look for a particular board name in the PCI configuration space */ -static int +static void PCI_signature(char *name, struct de4x5_private *lp) { - int i, status = 0, siglen = ARRAY_SIZE(de4x5_signatures); + int i, siglen = ARRAY_SIZE(de4x5_signatures); if (lp->chipset == DC21040) { strcpy(name, "DE434/5"); - return status; + return; } else { /* Search for a DEC name in the SROM */ int tmp = *((char *)&lp->srom + 19) * 3; strncpy(name, (char *)&lp->srom + 26 + tmp, 8); @@ -3935,8 +3935,6 @@ PCI_signature(char *name, struct de4x5_private *lp) } else if ((lp->chipset & ~0x00ff) == DC2114x) { lp->useSROM = true; } - - return status; } /* -- 2.21.1