From: tip-bot for Alexander Kuleshov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: kuleshovmail@gmail.com, linux-kernel@vger.kernel.org,
mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de
Subject: [tip:irq/core] genirq: No need to mask non trigger mode flags before __irq_set_trigger()
Date: Tue, 6 Sep 2016 03:22:16 -0700 [thread overview]
Message-ID: <tip-00b992deaa08495ab958da5950c9ebbba27d0ddc@git.kernel.org> (raw)
In-Reply-To: <20160719095408.13778-1-kuleshovmail@gmail.com>
Commit-ID: 00b992deaa08495ab958da5950c9ebbba27d0ddc
Gitweb: http://git.kernel.org/tip/00b992deaa08495ab958da5950c9ebbba27d0ddc
Author: Alexander Kuleshov <kuleshovmail@gmail.com>
AuthorDate: Tue, 19 Jul 2016 15:54:08 +0600
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 6 Sep 2016 12:14:12 +0200
genirq: No need to mask non trigger mode flags before __irq_set_trigger()
Some callers of __irq_set_trigger() masks all flags except trigger mode
flags. This is unnecessary, ase __irq_set_trigger() already does this
before usage of flags.
[ tglx: Moved the flag mask and adjusted comment. Removed the hunk in
enable_percpu_irq() as it is required there ]
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Link: http://lkml.kernel.org/r/20160719095408.13778-1-kuleshovmail@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
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 93c373a..e11e8af 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 73a2b78..4908617 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -669,8 +669,6 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)
return 0;
}
- flags &= IRQ_TYPE_SENSE_MASK;
-
if (chip->flags & IRQCHIP_SET_TYPE_MASKED) {
if (!irqd_irq_masked(&desc->irq_data))
mask_irq(desc);
@@ -678,7 +676,8 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)
unmask = 1;
}
- /* caller masked out all except trigger mode flags */
+ /* Mask all flags except trigger mode */
+ flags &= IRQ_TYPE_SENSE_MASK;
ret = chip->irq_set_type(&desc->irq_data, flags);
switch (ret) {
prev parent reply other threads:[~2016-09-06 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 9:54 [PATCH] genirq: no need to mask non trigger mode flags before __irq_set_trigger() Alexander Kuleshov
2016-09-06 10:22 ` tip-bot for Alexander Kuleshov [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=tip-00b992deaa08495ab958da5950c9ebbba27d0ddc@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@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;
as well as URLs for NNTP newsgroup(s).