From: Lars-Peter Clausen <lars@metafoo.de>
To: "James E.J. Bottomley" <JBottomley@odin.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@avagotech.com>,
Ketan Mukadam <ketan.mukadam@avagotech.com>,
John Soni Jose <sony.john@avagotech.com>,
Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>,
Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>,
Sreekanth Reddy <sreekanth.reddy@avagotech.com>,
Abhijit Mahajan <abhijit.mahajan@avagotech.com>,
linux-scsi@vger.kernel.org, MPT-FusionLinux.pdl@avagotech.com,
Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH resend 2/2] mpt3sas: Remove unnecessary synchronize_irq() before free_irq()
Date: Tue, 2 Feb 2016 21:02:28 +0100 [thread overview]
Message-ID: <1454443348-12783-2-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1454443348-12783-1-git-send-email-lars@metafoo.de>
Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.
Patch was generated using the following semantic patch:
// <smpl>
@@
expression irq;
@@
-synchronize_irq(irq);
free_irq(irq, ...);
// </smpl>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 83658ac..72f71e2 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1799,7 +1799,6 @@ _base_free_irq(struct MPT3SAS_ADAPTER *ioc)
list_del(&reply_q->list);
irq_set_affinity_hint(reply_q->vector, NULL);
free_cpumask_var(reply_q->affinity_hint);
- synchronize_irq(reply_q->vector);
free_irq(reply_q->vector, reply_q);
kfree(reply_q);
}
--
2.1.4
next prev parent reply other threads:[~2016-02-03 12:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 20:02 [PATCH resend 1/2] be2iscsi: Remove unnecessary synchronize_irq() before free_irq() Lars-Peter Clausen
2016-02-02 20:02 ` Lars-Peter Clausen [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-04 10:15 Lars-Peter Clausen
2016-03-04 10:15 ` [PATCH resend 2/2] mpt3sas: " Lars-Peter Clausen
2016-03-08 2:05 ` Martin K. Petersen
2016-03-09 1:52 ` Martin K. Petersen
2016-03-09 13:26 ` Sreekanth Reddy
2016-03-10 1:43 ` Martin K. Petersen
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=1454443348-12783-2-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=JBottomley@odin.com \
--cc=MPT-FusionLinux.pdl@avagotech.com \
--cc=abhijit.mahajan@avagotech.com \
--cc=jayamohan.kallickal@avagotech.com \
--cc=ketan.mukadam@avagotech.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nagalakshmi.nandigama@avagotech.com \
--cc=praveen.krishnamoorthy@avagotech.com \
--cc=sony.john@avagotech.com \
--cc=sreekanth.reddy@avagotech.com \
/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).