Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp809142rdh; Thu, 23 Nov 2023 20:38:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHy3J9DM4wnBwwzlVMa+RdE+piq8gQG4WR0dEy8iJetA65Hr8rOk2jBoeZm/OogxTyGhWzZ X-Received: by 2002:a17:902:bd85:b0:1cf:6f62:88e6 with SMTP id q5-20020a170902bd8500b001cf6f6288e6mr1391698pls.37.1700800700790; Thu, 23 Nov 2023 20:38:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700800700; cv=none; d=google.com; s=arc-20160816; b=FVR9/Amc3qKSrsYk24Jcpfh47CLze2G3oKPmp3XqUf+UMWhNClvaak5xwFaLEl9ugt 1SQvR2h25ptbMckCXTa0k+K87vNEM3TZ2e864pNMU3EaYXZBC8ZyJX6b42LGLTW7lZgW OaaOvXvJlh2aMnU2uwaQuXwLbJjVqO+KBqPcwpvDgb7GNUOG72ndDiKe3U5aIDJER6B/ Q1D74BmNmQhjtLHTDRChs0IcN+QgGMpKyPhF1UAbIWUkwYZ5ghgjbaJKTyI48yLBxHE4 f9qBV+fYQIieeX5KNkRqehGTWmuyYAn3xhMR5xAFD1J9G/ZX4tTLoBbuuBAvpgWnvlGO P1DQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ezAPzcxWw8oaCnMq9MMaqVY5m8sIIEr0Duonqihjljk=; fh=nGBoZt4+kP3+rfkGrTC/iVeVVkp7LZlm3MgVwF0znI0=; b=kc9OTxjTC3Q3psDPo7Dkok3QXf8/Yt2i7iIgh3oayuNJ1Q1YD6W/zFwd+YedIPfWIO ZNY8rlF+TKO+4ToOb8kX4JUqms21ZdNP1EyE/KHNUbE5nXjJN7dhIR2czPJc++yVwa9w GaYdQzdDvO7Lec0VdwrQTCurdyRrmnL9mH+AK1ePLOh+Vsb2AXEIPodLWhieJtnAjtc+ bk9996BhumaAH+Lp+fu14DThEDiv/sGeDFkhgK64ZCZYE8GXbuMmoKb2TIkwfMc1b0DL mUoiuJ5sq1ISGDRBAbIU3ipST+UfqRzTg8iey61mKP8gTbT3m8eCOkgFTFmuNZ3TTRWE f9Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="g5Wn/FQ2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id h23-20020a170902ac9700b001b84335fb90si2557870plr.286.2023.11.23.20.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 20:38:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="g5Wn/FQ2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id DCB49809C934; Mon, 20 Nov 2023 00:47:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232588AbjKTIrK (ORCPT + 99 others); Mon, 20 Nov 2023 03:47:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232372AbjKTIqz (ORCPT ); Mon, 20 Nov 2023 03:46:55 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DF7610DE for ; Mon, 20 Nov 2023 00:46:42 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32f737deedfso2656069f8f.3 for ; Mon, 20 Nov 2023 00:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1700470000; x=1701074800; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ezAPzcxWw8oaCnMq9MMaqVY5m8sIIEr0Duonqihjljk=; b=g5Wn/FQ2SCHrMFOlQK69E2fXGkqdPXGOtq+BnN16UECyS9OIc7JxZIr/IcCSh2nlVQ exWMW+ADLQDiPmJWVGMsqZkuIzxTn4KKpjQBycfeoNQiiUrzor3tUywlUp6MBuiye0wN 3DufUJ5lpJd06fdKoMAWSTOE9M9B3xHVWfThe+XOPJYPmsXe5KyNv3UmcG0Oetld8ddI qJsTAoo75c/q6g818gsJWEtY2MTMnvZZ7n1+k89ZfYfDnSnzkEzCax5xoNguHeiTQ15d LvqzjZldC6scJOgaUdBzq5qWWdvjuredeutRpV18+APhn1oKVLOCW6IUcgRXoMS5yr1g Veaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700470000; x=1701074800; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ezAPzcxWw8oaCnMq9MMaqVY5m8sIIEr0Duonqihjljk=; b=tCsbx3towipRR0ICQMbKi8X0bCLbJRNC86eDs6Wlo90kviggI6RYNvLbVjMFeM2DUd LYImtXRR7lw5JvhYuv1ZmO32W+NkhX+//1vmaTPZH4Rp/F/wpWJvvBWLxQo5jFziFOJm IqKMkg4wKeQ5gJSD7nQuHS2JHSBl/LbmGoF28ekvtSuLBGf9CiCm6302SuYvMDmLCF8F RmVeHxYdd7+TtYvKPbNS5Db9e7pIpynoIa3+v4po/mLyWVcu1iENJ30xFL02C8iBEWG4 YbX0f/sa8016MPVxiuhIgfHG6rhqM2zFOwX1BpKfyUN8+lPL4RB6hc8yBIZre9+/lkHf KzXw== X-Gm-Message-State: AOJu0Yzz8Tkc0OGgAMLFTbwPerCxBUoKB4v80I+W1FL5NSzLSBRaA6LU URPh5s/ZG2yESSmnEKO9L0EGR2pW7ukFoIJzPII= X-Received: by 2002:a05:6000:1001:b0:331:34c1:7a0 with SMTP id a1-20020a056000100100b0033134c107a0mr3949148wrx.57.1700469999993; Mon, 20 Nov 2023 00:46:39 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.183]) by smtp.gmail.com with ESMTPSA id b8-20020a5d45c8000000b003142e438e8csm10435267wrs.26.2023.11.20.00.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 00:46:39 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: s.shtylyov@omp.ru, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, p.zabel@pengutronix.de, yoshihiro.shimoda.uh@renesas.com, geert+renesas@glider.be, wsa+renesas@sang-engineering.com, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sergei.shtylyov@cogentembedded.com, mitsuhiro.kimura.kc@renesas.com, masaru.nagai.vx@renesas.com Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea Subject: [PATCH 10/13] net: ravb: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Date: Mon, 20 Nov 2023 10:46:03 +0200 Message-Id: <20231120084606.4083194-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231120084606.4083194-1-claudiu.beznea.uj@bp.renesas.com> References: <20231120084606.4083194-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 00:47:42 -0800 (PST) From: Claudiu Beznea SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated now and require __maybe_unused protection against unused function warnings. The usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() allows the compiler to see the functions, thus suppressing the warning. Thus drop the __maybe_unused markings. Signed-off-by: Claudiu Beznea --- drivers/net/ethernet/renesas/ravb_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 8874c48604c0..15fc494a8b97 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2953,7 +2953,7 @@ static int ravb_wol_restore(struct net_device *ndev) return disable_irq_wake(priv->emac_irq); } -static int __maybe_unused ravb_suspend(struct device *dev) +static int ravb_suspend(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct ravb_private *priv = netdev_priv(ndev); @@ -2975,7 +2975,7 @@ static int __maybe_unused ravb_suspend(struct device *dev) return ret; } -static int __maybe_unused ravb_resume(struct device *dev) +static int ravb_resume(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct ravb_private *priv = netdev_priv(ndev); @@ -3029,7 +3029,7 @@ static int __maybe_unused ravb_resume(struct device *dev) return ret; } -static int __maybe_unused ravb_runtime_nop(struct device *dev) +static int ravb_runtime_nop(struct device *dev) { /* Runtime PM callback shared between ->runtime_suspend() * and ->runtime_resume(). Simply returns success. @@ -3042,8 +3042,8 @@ static int __maybe_unused ravb_runtime_nop(struct device *dev) } static const struct dev_pm_ops ravb_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(ravb_suspend, ravb_resume) - SET_RUNTIME_PM_OPS(ravb_runtime_nop, ravb_runtime_nop, NULL) + SYSTEM_SLEEP_PM_OPS(ravb_suspend, ravb_resume) + RUNTIME_PM_OPS(ravb_runtime_nop, ravb_runtime_nop, NULL) }; static struct platform_driver ravb_driver = { @@ -3051,7 +3051,7 @@ static struct platform_driver ravb_driver = { .remove_new = ravb_remove, .driver = { .name = "ravb", - .pm = &ravb_dev_pm_ops, + .pm = pm_ptr(&ravb_dev_pm_ops), .of_match_table = ravb_match_table, }, }; -- 2.39.2