From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH] genirq: no need to mask non trigger mode flags before __irq_set_trigger()
Date: Tue, 19 Jul 2016 15:54:08 +0600 [thread overview]
Message-ID: <20160719095408.13778-1-kuleshovmail@gmail.com> (raw)
Some callers of __irq_set_trigger() masks all flags besides trigger mode
flags. Actually it is unnecessary operation now, because the
__irq_set_trigger() already does this before usage of flags.
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
kernel/irq/chip.c | 1 -
kernel/irq/manage.c | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 2f9f2b0..38f2fa4 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -76,7 +76,6 @@ int irq_set_irq_type(unsigned int irq, unsigned int type)
if (!desc)
return -EINVAL;
- type &= IRQ_TYPE_SENSE_MASK;
ret = __irq_set_trigger(desc, type);
irq_put_desc_busunlock(desc, flags);
return ret;
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index ef0bc02..f33c719 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -662,7 +662,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)
unmask = 1;
}
- /* caller masked out all except trigger mode flags */
+ /* all flags except trigger mode flags are masked */
ret = chip->irq_set_type(&desc->irq_data, flags);
switch (ret) {
@@ -1730,8 +1730,7 @@ void enable_percpu_irq(unsigned int irq, unsigned int type)
if (!desc)
return;
- type &= IRQ_TYPE_SENSE_MASK;
- if (type != IRQ_TYPE_NONE) {
+ if (type & IRQ_TYPE_SENSE_MASK) {
int ret;
ret = __irq_set_trigger(desc, type);
--
2.8.0.rc3.922.g2bcc146
next reply other threads:[~2016-07-19 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 9:54 Alexander Kuleshov [this message]
2016-09-06 10:22 ` [tip:irq/core] genirq: No need to mask non trigger mode flags before __irq_set_trigger() tip-bot for Alexander Kuleshov
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=20160719095408.13778-1-kuleshovmail@gmail.com \
--to=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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