From patchwork Mon Jun 26 09:11:39 2023 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: 112826 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7359780vqr; Mon, 26 Jun 2023 02:48:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ46Ezpx2BWJrvtF9VeC7szDpSPkP/3jeyZIdvADBdc2ZUSrTbGhsBI5LR90fIE+qPxU9II+ X-Received: by 2002:a05:6a20:938b:b0:10d:12a8:c95b with SMTP id x11-20020a056a20938b00b0010d12a8c95bmr21094352pzh.0.1687772887327; Mon, 26 Jun 2023 02:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687772887; cv=none; d=google.com; s=arc-20160816; b=fOCXQmpfgBMNEIGXC7ny+F6M72ekiMbKur6z+9BijSRf2OEJUhAhtxACiw5sN8ibg3 XsvegBK48Xt9W9OeTlA543XxVgf2T44J606bhYYlH5TWiu3OtgzxA5rZJfpBDwjDi9yG UUwo/3IQPnghuGA5EYi6qjkH+BuShYCqb0IjU8A/wmLewkOPn8dNYh8K6vcydH8fKn8O qikAjlVYUq33bQn7A4q00wXP5IMV3Vb7PbR8tpZUTHiCVN3Ub+KYOEvuEk9BCGmWH6Gi L8PmIehiQONB9nR1LGUkdI4FwPvOdG/250/1srIIcNJgxhYnr+Pg9DQL3dBzm2wpFYKu Jq2w== 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=xcynkB+2ejgdgKoIuzW5rnBkYwgbpMkmunTrjH3Cs28=; fh=3EIfcWa28KykQfC1RS+JDQdZD3L7JBKS8/Fyx3Mrybo=; b=qqvbRhdt35ybaKSK+wPWX5+SkuYFRg9hhLV+fRDJ6YEAT6L0XdGIU7VHW65NIN39b4 ku1NPkzYr81PqWtBQSAc4pMHMsrbAcfxfQ7hib/J9L4+LO87hbyhDSXM2sJkb8YUdK6D uqdj3Wx5qa/hyUV/nH0yEGej+jkxQm6LwgzTO13jTb313NmyM9NzhbNn2zrTjD330Dtd sIDkk24d6xYdCUReHMzJM9AE6V1O+r9eVMefE3+HuAJD7vIyolMq/LwnsEh8m0pv/KVq UvsKrLVviWOl59hKDeJtovnovhdEE9AhXYlP76lTUuLXEYeE1FYcZTK3IUpPoxJPquyb LZ5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="X/BKPCu3"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=+ysDEB9M; 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 c10-20020a170902b68a00b001b053ea9b8dsi4360777pls.570.2023.06.26.02.47.54; Mon, 26 Jun 2023 02:48:07 -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=@linutronix.de header.s=2020 header.b="X/BKPCu3"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=+ysDEB9M; 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 S229689AbjFZJOS (ORCPT + 99 others); Mon, 26 Jun 2023 05:14:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbjFZJNN (ORCPT ); Mon, 26 Jun 2023 05:13:13 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9B6E187; Mon, 26 Jun 2023 02:11:41 -0700 (PDT) Date: Mon, 26 Jun 2023 09:11:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687770700; 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=xcynkB+2ejgdgKoIuzW5rnBkYwgbpMkmunTrjH3Cs28=; b=X/BKPCu3dnb/hSvCi9HqJjXyjBvSvfZaBwzfAGMzDhToDLm7IydPnFyVrwklRU7eb+k1/t dGRN5cilHs3BqSFQEmgWvhUyZwophnGNAIOsILle5lIGnYfZhHgzeYS45AX3JQD4ZTSoOR c72J7ynoomPa5xG5DbeJ7uo7wybm9uTne0ezUhD6b5ksDRV31mUVz9EdgUBdtYQXx5OZX9 g5L36WukJSlbcA5nzhWWjgMiJgSp4AZvMV6OZKL8Upb0UZcF2JTGeB15Uyr0Q6aRZVAbeg qT9eGzgGdKRgGkOYFQf6FUUgeQwqV7CSIg+OEDEONPmapW5UrasPvAJpk5uNLA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687770700; 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=xcynkB+2ejgdgKoIuzW5rnBkYwgbpMkmunTrjH3Cs28=; b=+ysDEB9MecAj9isETE4vohW1v6c5mlWE+6RkNWsL17THgRa9aYtXi5tzrQmtS6ltYHMOkK exz91wA+t5gBj2CA== From: "tip-bot2 for Paul Cercueil" 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-timer: Use pm_sleep_ptr() macro Cc: Paul Cercueil , Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230618153937.96649-1-paul@crapouillou.net> References: <20230618153937.96649-1-paul@crapouillou.net> MIME-Version: 1.0 Message-ID: <168777069988.404.5923193634383986176.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,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769758143031936461?= X-GMAIL-MSGID: =?utf-8?q?1769758143031936461?= The following commit has been merged into the timers/core branch of tip: Commit-ID: ea95051063f95bf612683f5697e44604d0cbd0f1 Gitweb: https://git.kernel.org/tip/ea95051063f95bf612683f5697e44604d0cbd0f1 Author: Paul Cercueil AuthorDate: Sun, 18 Jun 2023 17:39:37 +02:00 Committer: Daniel Lezcano CommitterDate: Mon, 19 Jun 2023 16:17:42 +02:00 clocksource/drivers/ingenic-timer: Use pm_sleep_ptr() macro The use of the pm_sleep_ptr() macro allows the compiler to always see the dev_pm_ops structure and related functions, while still allowing the unused code to be removed, without the need for the __maybe_unused markings. Signed-off-by: Paul Cercueil Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230618153937.96649-1-paul@crapouillou.net --- drivers/clocksource/ingenic-timer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/clocksource/ingenic-timer.c b/drivers/clocksource/ingenic-timer.c index 089ce64..154ee5f 100644 --- a/drivers/clocksource/ingenic-timer.c +++ b/drivers/clocksource/ingenic-timer.c @@ -369,7 +369,7 @@ static int __init ingenic_tcu_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused ingenic_tcu_suspend(struct device *dev) +static int ingenic_tcu_suspend(struct device *dev) { struct ingenic_tcu *tcu = dev_get_drvdata(dev); unsigned int cpu; @@ -382,7 +382,7 @@ static int __maybe_unused ingenic_tcu_suspend(struct device *dev) return 0; } -static int __maybe_unused ingenic_tcu_resume(struct device *dev) +static int ingenic_tcu_resume(struct device *dev) { struct ingenic_tcu *tcu = dev_get_drvdata(dev); unsigned int cpu; @@ -406,7 +406,7 @@ err_timer_clk_disable: return ret; } -static const struct dev_pm_ops __maybe_unused ingenic_tcu_pm_ops = { +static const struct dev_pm_ops ingenic_tcu_pm_ops = { /* _noirq: We want the TCU clocks to be gated last / ungated first */ .suspend_noirq = ingenic_tcu_suspend, .resume_noirq = ingenic_tcu_resume, @@ -415,9 +415,7 @@ static const struct dev_pm_ops __maybe_unused ingenic_tcu_pm_ops = { static struct platform_driver ingenic_tcu_driver = { .driver = { .name = "ingenic-tcu-timer", -#ifdef CONFIG_PM_SLEEP - .pm = &ingenic_tcu_pm_ops, -#endif + .pm = pm_sleep_ptr(&ingenic_tcu_pm_ops), .of_match_table = ingenic_tcu_of_match, }, };