From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 785B6EE49A5 for ; Mon, 21 Aug 2023 20:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fmRvb98MsnV1qJeSd2grYjFUS+WvEzv4ZpNTLBEZ+CY=; b=DYk6fGTSrVv0l9 sMw31eiQP7v2TaoDjZcra80Wd9hfGmjSFf+RlQo/9LtKtR7KwGcuIBnH8log8FwskKI/LA3S+Fgjz m1pQhb0g1zVoazDwsclVw3yYgjJOTnsQxwmBl93EoR82jL9Hc0tKJA2z4t/3hkG+Cm4/0seJ3R/Xp Kkc6JTylFqCVYn64pZyM/UFBRocFbxAaAdn8+kHXJatw3tTMVhD8iuehIfR7zhhKbIrEmwqRMEo0O U6+OVPA4BE4C1L4Gvw40k34MDuSi++sLC2/zSiPARbvMvVSrUX0ItfYymsZaUq42wGOT0IMm9HuV6 syNFTUEYeVtXaWJbmozw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYBOC-00EeK0-2y; Mon, 21 Aug 2023 20:20:40 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYBOA-00EeJN-16 for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2023 20:20:39 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-68a41035828so1115017b3a.1 for ; Mon, 21 Aug 2023 13:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692649237; x=1693254037; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PJzS96kMorSHcInyTnYW6Eub6rGk1Addu59Qv90D7BM=; b=UFKHdM3hyYjf0/QyShd749nOd5v65vukEEJzaNxswmyTx26BTeCZum7NuLOyDB9+fk lmVTnsgSqV4u0O/XKzVR3PLwCDfa79wQvoGvsSkQpjesXQHwoWi8JIzmFUDwmmQuajM+ hvXbb0Dm09SEPLF3eErYTEXcP7D4nTrMb9V3caY2/N/s8JGjJUziR8bR3Q4e0pS3y9hC 55k/zBAZPBSqA7218bpkXWTQv1yeej8MzRcCJ77APGz/omaadx2xuHQ8EV7OjpjBHVV9 9giy3kgKeRDe5VsqNXtEQv7JOtn/Ke2J6Qbajei8XyKXGNja4pLsHK2ER7Opyg4avcpE SjfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692649237; x=1693254037; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PJzS96kMorSHcInyTnYW6Eub6rGk1Addu59Qv90D7BM=; b=ERC+GMImmgHzLSyp1hInu51/MAa1BijidGkWWXTGcpouCEvs0HYlKhUXiK3xa7mzNb RG4EBNaDYOmWgNcXYknGt0rdmmuBd4N7TizNid7CsajdmxXiPKAjsM+mY/AXniG1X3pv G78OY7hFrpoy7I97L3WZo9YGKZ8EHuibTir7jo1ci9ePksf0delO2lrr7Paiif/D+Rp6 +EX2aYLmpn/FAaP/IlxvSxkbYZmjy6rs4+2ENVxWL3XLZ/C4jKL+GKzlN5jypNzxqu6P 757wSAn5KcO+tfBSUZqqAGNT3iDthBDCfptFaLoqKj8kAs0EyZdxkKaR8CoqgwOPJmnH 2Oaw== X-Gm-Message-State: AOJu0YyfFBJ2tINXTpePASYAvNAyex0sQqH+g1dY3A9zdLrpDYP/0siS j8ouT6xrVuG7tAAAjNSYh9yVhg== X-Google-Smtp-Source: AGHT+IEuRV2LPIg5opv4ffRpSuXdwrxTeyThcglAzmosQIGFbR+27zcpzc0KAqZXKHd6c1spz2/hGg== X-Received: by 2002:a05:6a20:7f8f:b0:135:38b5:7e58 with SMTP id d15-20020a056a207f8f00b0013538b57e58mr6622091pzj.37.1692649237041; Mon, 21 Aug 2023 13:20:37 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:2289:93a7:5faa:cd11]) by smtp.gmail.com with ESMTPSA id s15-20020aa7828f000000b006877a2e6285sm6472296pfm.128.2023.08.21.13.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 13:20:36 -0700 (PDT) Date: Mon, 21 Aug 2023 14:20:33 -0600 From: Mathieu Poirier To: Arnd Bergmann Cc: Bjorn Andersson , Maxime Coquelin , Alexandre Torgue , Arnd Bergmann , kernel test robot , Arnaud Pouliquen , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Dan Carpenter , Rob Herring , Randy Dunlap , Fabien Dessenne , Ludovic Barre , Loic Pallardy , linux-remoteproc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] remoteproc: stm32: fix incorrect optional pointers Message-ID: References: <20230724195704.2432382-1-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230724195704.2432382-1-arnd@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230821_132038_415594_33766BF8 X-CRM114-Status: GOOD ( 26.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 24, 2023 at 09:56:49PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > Compile-testing without CONFIG_OF shows that the of_match_ptr() macro > was used incorrectly here: > > drivers/remoteproc/stm32_rproc.c:662:34: warning: unused variable 'stm32_rproc_match' [-Wunused-const-variable] > > As in almost every driver, the solution is simply to remove the > use of this macro. The same thing happened with the deprecated > SIMPLE_DEV_PM_OPS(), but the corresponding warning was already shut > up with __maybe_unused annotations, so fix those as well by using the > correct DEFINE_SIMPLE_DEV_PM_OPS() macros and removing the extraneous > __maybe_unused modifiers. For completeness, also add a pm_ptr() to let > the PM ops be eliminated completely when CONFIG_PM is turned off. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202307242300.ia82qBTp-lkp@intel.com > Fixes: 03bd158e1535e ("remoteproc: stm32: use correct format strings on 64-bit") > Fixes: 410119ee29b6c ("remoteproc: stm32: wakeup the system by wdg irq") > Fixes: 13140de09cc2d ("remoteproc: stm32: add an ST stm32_rproc driver") > Signed-off-by: Arnd Bergmann > --- > drivers/remoteproc/stm32_rproc.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > Fixed 13-character SHAs and applied. Thanks, Mathieu > diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c > index 98234b44f0389..9d9b13530f78a 100644 > --- a/drivers/remoteproc/stm32_rproc.c > +++ b/drivers/remoteproc/stm32_rproc.c > @@ -921,7 +921,7 @@ static void stm32_rproc_remove(struct platform_device *pdev) > rproc_free(rproc); > } > > -static int __maybe_unused stm32_rproc_suspend(struct device *dev) > +static int stm32_rproc_suspend(struct device *dev) > { > struct rproc *rproc = dev_get_drvdata(dev); > struct stm32_rproc *ddata = rproc->priv; > @@ -932,7 +932,7 @@ static int __maybe_unused stm32_rproc_suspend(struct device *dev) > return 0; > } > > -static int __maybe_unused stm32_rproc_resume(struct device *dev) > +static int stm32_rproc_resume(struct device *dev) > { > struct rproc *rproc = dev_get_drvdata(dev); > struct stm32_rproc *ddata = rproc->priv; > @@ -943,16 +943,16 @@ static int __maybe_unused stm32_rproc_resume(struct device *dev) > return 0; > } > > -static SIMPLE_DEV_PM_OPS(stm32_rproc_pm_ops, > - stm32_rproc_suspend, stm32_rproc_resume); > +static DEFINE_SIMPLE_DEV_PM_OPS(stm32_rproc_pm_ops, > + stm32_rproc_suspend, stm32_rproc_resume); > > static struct platform_driver stm32_rproc_driver = { > .probe = stm32_rproc_probe, > .remove_new = stm32_rproc_remove, > .driver = { > .name = "stm32-rproc", > - .pm = &stm32_rproc_pm_ops, > - .of_match_table = of_match_ptr(stm32_rproc_match), > + .pm = pm_ptr(&stm32_rproc_pm_ops), > + .of_match_table = stm32_rproc_match, > }, > }; > module_platform_driver(stm32_rproc_driver); > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel