From: Tyrel Datwyler <turtle.in.the.kernel@gmail.com>
To: NeilBrown <neilb@suse.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc()
Date: Mon, 17 Apr 2017 12:03:09 -0700 [thread overview]
Message-ID: <6b896452-e653-bc96-3c26-1deeae995890@gmail.com> (raw)
In-Reply-To: <878tn9xb2m.fsf@notabene.neil.brown.name>
On 04/09/2017 07:15 PM, NeilBrown wrote:
>
> mempool_alloc() cannot fail when passed GFP_NOIO or any
> other gfp setting that is permitted to sleep.
> So remove this pointless code.
>
> Signed-off-by: NeilBrown <neilb@suse.com>
Acked-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> ---
> drivers/scsi/ibmvscsi/ibmvfc.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
> index 2c92dabb55f6..26cd3c28186a 100644
> --- a/drivers/scsi/ibmvscsi/ibmvfc.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c
> @@ -3910,12 +3910,6 @@ static int ibmvfc_alloc_target(struct ibmvfc_host *vhost, u64 scsi_id)
> spin_unlock_irqrestore(vhost->host->host_lock, flags);
>
> tgt = mempool_alloc(vhost->tgt_pool, GFP_NOIO);
> - if (!tgt) {
> - dev_err(vhost->dev, "Target allocation failure for scsi id %08llx\n",
> - scsi_id);
> - return -ENOMEM;
> - }
> -
> memset(tgt, 0, sizeof(*tgt));
> tgt->scsi_id = scsi_id;
> tgt->new_scsi_id = scsi_id;
>
next prev parent reply other threads:[~2017-04-17 19:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 2:15 [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc() NeilBrown
2017-04-17 19:03 ` Tyrel Datwyler [this message]
2017-04-19 1:51 ` 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=6b896452-e653-bc96-3c26-1deeae995890@gmail.com \
--to=turtle.in.the.kernel@gmail.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.petersen@oracle.com \
--cc=neilb@suse.com \
--cc=tyreld@linux.vnet.ibm.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).