linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: "James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [Patch v2] wd719x: pass GFP_ATOMIC instead of GFP_KERNEL
Date: Wed, 29 May 2019 23:28:51 +0530	[thread overview]
Message-ID: <20190529175851.GA10760@hari-Inspiron-1545> (raw)

dont acquire lock before calling wd719x_chip_init.

Issue identified by coccicheck

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
-----
changes in v1: Replace GFP_KERNEL with GFP_ATOMIC.
changes in v2: Call wd719x_chip_init  without lock as suggested
		in review
----
---
 drivers/scsi/wd719x.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c
index c2f4006..340ec92 100644
--- a/drivers/scsi/wd719x.c
+++ b/drivers/scsi/wd719x.c
@@ -505,11 +505,9 @@ static int wd719x_host_reset(struct scsi_cmnd *cmd)
 {
 	struct wd719x *wd = shost_priv(cmd->device->host);
 	struct wd719x_scb *scb, *tmp;
-	unsigned long flags;
 	int result;
 
 	dev_info(&wd->pdev->dev, "host reset requested\n");
-	spin_lock_irqsave(wd->sh->host_lock, flags);
 	/* Try to reinit the RISC */
 	if (wd719x_chip_init(wd) == 0)
 		result = SUCCESS;
@@ -519,7 +517,6 @@ static int wd719x_host_reset(struct scsi_cmnd *cmd)
 	/* flush all SCBs */
 	list_for_each_entry_safe(scb, tmp, &wd->active_scbs, list)
 		wd719x_finish_cmd(scb, result);
-	spin_unlock_irqrestore(wd->sh->host_lock, flags);
 
 	return result;
 }
-- 
2.7.4


             reply	other threads:[~2019-05-29 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 17:58 Hariprasad Kelam [this message]
2019-05-29 21:13 ` [Patch v2] wd719x: pass GFP_ATOMIC instead of GFP_KERNEL David Rientjes

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=20190529175851.GA10760@hari-Inspiron-1545 \
    --to=hariprasad.kelam@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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).