From nobody Sun May 10 14:13:03 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2E51C433F5 for ; Mon, 2 May 2022 12:11:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384913AbiEBMOg (ORCPT ); Mon, 2 May 2022 08:14:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384622AbiEBMOc (ORCPT ); Mon, 2 May 2022 08:14:32 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 158F3BFA; Mon, 2 May 2022 05:11:04 -0700 (PDT) Date: Mon, 02 May 2022 12:11:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651493462; 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=DqLyU6eqOYm5mbsrgaYZRI+vMRTFZkpfrcGpvit8sCs=; b=lfASwGypYDAxvZnjOsBm4ApDvAjAkjdu/FCKFjVtUiheCv+RHaBRPU0gndgZEpxnN9OEod NCspsyMQEBIMdHG3CG0Jr3nemhpSHBvrDTDtanay/gDRhm+00c3UycX4GX2Tvkts2kf+an q6qVwVKgsBUKHlyZWhN4uY8a2Gf3tL+ghNHaSFeUhVYetrt9yHOxA5UGZcgeFj7PcJskS9 aeePq6XOysgwj8tJsCh4SKwQ1qS9MFHAZESg1cMLmaIkNmeu47sDcuZq4Vt/wLMzTZQDk6 Ohph7tvNE6u3f/3+rQU2Hmyre8HfipgUhLwy/dGUwLYEtYPRTsX4MJnDdEZLng== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651493462; 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=DqLyU6eqOYm5mbsrgaYZRI+vMRTFZkpfrcGpvit8sCs=; b=JcWQUm6Z51InkI7cK1DYUOhX1XFMuQ/ShJFozA3/cG5yHC5kBruHWnpslSV6NypSpCNpv/ NMLLHVkjZ/5kDUDQ== From: "tip-bot2 for Minghao Chi" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() Cc: Zeal Robot , Minghao Chi , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20220418110716.2559453-1-chi.minghao@zte.com.cn> References: <20220418110716.2559453-1-chi.minghao@zte.com.cn> MIME-Version: 1.0 Message-ID: <165149346127.4207.7891496748759999918.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: ce4818957fdc5bca57fc2c92b0dfe109d26bcc47 Gitweb: https://git.kernel.org/tip/ce4818957fdc5bca57fc2c92b0dfe109d= 26bcc47 Author: Minghao Chi AuthorDate: Mon, 18 Apr 2022 11:07:16=20 Committer: Thomas Gleixner CommitterDate: Mon, 02 May 2022 14:08:08 +02:00 genirq: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() pm_runtime_resume_and_get() achieves the same and simplifies the code. [ tglx: Simplify it further by presetting retval ] Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20220418110716.2559453-1-chi.minghao@zte.co= m.cn --- kernel/irq/chip.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 54af0de..e6b8e56 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1573,17 +1573,12 @@ static struct device *irq_get_parent_device(struct = irq_data *data) int irq_chip_pm_get(struct irq_data *data) { struct device *dev =3D irq_get_parent_device(data); - int retval; + int retval =3D 0; =20 - if (IS_ENABLED(CONFIG_PM) && dev) { - retval =3D pm_runtime_get_sync(dev); - if (retval < 0) { - pm_runtime_put_noidle(dev); - return retval; - } - } + if (IS_ENABLED(CONFIG_PM) && dev) + retval =3D pm_runtime_resume_and_get(dev); =20 - return 0; + return retval; } =20 /**