Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2959021rwb; Fri, 16 Dec 2022 08:27:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4jB7lqysj4y17dnfsD3Fc566nIFwKc+9jcPhErQAvC4Jhh6C+9A/BpYWkf+cK5IiIoXMAr X-Received: by 2002:a05:6402:4510:b0:461:1998:217f with SMTP id ez16-20020a056402451000b004611998217fmr24846372edb.4.1671208061289; Fri, 16 Dec 2022 08:27:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671208061; cv=none; d=google.com; s=arc-20160816; b=dH5zz0nY0nI5FZO3ivoBIO+aRVUvZk7EkATVGFcqcmCB5s76mx53VQ3zKmNOco4l3/ tuIQnO+3IE0HDnSw3jkArD2qmrquKHsnQXz3XLuYQb1O+batQnyEIzZl4gMFqRWrTPMN 0XWpB7tkYLNfFQUwHLEdbmGLHvZLd071YdiI5SLZ+Yuim30SPTp0W153UlHWPAHVlD+y jvRgNO6k+LP0kupFn6P/FcjwizL24iQp2azHaS/40hzycYlQk5M6yPLG5e9KdSbwDdCH 3U4iKuyX1eW0GX6B8Xls/6o2JxRd9CzU6nkuAoEHBHnJLjV0Jb31roYse7M87pLreD2C 9wzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=nRLE0KwusSvAiIcLR1vSOUa6NaXkWQIhEtVspgyp8bM=; b=VwMn/xQaLWVhYXS3Q12Fe7VXmfvwr3slp3Yv343viBujxiK0E6IkdPYbsdrW3AQTuy 9QCmqSSOt2MrEHsEPjBtEhVB93pbORz5g6f60/52YtCDAL0J4Yzz+IZjJMF4KhKYrloe MbOZqwPVsrvTrjsohIZtb+nkeejg20u76CtYDw5x1rNPvix7cgsZHCox5AcbGIUm4q3D r5Eq7GSTWP95Its07EUuEJbE2OS7sr4tyxxk+v+sXjB28s2u48j60K5FCxWFXvM5LVuc zBBiKfdAkXhlnElvZp+bnBESEXejXyBBiXAyJyA4XNgHKeX+4ydjDgxBJ73WQItoOHii w8xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ArFOblj7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p20-20020a05640210d400b00458c5c47070si2459426edu.234.2022.12.16.08.27.23; Fri, 16 Dec 2022 08:27:41 -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=@gmail.com header.s=20210112 header.b=ArFOblj7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231742AbiLPQOs (ORCPT + 68 others); Fri, 16 Dec 2022 11:14:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbiLPQO2 (ORCPT ); Fri, 16 Dec 2022 11:14:28 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAF578FEF; Fri, 16 Dec 2022 08:14:26 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id 4so2792331plj.3; Fri, 16 Dec 2022 08:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=nRLE0KwusSvAiIcLR1vSOUa6NaXkWQIhEtVspgyp8bM=; b=ArFOblj7GBSNP1bX2BEOHs3j5CV+HIMEX6xuqSPMbb5kMug16IN2fmgbXY9AsrpD3A qGMR2zm4kt/Np8Ls/76e4VoRDPHy89b/gT9Y/OlyC4BhYPDMRLm0LXKtaERaR+gadXn1 Dg8hZyO0FUXBEp7X+j2tyTBlgXuVnMhqfjN2c9V1/Cx7ur0lMi9QrU8HPODuDaRmtrgn YGX9lbVy4VUtvbzmBYNi/d2FnrZ5YB9ryV270huDwwhJNPCrTuSjdyPuE3og8t12d8/5 qzWFXaEjFfnE2Fxca/XjqfQHBqsXsYfNM+4D9NwWuHZkHoyVc5ErVzI9bZilnXTB6iFn xpng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nRLE0KwusSvAiIcLR1vSOUa6NaXkWQIhEtVspgyp8bM=; b=sXvMO2jJms02RgO5GjUcjbwL6kpG1TMOXS7sFXn1UoyhRmIKIpvEHFHK6+nIG+5cM5 bPqr/61kkR0y+sJOEd4Iol1ZJDWtNVCGl0+WAg3FTkRC1U/ykvjzTvyXJ0+YQlkNGNyM xC1Aj+fwDm9oSNa6aevv/vgUbAdxZOqpKd5qQK4jQKbXFV47KXBfFDTHwMQ0g5pW3lw8 CH/si3Bc7jn5vDXXFjUsd+a7MgKb2Km/v3cDMukABArxSiNaL4aYSdJj5fFTFVkQrMjx Dd09ZwlH/UNKw/NCJgX60yowkB1G3k5/9Ab1C796KDjRvIJ4KxOzbAo0OBsH93hugliz BdVg== X-Gm-Message-State: ANoB5pkwRETTYrrC7ABekQN0x2w990JlpRdXLsDLqbkRdgle9rbgHqDC F8dTuoDxhtOMeS7ej42NMzc= X-Received: by 2002:a05:6a20:9f96:b0:a3:9f32:a9d1 with SMTP id mm22-20020a056a209f9600b000a39f32a9d1mr42376731pzb.31.1671207266337; Fri, 16 Dec 2022 08:14:26 -0800 (PST) Received: from [192.168.0.128] ([98.97.117.20]) by smtp.googlemail.com with ESMTPSA id f10-20020a631f0a000000b004790f514f15sm1648371pgf.22.2022.12.16.08.14.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 08:14:25 -0800 (PST) Message-ID: Subject: Re: [PATCH] net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef From: Alexander H Duyck To: Arnd Bergmann , "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 Date: Fri, 16 Dec 2022 08:14:24 -0800 In-Reply-To: <20221215163918.611609-1-arnd@kernel.org> References: <20221215163918.611609-1-arnd@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Thu, 2022-12-15 at 17:39 +0100, Arnd Bergmann wrote: > From: Arnd Bergmann >=20 > The #ifdef check is incorrect and leads to a warning: >=20 > drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_= remove_rx_chns' defined but not used [-Werror=3Dunused-function] > 1679 | static void am65_cpsw_nuss_remove_rx_chns(void *data) >=20 > It's better to remove the #ifdef here and use the modern > SYSTEM_SLEEP_PM_OPS() macro instead. >=20 > Fixes: 24bc19b05f1f ("net: ethernet: ti: am65-cpsw: Add suspend/resume su= pport") > Signed-off-by: Arnd Bergmann > --- > drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ether= net/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_de= vice *pdev) > return 0; > } > =20 > -#ifdef CONFIG_PM_SLEEP > static int am65_cpsw_nuss_suspend(struct device *dev) > { > struct am65_cpsw_common *common =3D dev_get_drvdata(dev); > @@ -2964,10 +2963,9 @@ static int am65_cpsw_nuss_resume(struct device *de= v) > =20 > return 0; > } > -#endif /* CONFIG_PM_SLEEP */ > =20 > static const struct dev_pm_ops am65_cpsw_nuss_dev_pm_ops =3D { > - 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) > }; > =20 > static struct platform_driver am65_cpsw_nuss_driver =3D { Looks good to me. Reviewed-by: Alexander Duyck