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 2C0C2C54E41 for ; Mon, 4 Mar 2024 09:21:55 +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=Ms2RQBgJB6hdPLfGAVh5ThMdBjRMVk/6uEXjk13YKc0=; b=f8se0pZgrc90zg aXOViA+JrqwA406CrkQkB7N4zJJdnUqikR02EXzzeb0FPVQS0tOQSk0YwhQFzswXlIeCECLXBQROo pqXNssfy+A3GW9yyq7BHoqpMJAOFFl8WLO3CgZlLHHPdpn/hSArhe4IAkUdt+uj4SYlnAj2xj+iGw m5+XxXyhq4GJI9SFPcNJ2MwKALsyczXBkUwFctVn7MbhO5X5fK+UQkC28P7UAv2DnwL25NQ94yyWk /S16tHpF1a3gypE+p97ep/cCINZq6k5vub4jH2LAxYwTCWrXRycgDPB4L6yDFyKA9zSmcSbvKkXZn bFjU8mS4wqtmmftcgXSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rh4Vx-00000008LAF-3OUi; Mon, 04 Mar 2024 09:21:41 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rh4Vu-00000008L8C-1I3g for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2024 09:21:41 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 28B54CE0A4D; Mon, 4 Mar 2024 09:21:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64F12C433F1; Mon, 4 Mar 2024 09:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709544095; bh=lOa50vXkrUsDFtIi8C9JTx4wGk9mm9mtJoD1tNnorho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DuJm+66A65ap4KUPFek0FET5sProtZDdcqySyv4Ul+T1yfNKR9kVXRW+8oDwbqxkv vJZo3BSdIZMFm9s26GuEGVaWmLwUUID1UZILQP6Xn9Irz4uFM51yANy5RxC1sgR7Lt zIFuf0aIuq68BiM7j56YWAu7uAS6IXzO1j64R56Uf0R+ThNBig/04DQFMfrH/qj7Kl huXHMOqvpyO9A/YdbnUarXTi0IorJLnPtDTvziVbUHjkw+Dcfq92/G7XJDPzIdENUl zR+cqviNLc2cVXHSgNl45BD/10truw82TOgP+5fhZ4WT3+UIHpmXuGrBsuxAVC/sLV 7ZVo+FTdL2Wgg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rh4Vz-000000006M9-1I22; Mon, 04 Mar 2024 10:21:43 +0100 Date: Mon, 4 Mar 2024 10:21:43 +0100 From: Johan Hovold To: Anand Moon Cc: Alan Stern , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/4] usb: ehci-exynos: Switch from CONFIG_PM guards to pm_ptr() Message-ID: References: <20240301193831.3346-1-linux.amoon@gmail.com> <20240301193831.3346-3-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240301193831.3346-3-linux.amoon@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_012138_560936_78CFB6CC X-CRM114-Status: GOOD ( 15.19 ) 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 Sat, Mar 02, 2024 at 01:08:09AM +0530, Anand Moon wrote: > Use the new PM macros for the suspend and resume functions to be > automatically dropped by the compiler when CONFIG_PM are disabled, > without having to use #ifdef guards. If CONFIG_PM unused, > they will simply be discarded by the compiler. > > Use RUNTIME_PM_OPS runtime macro for suspend/resume function. > > Signed-off-by: Anand Moon > --- > drivers/usb/host/ehci-exynos.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > static const struct dev_pm_ops exynos_ehci_pm_ops = { > - .suspend = exynos_ehci_suspend, > - .resume = exynos_ehci_resume, > + RUNTIME_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume, NULL) > }; This is also broken and clearly not tested. See the definition of RUNTIME_PM_OPS() which sets the runtime pm callbacks, not the suspend ones: #define RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ .runtime_suspend = suspend_fn, \ .runtime_resume = resume_fn, \ .runtime_idle = idle_fn, Johan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel