From patchwork Thu Dec 1 11:05:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 28333 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp202677wrr; Thu, 1 Dec 2022 03:18:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf7QMIcXI1xHEQerwRSBzhumWEJWotFJVOkuVPfuZe1q+2Y/adup6TgTCxG6Iz5odSQAFpH5 X-Received: by 2002:a05:6402:3707:b0:467:6847:83d3 with SMTP id ek7-20020a056402370700b00467684783d3mr19746507edb.247.1669893539494; Thu, 01 Dec 2022 03:18:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669893539; cv=none; d=google.com; s=arc-20160816; b=nGxlDqhxlSgnZmltTXEA6yirEQO99k2fWxfn/RHH+d1yyB+SwIibNmg/un8o+XOIV5 r/HB+5+dt6BUSfeyIIhr8Bxhtgf4Zk1HrpxwnpjhLH+tULfw9fxx+7o0Fi0b5Ll+t4y8 VmEm8VJ1lhNMNp0HLUEAFwPDnsEOu+aNOo0Z/29j8+hhD1wzN3d5l1EhggAdtfRAJkO4 0sDJLkN8R+dqa5lJn4BH9ZFBMpOPD7i5isyv4wNM/6/G9FxJrnlDAXrbh/ic4PQrPDmj 97rlDfFGv39/xpHgehcsWoNu766rTWuBh7OAt+QVN2K2aO5ZazunzJzL5d20OyYQljEl 6hHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=kIeIeIcghzxVjqF1TjUsV9dokQhCubnFBxcDqd3Ie/w=; b=kLx2V2/iuGmq5IvUYK6uYHCdegkJHOqxnrdVOrCXOqakSuHbPXRMDajOgysOCf66O1 aNTvd8XeayifrBsUWSub3zFIAfjSVWP8y5j1xGF7hXbrBJkrwvTnT5mqLpn4bCMhWiPB Z0O6k4iibA1KDsj/YkR641+V2qtTSJQiHCzAE3jK9iTuX9TiQYtCEdeVd2ceiPLL9YGe Mp6YH/VBnNED/5hpweEFPUrjtEkKncjBFh2MM/MxLCLSZXUmSE7kkyfKrSVLJhmhvrxw BmkzfgJfBt5zEOYqbJAQYpI6LgGIALxIh6WhUmRgO5y7k3IJbOuyO4XlIa6alo+xOOik I3Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Pm6ocLMw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds15-20020a170907724f00b007be53f03fa7si4049802ejc.211.2022.12.01.03.18.35; Thu, 01 Dec 2022 03:18:59 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=Pm6ocLMw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231372AbiLALIi (ORCPT + 99 others); Thu, 1 Dec 2022 06:08:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbiLALHz (ORCPT ); Thu, 1 Dec 2022 06:07:55 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52218BA0BF; Thu, 1 Dec 2022 03:05:53 -0800 (PST) Date: Thu, 01 Dec 2022 11:05:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669892751; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kIeIeIcghzxVjqF1TjUsV9dokQhCubnFBxcDqd3Ie/w=; b=Pm6ocLMwtp3qIgXJ1pwRGI3C9DxbQ4wAS+ufsiAfXpb15dFLHrjTNvIWmyZR0n0OJMJwA1 ZGYfx10fxTolfVpZ7JxRUveMe6ybzqlcoF2ESyQQNOKlCM0XVog85VnHh1t/VIMv8dSSAl LacSBGWCQOhAxr7fTOS0BluHgcMi8Vz6Mws0Dh/TwoX1tASsxzeDz70XWtFGUKdN6wIBPo DeOXN/9Lw3vh2RS4h7mUnAkPVfomHTdZzmemc+N1YKcV+CDIx+w1adQsR47fdSUMNiqxRn y2MZwUk1DhRuMn5TiNBCuQEvgqsqT4PGGRRQTXTc0TkV8EYR//5g8DrVz7uqIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669892751; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kIeIeIcghzxVjqF1TjUsV9dokQhCubnFBxcDqd3Ie/w=; b=YRntC8ygUG7BUoLazW8JRUNFzq6IidLWqmjR1hO1UJ6uZBNxA4gk48QbQMHh8uhN4LE1Wx JsQf5O2dTB6XMVDQ== From: "tip-bot2 for Lukas Bulwahn" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/ingenic-ost: Define pm functions properly in platform_driver struct Cc: Paul Cercueil , Lukas Bulwahn , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221123083159.22821-1-lukas.bulwahn@gmail.com> References: <20221123083159.22821-1-lukas.bulwahn@gmail.com> MIME-Version: 1.0 Message-ID: <166989275032.4906.6461931630043046760.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751010288063875889?= X-GMAIL-MSGID: =?utf-8?q?1751010288063875889?= The following commit has been merged into the timers/core branch of tip: Commit-ID: 035629547999d0e9095886f248c2580dc56f36c6 Gitweb: https://git.kernel.org/tip/035629547999d0e9095886f248c2580dc56f36c6 Author: Lukas Bulwahn AuthorDate: Wed, 23 Nov 2022 09:31:59 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 01 Dec 2022 11:56:36 +01:00 clocksource/drivers/ingenic-ost: Define pm functions properly in platform_driver struct Commit ca7b72b5a5f2 ("clocksource: Add driver for the Ingenic JZ47xx OST") adds the struct platform_driver ingenic_ost_driver, with the definition of pm functions under the non-existing config PM_SUSPEND, which means the intended pm functions were never actually included in any build. As the only callbacks are .suspend_noirq and .resume_noirq, we can assume that it is intended to be CONFIG_PM_SLEEP. Since commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), the default pattern for platform_driver definitions conditional for CONFIG_PM_SLEEP is to use pm_sleep_ptr(). As __maybe_unused annotations on the dev_pm_ops structure and its callbacks are not needed anymore, remove these as well. Suggested-by: Paul Cercueil Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Gleixner Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20221123083159.22821-1-lukas.bulwahn@gmail.com --- drivers/clocksource/ingenic-ost.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/clocksource/ingenic-ost.c b/drivers/clocksource/ingenic-ost.c index 06d2575..9f7c280 100644 --- a/drivers/clocksource/ingenic-ost.c +++ b/drivers/clocksource/ingenic-ost.c @@ -141,7 +141,7 @@ static int __init ingenic_ost_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused ingenic_ost_suspend(struct device *dev) +static int ingenic_ost_suspend(struct device *dev) { struct ingenic_ost *ost = dev_get_drvdata(dev); @@ -150,14 +150,14 @@ static int __maybe_unused ingenic_ost_suspend(struct device *dev) return 0; } -static int __maybe_unused ingenic_ost_resume(struct device *dev) +static int ingenic_ost_resume(struct device *dev) { struct ingenic_ost *ost = dev_get_drvdata(dev); return clk_enable(ost->clk); } -static const struct dev_pm_ops __maybe_unused ingenic_ost_pm_ops = { +static const struct dev_pm_ops ingenic_ost_pm_ops = { /* _noirq: We want the OST clock to be gated last / ungated first */ .suspend_noirq = ingenic_ost_suspend, .resume_noirq = ingenic_ost_resume, @@ -181,9 +181,7 @@ static const struct of_device_id ingenic_ost_of_match[] = { static struct platform_driver ingenic_ost_driver = { .driver = { .name = "ingenic-ost", -#ifdef CONFIG_PM_SUSPEND - .pm = &ingenic_ost_pm_ops, -#endif + .pm = pm_sleep_ptr(&ingenic_ost_pm_ops), .of_match_table = ingenic_ost_of_match, }, };