Received: by 10.223.185.116 with SMTP id b49csp1124912wrg; Fri, 23 Feb 2018 12:21:45 -0800 (PST) X-Google-Smtp-Source: AH8x224QNmQNGcz27I5M1WEC2ebuSe/orRV/uOdwfjHM0D7b64SwjcDAFLW7QGj8zXEeLxcROChA X-Received: by 10.98.117.139 with SMTP id q133mr2880278pfc.64.1519417305698; Fri, 23 Feb 2018 12:21:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417305; cv=none; d=google.com; s=arc-20160816; b=WnUyhR7j1n9AFSlX/86JIuyM4gvXDcQFAQYMumm6tHSqIoRRjkUgXZbVY3+doLz6f8 jlwPKYK6DDoFCpajX2eXlCg6CtT3enHPzPUfPBgMiAh2gRLxglHz9DlvBGM0i4nNNfiX 77zmMeqzpu6xcrSsw5hESknZuIsfhbefkHsYY1UOqZvv8navs9V/g+Gz6YNr2UNjJfsM Ps1oTHD6PFdk2EReu1ZHVPNbkUMiuMh8UWm5U5ff4HQ+Yit5xbhpEzDZGpJm4HKUyKkA fbvc0F04RfUHgaNxGuKGh9ugboK6xk8DeuQTds7dHz1Bp9euOCmFiXajPeei5g1Ui5En 52cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fcHJQDfNeQAw3PcTB+fGNhL0pSYoznIEy3JoO98a7pw=; b=el/A0GLvBz9uW+qG0fRujqgDa90R+UvK1k9GSWkDvpd87LpKPVeZ0D3Bly9XIy7x0Y P9yX3BUyorXpWlO0bQiQqUAhJqLZT7BuoHi3R/6JnXXKlC1ZaZ/3Cyu5cLlgS/KY1pz5 jwNWT0BPwzhEpDCOP40kgK6sCUAP+7vBc3wWqOMN5ybIb1QBaQteNWqx1zsPIo1IHeLK Zfa9HK0Km/ASwj17AyZ4oCggzhOIB3kes6DzZUABtSGwkbUO40h3q8I+wOp1y6s4hVQr F1fnygPJA9owUr9YdmaIuHjKYyrx1336q13grkSRTBIGRkwxuozgN6rAjWGvvL04pWpu r4xA== 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 u64si1913640pgc.295.2018.02.23.12.21.31; Fri, 23 Feb 2018 12:21:45 -0800 (PST) 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 S932521AbeBWUTl (ORCPT + 99 others); Fri, 23 Feb 2018 15:19:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39750 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753875AbeBWSjf (ORCPT ); Fri, 23 Feb 2018 13:39:35 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0C48B1142; Fri, 23 Feb 2018 18:39:34 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "David S. Miller" Subject: [PATCH 4.4 146/193] net: hp100: remove unnecessary #ifdefs Date: Fri, 23 Feb 2018 19:26:19 +0100 Message-Id: <20180223170348.766554154@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 747a11279a442b913a57bf38934879babab3b58b upstream. Building the hp100 ethernet driver causes warnings when both the PCI and EISA drivers are disabled: ethernet/hp/hp100.c: In function 'hp100_module_init': ethernet/hp/hp100.c:3047:2: warning: label 'out3' defined but not used [-Wunused-label] ethernet/hp/hp100.c: At top level: ethernet/hp/hp100.c:2828:13: warning: 'cleanup_dev' defined but not used [-Wunused-function] We can easily avoid the warnings and make the driver look slightly nicer by removing the #ifdefs that check for the CONFIG_PCI and CONFIG_EISA, as all the registration functions are designed to have no effect when the buses are disabled. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hp/hp100.c | 18 ------------------ 1 file changed, 18 deletions(-) --- a/drivers/net/ethernet/hp/hp100.c +++ b/drivers/net/ethernet/hp/hp100.c @@ -194,7 +194,6 @@ static const char *hp100_isa_tbl[] = { }; #endif -#ifdef CONFIG_EISA static struct eisa_device_id hp100_eisa_tbl[] = { { "HWPF180" }, /* HP J2577 rev A */ { "HWP1920" }, /* HP 27248B */ @@ -205,9 +204,7 @@ static struct eisa_device_id hp100_eisa_ { "" } /* Mandatory final entry ! */ }; MODULE_DEVICE_TABLE(eisa, hp100_eisa_tbl); -#endif -#ifdef CONFIG_PCI static const struct pci_device_id hp100_pci_tbl[] = { {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585A, PCI_ANY_ID, PCI_ANY_ID,}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585B, PCI_ANY_ID, PCI_ANY_ID,}, @@ -219,7 +216,6 @@ static const struct pci_device_id hp100_ {} /* Terminating entry */ }; MODULE_DEVICE_TABLE(pci, hp100_pci_tbl); -#endif static int hp100_rx_ratio = HP100_DEFAULT_RX_RATIO; static int hp100_priority_tx = HP100_DEFAULT_PRIORITY_TX; @@ -2842,7 +2838,6 @@ static void cleanup_dev(struct net_devic free_netdev(d); } -#ifdef CONFIG_EISA static int hp100_eisa_probe(struct device *gendev) { struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private)); @@ -2884,9 +2879,7 @@ static struct eisa_driver hp100_eisa_dri .remove = hp100_eisa_remove, } }; -#endif -#ifdef CONFIG_PCI static int hp100_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2955,7 +2948,6 @@ static struct pci_driver hp100_pci_drive .probe = hp100_pci_probe, .remove = hp100_pci_remove, }; -#endif /* * module section @@ -3032,23 +3024,17 @@ static int __init hp100_module_init(void err = hp100_isa_init(); if (err && err != -ENODEV) goto out; -#ifdef CONFIG_EISA err = eisa_driver_register(&hp100_eisa_driver); if (err && err != -ENODEV) goto out2; -#endif -#ifdef CONFIG_PCI err = pci_register_driver(&hp100_pci_driver); if (err && err != -ENODEV) goto out3; -#endif out: return err; out3: -#ifdef CONFIG_EISA eisa_driver_unregister (&hp100_eisa_driver); out2: -#endif hp100_isa_cleanup(); goto out; } @@ -3057,12 +3043,8 @@ static int __init hp100_module_init(void static void __exit hp100_module_exit(void) { hp100_isa_cleanup(); -#ifdef CONFIG_EISA eisa_driver_unregister (&hp100_eisa_driver); -#endif -#ifdef CONFIG_PCI pci_unregister_driver (&hp100_pci_driver); -#endif } module_init(hp100_module_init)