Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp8955rdb; Fri, 5 Jan 2024 00:25:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbOlCqGNwOw35gDrtnMrd9SjUQJGIg1914YaHe/du09FZ/6K+V2487493AsFfZniKsC/vQ X-Received: by 2002:a50:f611:0:b0:557:2a9b:d510 with SMTP id c17-20020a50f611000000b005572a9bd510mr126076edn.130.1704443140643; Fri, 05 Jan 2024 00:25:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704443140; cv=none; d=google.com; s=arc-20160816; b=R0rV7sBiBv3Z/8xjb96/WSbn9JdQ4Bvw82npva1qTkIEmPgwvRxaIiel6td1oyOi9h t19pSlwMdBwmM41x312WXqWcTmM3CaEZ5hWVqAsd9aRCf+m7sbEtEoTLL8e4aHB7QJos FKCrFWDvLAgP2Mkdf//D95adcTDHyGrzerDAxTIrlFx66ucHHbeG985xgzyuYxvSdIwA 9I7yb7O3HO5dzYpbitzgk+NRVe8rKCQSx76oBk8JinBBTrXXsf+iU4af4zBRk3MT4PsJ UbjU1V7tONfGIf7cMWo2v4b9MZyvbDjvwbwNnjOt5ofyfA/rPWhzW15kw6v18myvL+Bu +slQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tDs9Akz57womT08DVky7rFMtepErNq8iSOIi4YmQXqE=; fh=qryrdWWtksp4Ojh0keXejXriHeHARah4mOGZkuZ1jnk=; b=H512jjLyNoikOty4Jv71D7xl8wbJulIFsI3ijImVf0+Qr52uxgOOyVPLtLVv8D7SlM QAtWBBt/tcVj1Op3Q69tR+0v6fCNi4ioxzlAGjV+vIAHe8WUWqpdhCkNG+MgDcnvyTL5 UQMqdrLfzNb8hpZex+MF8dR2d1PXJpSawzvDiDZanyP8qcEakixJDm3uZF6+z7NY4Rxe hl+DpOMMkGzGpNcCYElaDSu+K8lbz9snn0cIOHcJGlAO32v3AUDJ3rgNCzck7keSGo8J zJ6A2xQlKwnD0hGRA9XS3d7SgRdCbGfnSZ8/o5yQSsdjdO5qCxdK873UBPvwLhkbj2wc WjkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=gz0z3JkX; spf=pass (google.com: domain of linux-kernel+bounces-17583-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17583-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f8-20020a0564021e8800b00553be25f7c0si247037edf.433.2024.01.05.00.25.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 00:25:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17583-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=gz0z3JkX; spf=pass (google.com: domain of linux-kernel+bounces-17583-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17583-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 669081F2391E for ; Fri, 5 Jan 2024 08:25:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4C4924201; Fri, 5 Jan 2024 08:24:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="gz0z3JkX" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70D8B241F1 for ; Fri, 5 Jan 2024 08:24:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a293f2280c7so31057266b.1 for ; Fri, 05 Jan 2024 00:24:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1704443060; x=1705047860; 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=tDs9Akz57womT08DVky7rFMtepErNq8iSOIi4YmQXqE=; b=gz0z3JkXdw3ziKjIWQv3Mszf6ZW+c+Aom2V903pFx32D7s4lR2I7AuDNqtB/VU/RZu c4rAAbfc+thC7JCy97nj+MLldtRlRW8Wamn7KW5wzb6MGYDedKSUz45rnXGse6IeJqN4 oV1FU8oD6tHcLf/gqG0UzBOjDH1E6v7aTJ4iGWqe4DvyZNSQ4V9gvy8FCUZ/gjDCDRYz XQee16CILcuIGjwpwOXczlwGS7g9huy/KBEpdRbY2QaVUIrBDGzrJ3Hr4Kbf1agiacal IsnBGo7/wjV1T9sUolRl7YC8ho9+nPYANKIQAit8QKAZvVbCHGJmEGYLifgYDVrqkG/m n2Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704443060; x=1705047860; 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=tDs9Akz57womT08DVky7rFMtepErNq8iSOIi4YmQXqE=; b=Ihd/BEIE++Rn+Z5Q6nk5xTrbWF5Ilo2ZkhjrEqcOL11H+oMUtdl7LWr7T7MQs869hR gHnKuInM60RL7A9RiVZr8rQKndZ2DpJe1e5oUmgspbiBaXLcDBZFOjjEhwcgW5NsJYv6 Q78tnEebXo0OtKi2PjP6LL6iosOuYHlCgYiaS6TkaGbltwGN+L72Aqksd06RXkBGwh8P DDKUbMcQI+SR/Jr/HV1jCDW6RMDYTwBmu98w9L9af5IZorL338Agr2q+NYPvSNL6M9qI GnDQA/upVo779ME9VpirrvGr+lLgBrTwgISIuHGDg9m9keEcLcpBW9A7QaVCPMxs4vVy klug== X-Gm-Message-State: AOJu0Yyr1WUjM1KK6DcaxRK+yLsddrU4518+m7o6neU3j0VT8ZIWYXGN IdW5RsbICYxflDtM8hf4IC8yZCXFspwmpw== X-Received: by 2002:a17:906:5342:b0:a26:cab1:4076 with SMTP id j2-20020a170906534200b00a26cab14076mr407535ejo.125.1704443059724; Fri, 05 Jan 2024 00:24:19 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.5]) by smtp.gmail.com with ESMTPSA id j15-20020a1709064b4f00b00a28e759a447sm596198ejv.213.2024.01.05.00.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 00:24:19 -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, richardcochran@gmail.com, p.zabel@pengutronix.de, yoshihiro.shimoda.uh@renesas.com, wsa+renesas@sang-engineering.com Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, geert+renesas@glider.be, Claudiu Beznea Subject: [PATCH net-next v3 04/19] net: ravb: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Date: Fri, 5 Jan 2024 10:23:24 +0200 Message-Id: <20240105082339.1468817-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240105082339.1468817-1-claudiu.beznea.uj@bp.renesas.com> References: <20240105082339.1468817-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Sergey Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v3: - none Changes in v2: - collected tags 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 ce053047a9f2..53ca5d984e8b 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2971,7 +2971,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); @@ -2993,7 +2993,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); @@ -3052,7 +3052,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. @@ -3065,8 +3065,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 = { @@ -3074,7 +3074,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