From patchwork Tue Feb 20 11:55:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128887 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4555823ljc; Tue, 20 Feb 2018 04:00:49 -0800 (PST) X-Google-Smtp-Source: AH8x227ajaltNZtgho8g7s7LgvE/3Ow0NIP5dBh3rPh2EpcSVB4zhaie03IBevL+ae+xjfmqNyd+ X-Received: by 2002:a17:902:9343:: with SMTP id g3-v6mr17579334plp.319.1519128049227; Tue, 20 Feb 2018 04:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519128049; cv=none; d=google.com; s=arc-20160816; b=SUeEg73eFFTcuq+NByLUweMQf/QPcYgT9z2iwxS6rlXvPD+ip7JMZ5Y4wC+qPVK5Nh K3ifJNi2IMiVNJtKjnmCVyGRaqOGmYgBuBdR3abRSd5dFIW4QidolSNtwMgFvEl2kbzC RP5NoDreYWSZ1uQg8HD31NYfKwY73xPUNk50CzdC1jwfMgCi4wUDYk5kpRuqMk7p33Zq q/Uh9TXyNQ5IwWA+Fer660TOg9MMGoNaWz87wu9fQ3ovcJDxcpnZHnQ3/18GpGqLK219 EJ9A0FV+SpBwVbUIIBttEYqD7QYjXnkNZ1euc9WaugywYSZEbTmyWY9j1VMl+EDyhgUw viNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=N6EkZMfuUIwnmqw8jJC3FYQ/PwLQpvATtKpHkiK5JeI=; b=K+TG1mUALF/3cwC3tiydR4RtdY/cafsyLh1W2bmORS1RRZLSU+9IGuMx9WecH+Uwf6 2G/NGBUQvp/Y0fcYwaNNwg6GYC23iKAzsHLaSvRluFdNjbGpDRXAS8rsfUweO3nIGuf7 YRUgm+2znQAx0ex0tb/GNOPo6DBf23cIPeTTlutCHUUgZKtcaF60U5IY7qR954daB9nY rdNZ+uC1OJWT1QDMiqe3OF21kZHzEDvaI0ukCwZQgkZa4q/5Up5bb204rWILAY4Gklxt FliNCq/G1SpCUyxLq49h1W2rjLAMn1la2GDWLal9yIFHD123y2FuRA3bO1SQJ/lzTVuc qp4Q== 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 h7si4589028pgc.827.2018.02.20.04.00.47; Tue, 20 Feb 2018 04:00:49 -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 S1752129AbeBTMAl (ORCPT + 28 others); Tue, 20 Feb 2018 07:00:41 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:48581 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbeBTMAh (ORCPT ); Tue, 20 Feb 2018 07:00:37 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0M5xYf-1eZC7x04Fd-00xtZk; Tue, 20 Feb 2018 12:59:56 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , "David S . Miller" , Jaroslav Kysela , Fabian Frederick , netdev@vger.kernel.org Subject: [4.4-stable 19/22] net: hp100: remove unnecessary #ifdefs Date: Tue, 20 Feb 2018 12:55:06 +0100 Message-Id: <20180220115527.1806578-20-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:JC12E5hMP2Urpc49WTS1pU8OIt5BwY+2oKik/gFcb3uI55adkG5 ZJ+Tkw+nt5mnr7RxVSSceSFjHoXsN04RKCf54q6lM5umWYxkTebkHtitHy8MvguEUznnWRB PPLOkJXu3rqulR632AAiRzZdClrf5mZB7E+apa2BbM06bef1bmfqi1IEHmojYLWg1BOgOF3 cqMr3HymP4F6+iofd8jSw== X-UI-Out-Filterresults: notjunk:1; V01:K0:RzR/48J6zoE=:JsDqr9tOAWKRRJa51YyOz7 myHAeRQiYA9vwO38j1Y+JRiQdQefXeToen51YPteZkVSdsNweyiUKZwAfGRvEQy89aF4NNQ8A BLQZgYSc8g+qZmlWMrnZsT74BoxJsV/oXwd6LuuKgdGVPAElGnao7lpftv1quICuUlV457fYd m6kGkXV5SFma6Kdf8/fgb2yrq3Bu7Jp0nnDS0BTBVX06VP820Wg7Njt7oNAEKEecxKFAk6GEn i0CTmNsH06/2qgMIHIRm7TuSGtG0+hfyHI8esUvaAuBirEWBk73cIeWopL90hg8ruOfa6LZXZ 125LTO9+yPBcQOwb8d+WicWM9qOHH/LQ0TVdE7NCydnD97Hu8JRoavUZzsH27A/I/uGVAk//r g6BsMlcTLEDsl8vmGnRoyw/YHioT8BF14HHng4KfPKyXRTKA2+dyOkeM5uydjTOyhz3R0ZrgP Y4qUndRHtpTRjppg2gXDsCaUsA6WTg2ZmYevCnQlty0kCnNoTQuxNnIXPotcHX+TJBiBQSIHg SL2kKd3mbkaDKnofgCCg5cHfN52VU2gjwtwZLNpLZFjbN+zt3ousgNw0XH9OPd6yheniHu2Lk uqbnMvwviD32tCGulBiJIptOlG4Fgd6wDwMZP2FEF9XwPWwO3tHTpJ/Ug+ghwDKC9EBGb2nvO oI87Q6t8SVjYMr+DRNT1hGCBt1hnphUTSJ65oO1/6ZahQC7YvEX3xX+ClEeRHNOtNyg6LzQJI qoa/frm9TFaHD9LkQE/2/Wtt2LpqpYBkP7Pdew== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Arnd Bergmann --- drivers/net/ethernet/hp/hp100.c | 18 ------------------ 1 file changed, 18 deletions(-) -- 2.9.0 diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c index 1d5c3e16d8f4..3daf2d4a7ca0 100644 --- 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_tbl[] = { { "" } /* 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_pci_tbl[] = { {} /* 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_device *d) 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_driver = { .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_driver = { .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)