From patchwork Tue Sep 7 13:10:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 507557 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp4215481jai; Tue, 7 Sep 2021 06:11:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3spR+J2wk5qKg+9TlVs/fBm2FehipJA7Q5VQe59cfWDxT5aW3Fm2IzAOyIAPH8rBd/aj9 X-Received: by 2002:a6b:3e89:: with SMTP id l131mr11504629ioa.74.1631020257612; Tue, 07 Sep 2021 06:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631020257; cv=none; d=google.com; s=arc-20160816; b=mm+Lc708K6E9yhYyyNSBeprbEg1YWdj1l2SLE8m3+MbQPncHX8StoFORRNCDFdOShY xznmforD6UIsiVzHT1QqQsrONUb9nPrI5Zx7FQQEVLQn0SZgaX71vQ6AK7+vCoIN71PO Rnu4pqyw/5elvBwU0t7DDNj+DP6M6I3OsIc1iZd3XV0PqQKGMuL3Y9F/6lf3Rj6JcuV4 LratbbBXw4odpe2niqPGQEpNId5uvI4ZzNiKx4ArQhvcOvKviIAb4tu07f7TV8oNllxL p68KjEFshAziKBivxYcy8VDQHdgSAlEbneAs1r42UPYFKK4PFMzIWOoLE6374Er4K9S2 n7sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aP6DUbNNtaS3laSqlI3mQoJds/u8SwpSMz2HEuGr2Jc=; b=Ubd8/YvK7Nyyx06EAjrtfcMzApy3p/Iom7y3SlZAA6srS3vv+wA9ZIqY/gFx8gn/Ei fq2PgAyMxCDbhJBFOM8MlA7NsIHvjO52f0FIvsRTCo3cfgt5YLze0JO/En8dAhpZJkjN Ki2LXGjW7UzFhaoLFIqVUBW0p6oXThZk027Edxfw8cU4+aqUwlKeOvTOQhNIW1NhfM6S lEHQur4uoe7ie3hMb1wqxucLML5qRsd0HWqLVgwpmopQxhnT6cqZB+F+THs3eQwYi4WS VJrrr86itRgQ1I06cHzkBufbgt6AkCp/y3xQUNOSRxIemzMY5C73oTszdhSZVx51uFiz UBVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WKyM1BLc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si9530118iox.32.2021.09.07.06.10.57; Tue, 07 Sep 2021 06:10:57 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WKyM1BLc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344706AbhIGNMC (ORCPT + 8 others); Tue, 7 Sep 2021 09:12:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:37748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344579AbhIGNMB (ORCPT ); Tue, 7 Sep 2021 09:12:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1BC17610C8; Tue, 7 Sep 2021 13:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631020255; bh=Rz4hO5BCGbbFRWC2Nk/lcOLcGQGu2pIVCHJHZv8S3Gg=; h=From:To:Cc:Subject:Date:From; b=WKyM1BLcBEz+7Ut1+BSJQqK1I5IO+KSJ9+X/kL0LMyH1bC227Dbkq5bjr+285Ye+J K2TYwcAaxotF1zoc78dAE7KCT1/7lOrmoFo6D7RAErdq63oHgAceg3MxDt4kJMqPr+ 4Ml3GJf0jxhzH+8l/Nm3t6rb2F8hLpU0ysOqkVmJoICoNKVU4zQTOSAPKDh6G6juS0 uxH95HR/fc7OaAibjJJd5PX4ZY0rGGTx7YRJyn6GBwbE9Oy1VKjIRc7p8UyMf3bHrG 5xLSQmIRfNVXJtCGr6n1Bd2bUAOK7O8Sdh5XeJh67o6WdIBUcfAdJu46RWHC+bp28+ 5DstxAJsLOXxw== From: Arnd Bergmann To: "David S. Miller" , Jakub Kicinski , Arnd Bergmann Cc: Geert Uytterhoeven , Armin Wolf , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ne2000: fix unused function warning Date: Tue, 7 Sep 2021 15:10:30 +0200 Message-Id: <20210907131046.117800-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann Geert noticed a warning on MIPS TX49xx: drivers/net/ethernet/8390/ne.c:909:20: warning: ‘ne_add_devices’ defined but not used [-Wunused-function] Move the function into the #ifdef section that contains its only caller. Fixes: 4228c3942821 ("make legacy ISA probe optional") Reported-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/8390/ne.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) -- 2.29.2 diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c index 53660bc8d6ff..1f7525f55994 100644 --- a/drivers/net/ethernet/8390/ne.c +++ b/drivers/net/ethernet/8390/ne.c @@ -906,22 +906,6 @@ static struct platform_driver ne_driver = { }, }; -static void __init ne_add_devices(void) -{ - int this_dev; - struct platform_device *pdev; - - for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { - if (pdev_ne[this_dev]) - continue; - pdev = platform_device_register_simple( - DRV_NAME, this_dev, NULL, 0); - if (IS_ERR(pdev)) - continue; - pdev_ne[this_dev] = pdev; - } -} - #ifdef MODULE static int __init ne_init(void) { @@ -953,6 +937,22 @@ static int __init ne_init(void) module_init(ne_init); #ifdef CONFIG_NETDEV_LEGACY_INIT +static void __init ne_add_devices(void) +{ + int this_dev; + struct platform_device *pdev; + + for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { + if (pdev_ne[this_dev]) + continue; + pdev = platform_device_register_simple( + DRV_NAME, this_dev, NULL, 0); + if (IS_ERR(pdev)) + continue; + pdev_ne[this_dev] = pdev; + } +} + struct net_device * __init ne_probe(int unit) { int this_dev;