From patchwork Mon Nov 20 08:46:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13460926 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABB14C54FB9 for ; Mon, 20 Nov 2023 08:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232714AbjKTIrH (ORCPT ); Mon, 20 Nov 2023 03:47:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232478AbjKTIqz (ORCPT ); Mon, 20 Nov 2023 03:46:55 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E66A10DD for ; Mon, 20 Nov 2023 00:46:42 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32fdc5be26dso2663901f8f.2 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=SrQSzIIg4FbhweRWG+mQcPYERnV3EA9kOULVrqpY2su4h2sptH0tqewbb7bsz8RLy1 +NyUly/jeQI869xTwwgbKSeutQZ4ZCgQ5TLsox6Lq3RU41LeoM0nrQ2V3D2sIiUBHMgb JZirvnpZWGzPaNIiyjOsum3I4ZDHDpSZHjw+AbBeHZ4ZHgC1PXqf8pnvHtMUbpDrZfyh YnnxelK11SUpAKGE5K6x5N1cEpt23b/8f+ZiYiN+RTXYA/oqT/kBZcQrgLXQ0Y3BAcZc 2Vb7vvfROaYc8yuqDkXozM+Xhs1SGxR1s+fU298JFcSsJA9t3GAHdy+7ZB7+f20xm6TH PqsQ== X-Gm-Message-State: AOJu0Yyupn8XmCFH6ZKmvbrfShkRmTzmikC1VG+VJkcxD7qinYHr+/Lq HEZFCtLAnsqe1JAjlZQKZ8Ysew== X-Google-Smtp-Source: AGHT+IEAgykpFjgvqjsDJ9ujkx/pXzS0QC1Ua+yXU5aenNy6UwS04GrphPWepSLY5gmq7jYPGWeDwg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 Reviewed-by: Sergey Shtylyov Reviewed-by: Geert Uytterhoeven --- 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, }, };