Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1339322rwb; Thu, 15 Dec 2022 08:59:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXsc8toXKT7LqmqJ2V3M4O5BMNpBXqj/Rh0e8y982aXEvVbn72WPh3h06R5pTwseS0eT1aoM X-Received: by 2002:a62:e117:0:b0:57e:c106:d50c with SMTP id q23-20020a62e117000000b0057ec106d50cmr49054pfh.17.1671123569861; Thu, 15 Dec 2022 08:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671123569; cv=none; d=google.com; s=arc-20160816; b=XP9XsKBdWhU1DrezvWwbCDI0tRXcJcgVJT4VYF16mXVlugshbgUyODUvJfZM047X97 FEQ28OpQLx4uJuNq9XXxqECpqn3ovkyhlFqqcBfu9ly+vk+kUr0tabeKoB+/LoRpiHht s92TmRu9JcSdja7dFbrya/Myt3R8hAGgY9UwXz1ohAHEiy8v1kdqZmQvMGkfy+Vi6fPG D4hmL+FuUnFo+xLk8tj0viZE7Pwgz0RSfOQldwLItcqKmvm78hYjKeNYYyMnAP3aJPIS HRaBpGP5LgCHNa06IMr7LHcgy0eLECpggKMrhwTGAbRGVRzXIVuRLKQRLMZHdoib9AHI pKew== 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=qbl4EKWC7GdCS8JljR1OczTIOydw1UDMA8P/EW1IsXI=; b=CSEZ23Xd+WL32n0YdEp2gvy0VUSPYzn5fULlvfi0/Aher7FGfneem+ZYl5lh532JWd J3+gUgXGslXL95EiOsB0oQHer6ZR/S1PTq4QOoiF1TNjHhYqcDisL8/dLRHOfW23oRc5 1IfE6ZNMRhb9/4dcbRpp9mSvu5laLfRIbG4L5y14fXcSKs6RcSlAamR0e+BRs/xOoSsj 3NH0Xsq0WqrZIw5YbXhBUVq/S8r4uHsmc3stebeqhD4Yw0SVzAHCtSyAbZU/euZYJxY5 9LgutDX0uLYKtueDiEj0pwE9Xwf1HbdY8f1zDM33yQZY+BOPIQiw326qiqxhDahC6eqv aiqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cB66ibYY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a056a00084100b0057e8cef6f3dsi532808pfk.247.2022.12.15.08.59.21; Thu, 15 Dec 2022 08:59:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cB66ibYY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S230131AbiLOQj3 (ORCPT + 68 others); Thu, 15 Dec 2022 11:39:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiLOQj0 (ORCPT ); Thu, 15 Dec 2022 11:39:26 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D764D20F50; Thu, 15 Dec 2022 08:39:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 91A67B81C0F; Thu, 15 Dec 2022 16:39:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BD6EC433EF; Thu, 15 Dec 2022 16:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671122363; bh=2OPO4m4zGufDKQ8laFBnT5+ykmpwqmAwuJDyZQqQLAs=; h=From:To:Cc:Subject:Date:From; b=cB66ibYY5YG+vvmy4HAotIH2AcVlI5B87zecW1Ia36abgl+C2N+RQx7qZEkLjp5Q9 /uvyeOsuCc5grEphZqY1uC6uBCxqFAszRqpB7cwZvq2wNO/jrrJofbqxeWk5e1Ciil kAZzIsNrupTaJJVRMZvw32WMlLZ5SJJfi6nX/99PuOKBTqo76kaQGudWeSRbO0FK9o n6f9+YlPJXYiJjdr1SvE1OiXvZ4cJoosoNQQPPUKeqv1Ggy0IuN3RQ3cZhKafw8MUq FLBvRCbBQGpnKJDclKd97FUN9lMAKWQbJR45QrzVTq6oPdpdFTVKkFo+fmkyfvJ2TX IvL7UqYa4H4Qw== From: Arnd Bergmann To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Arnd Bergmann , Roger Quadros , Siddharth Vadapalli , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef Date: Thu, 15 Dec 2022 17:39:05 +0100 Message-Id: <20221215163918.611609-1-arnd@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann The #ifdef check is incorrect and leads to a warning: drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_remove_rx_chns' defined but not used [-Werror=unused-function] 1679 | static void am65_cpsw_nuss_remove_rx_chns(void *data) It's better to remove the #ifdef here and use the modern SYSTEM_SLEEP_PM_OPS() macro instead. Fixes: 24bc19b05f1f ("net: ethernet: ti: am65-cpsw: Add suspend/resume support") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 9decb0c7961b..ecbde83b5243 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -2878,7 +2878,6 @@ static int am65_cpsw_nuss_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int am65_cpsw_nuss_suspend(struct device *dev) { struct am65_cpsw_common *common = dev_get_drvdata(dev); @@ -2964,10 +2963,9 @@ static int am65_cpsw_nuss_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops am65_cpsw_nuss_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume) + SYSTEM_SLEEP_PM_OPS(am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume) }; static struct platform_driver am65_cpsw_nuss_driver = { -- 2.35.1