From patchwork Thu Mar 1 15:27:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130312 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2953626edc; Thu, 1 Mar 2018 07:39:36 -0800 (PST) X-Google-Smtp-Source: AG47ELsxib0+vZj1O45q0S0yBYc1Uc4x4eFzR3/17Q6WJbuCpRFJ2n/swHKSRDvWTNHA2lUI1BCt X-Received: by 2002:a17:902:5609:: with SMTP id h9-v6mr2302734pli.302.1519918776762; Thu, 01 Mar 2018 07:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918776; cv=none; d=google.com; s=arc-20160816; b=v57yXT3J4eQj8+j9mQlbx/ivKwvatUi+V8DKL6Ckb6T3Q1jNwp6jP7dSwaDZbxijpZ D6cHqEN/Z1ykAIKMKLteL00gMfoUdPXev/Pk4A+sh7+oO4E7KMNKb8n2H2USiiCfOkUS LVZuePIjzXGZnBuxsRF+Hst6HYdUUljtazfmjwyt5wcW77Sc917i6sv3A+JLNzpMTgJA c8dhy4jRER0nsr6SnyzFC+3Zgucy8lB0IVRojNCToTUCcgOXPpzQTJbOJoa0JRCEUiu1 4YXPG8Aa+KPHRVxxDzULpShisGjCxM61uYmh3qkva+oB9aDXYbRy4MXCzFhNFxMJgKE/ 7ZUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=co5hFcq6sGrJ2bg2DBuBBcPF1nWihvcFA4IHdzJDl00=; b=hgGO1C2K9tK4gETooiphID3iAtsSr+JinQkSeTi73Kx+jHHceZgEhNUs+NjzilQ6a+ O3JSLTY7BK1QMOvYz3Sxgw9ewcrynfrHhjKVgqjbkeM1Xm01YiWM8Ea22u90UPKRB8UQ i3MrsWEFRyFlz37iassXgnQhxK23Z7byE00O1kYnKuJgDqicbZhtE6GrBAgkbyeHgrrY PXfs6ADikU/TLIKlfxR3UC6c4kKdoFku/k4Q0fgzhDQ1PEGOiCWQXf46mpXESP4yv+rX P2HjvzIg0312dKz5qalYiiBJ7lYr89jSlJY0rPkPOzDTIMZYCJkCWQnn+AuZ2hW1mnOB i+0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=MNtnjfyh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18si2606550pgn.103.2018.03.01.07.39.36; Thu, 01 Mar 2018 07:39:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=MNtnjfyh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032606AbeCAPje (ORCPT + 10 others); Thu, 1 Mar 2018 10:39:34 -0500 Received: from mail-bn3nam01on0096.outbound.protection.outlook.com ([104.47.33.96]:49984 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032394AbeCAPjV (ORCPT ); Thu, 1 Mar 2018 10:39:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=co5hFcq6sGrJ2bg2DBuBBcPF1nWihvcFA4IHdzJDl00=; b=MNtnjfyh6rSrUuP800aYw26/R68GhB4TOzUQ6NG4jiEL/eG26A1iEac8+DARxGmv56xm5nohHRYFeJteZWmYqM36AdGNaZUXx/+tUY4snxDyQaCl/xeSp+2xZbB0J0mmtnDF/mswh8u7W8ZITrmqsTHpwjxil7zt0MLemAIdlxU= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0902.namprd21.prod.outlook.com (52.132.132.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Thu, 1 Mar 2018 15:39:13 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:39:13 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , "David S . Miller" , Sasha Levin Subject: [added to the 4.1 stable tree] net: hp100: remove unnecessary #ifdefs Thread-Topic: [added to the 4.1 stable tree] net: hp100: remove unnecessary #ifdefs Thread-Index: AQHTsXHV8k9a5bUsVUCe3Yel0SAF+g== Date: Thu, 1 Mar 2018 15:27:40 +0000 Message-ID: <20180301152116.1486-485-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0902; 7:QdiDXTKDxcf/uNwDyC4ZAOdVZ7MbcoZreHJMcIc4GkXV9Rj/pNEAmNsyiOPRmi0x6unoM88S2wm/rYOlnL9/s7B+L9gI3gOeL4lhf1ez6mVpV7lErm4NDBEhRTiEgEmPR6N1iHJZHzNE9F5IKQEPG/jr83E2wIowqQ/mfQYTz/eknqiyjID1jGTEOrK7dtWvZnQSeIYbMEcTWM2ztSiMwwKMAr3cGfw+KdbPXnFTmsSYKZvnsONqmoBhChAi/A58 x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 49559274-a6f3-465d-d429-08d57f8a95d8 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:DM5PR2101MB0902; x-ms-traffictypediagnostic: DM5PR2101MB0902: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501229)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR2101MB0902; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0902; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(376002)(39380400002)(39860400002)(346002)(199004)(189003)(6116002)(72206003)(1076002)(3846002)(25786009)(2900100001)(36756003)(14454004)(316002)(3660700001)(6666003)(54906003)(110136005)(2950100002)(305945005)(7736002)(99286004)(5250100002)(86612001)(10090500001)(107886003)(66066001)(106356001)(2501003)(6512007)(6486002)(97736004)(6436002)(22452003)(68736007)(81166006)(8676002)(81156014)(53936002)(186003)(26005)(105586002)(3280700002)(8936002)(76176011)(478600001)(4326008)(10290500003)(86362001)(5660300001)(2906002)(6506007)(102836004)(59450400001)(6346003)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0902; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: g5Tu6g1s8M4jsHICYyWVeURAT1XqiLzLZadq+Tsdf438hLLEnNtnA/wyYEBwYhugNYdRp/8PqiHzLaxNZGu4zmiFTeU+7kCJRXahYNkWbGwwbczHZ7+47oxgO456LApQ+gpzN7Z8DgJuSmuZ/5GioNyQlWwl7HPU4g6PwYsK+74= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49559274-a6f3-465d-d429-08d57f8a95d8 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:27:40.1622 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0902 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit 747a11279a442b913a57bf38934879babab3b58b ] 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: Sasha Levin --- drivers/net/ethernet/hp/hp100.c | 18 ------------------ 1 file changed, 18 deletions(-) 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)