Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3584593rwo; Mon, 24 Jul 2023 13:22:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlEXOHj4fNMQZgIXIXqybwZPw3YcGAFxnFVOk1470PuSeaoamHN9lD4lR8afAuMqderCzqJU X-Received: by 2002:a17:90a:1b8e:b0:268:18d2:3e98 with SMTP id w14-20020a17090a1b8e00b0026818d23e98mr2988980pjc.43.1690230125021; Mon, 24 Jul 2023 13:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690230125; cv=none; d=google.com; s=arc-20160816; b=IEkR0sLb3qAU8DGya/3Nrqa7XGfSXBb8WuNIOnRIhV+T1mkAozVyBOUTdRx4OwSUjg u+mmkzGOdTPH603hlhIW8daiwMiVm+WiGTiDwXTNz+/RMVEe0xDSUZ6mmeLEakal1lNw sVPWX96p6GjlMlrQ/uDf24omR+nkdV2c0N24H8uOIT7Kw8WBafHw9w5rRL4Klc+tN2ho RMRuDwA4HENRkizaq/1ocG2wAB6a4aG23dObRciZt+LN9BCRKmNX/F2mKtHlhW77bvkV 64VyiSlbnSV+agWExYP/a/jS9HOrGVWZx4KG6ArY3bOVwexqJtSYK4G3mfiD7DRqTSZM jLjQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=W4bc+fSen4d3tmDVzk4rFZkk/7Xx7nPrwBzAs5Xwr/I=; fh=6h5FY6dNz/gUFhjICxWDQlHFac4heDfVNvAhmWYdIis=; b=xcYTCddYk4ISc5cePYGnpirhGorxbfs8iyi+mSU07dEQwwybGkg2eUXA1x3sGYygj2 mlZv031FPYCO6j3yqojhqOIapPgm/ggZSHG2cU12drZf74/+XMUAhQHXCSaQkR+8Y5X3 aZALAd5EY4wthPD5VQ5Otp2Mjt0WP9MdvYsfKDOE++sl52N41CJ25s/eRFY+ENunpg9n YL36NmnV7wcGGtcESlCvLDq98ccNaoXfy5eFsUivrU93kS/8U0NILTBxlf7h8hYVyhut 2i7ntGWmYYflFISSCu9qScFPX/AXztHO0LQrsdSMNz3BH6JDYiJhN5oYfvnw+onEUO5c ZJnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AUoQC2Xv; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ei22-20020a17090ae55600b00263c23a5693si3763618pjb.13.2023.07.24.13.21.52; Mon, 24 Jul 2023 13:22:04 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=AUoQC2Xv; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbjGXT5O (ORCPT + 99 others); Mon, 24 Jul 2023 15:57:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbjGXT5N (ORCPT ); Mon, 24 Jul 2023 15:57:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9B45A6; Mon, 24 Jul 2023 12:57:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8019161362; Mon, 24 Jul 2023 19:57:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05336C433C7; Mon, 24 Jul 2023 19:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690228631; bh=4/mO24Ikk4CHlDznLLlA+DvTvlfb2sd89TKv9AA3wYI=; h=From:To:Cc:Subject:Date:From; b=AUoQC2XvXKgQjD1P9rrEu/Kn5JiiXB9Y3c14lNwXwW8M78id+LM2WIXSvx/0NR4kN rpkXzhemn2iR1aPhh3j5QtMk4YkB+BZsYSHUbcUN/dhzG3tCUzR+xJBPGTVIKqqC+r ySr9TOHnyoViYDraWSOqRfjzyq3STt68AXlSa/tsZHOa4omxhxjV/EPfXYnpMeOO6+ Dcza/NTZjSvHS0tLJHix2T6ZCkHi/3NCPCv0FoCii98M8APB8a8VB+aPtzvb8gAIjv vCzrcNIkUC8Le5AjF4JTIiIwRD2+163T6KL8/D79/DqObvVQNT/3zSbc/LF+5pbFGf mASLsQvohf3pw== From: Arnd Bergmann To: Bjorn Andersson , Mathieu Poirier , Maxime Coquelin , Alexandre Torgue Cc: Arnd Bergmann , kernel test robot , Arnaud Pouliquen , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , 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: [PATCH] remoteproc: stm32: fix incorrect optional pointers Date: Mon, 24 Jul 2023 21:56:49 +0200 Message-Id: <20230724195704.2432382-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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(-) 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