From: "tip-bot2 for Minghao Chi" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Zeal Robot <zealci@zte.com.cn>,
Minghao Chi <chi.minghao@zte.com.cn>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org
Subject: [tip: irq/core] genirq: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
Date: Mon, 02 May 2022 12:11:01 -0000 [thread overview]
Message-ID: <165149346127.4207.7891496748759999918.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220418110716.2559453-1-chi.minghao@zte.com.cn>
The following commit has been merged into the irq/core branch of tip:
Commit-ID: ce4818957fdc5bca57fc2c92b0dfe109d26bcc47
Gitweb: https://git.kernel.org/tip/ce4818957fdc5bca57fc2c92b0dfe109d26bcc47
Author: Minghao Chi <chi.minghao@zte.com.cn>
AuthorDate: Mon, 18 Apr 2022 11:07:16
Committer: Thomas Gleixner <tglx@linutronix.de>
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 <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20220418110716.2559453-1-chi.minghao@zte.com.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 = irq_get_parent_device(data);
- int retval;
+ int retval = 0;
- if (IS_ENABLED(CONFIG_PM) && dev) {
- retval = pm_runtime_get_sync(dev);
- if (retval < 0) {
- pm_runtime_put_noidle(dev);
- return retval;
- }
- }
+ if (IS_ENABLED(CONFIG_PM) && dev)
+ retval = pm_runtime_resume_and_get(dev);
- return 0;
+ return retval;
}
/**
prev parent reply other threads:[~2022-05-02 12:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 11:07 [PATCH] genirq: using pm_runtime_resume_and_get instead of pm_runtime_get_sync cgel.zte
2022-05-02 12:11 ` tip-bot2 for Minghao Chi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=165149346127.4207.7891496748759999918.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=chi.minghao@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®