* [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc()
@ 2017-04-10 2:15 NeilBrown
2017-04-17 19:03 ` Tyrel Datwyler
2017-04-19 1:51 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: NeilBrown @ 2017-04-10 2:15 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen
Cc: Tyrel Datwyler, linux-scsi, linuxppc-dev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
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>
---
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;
--
2.12.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc()
2017-04-10 2:15 [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc() NeilBrown
@ 2017-04-17 19:03 ` Tyrel Datwyler
2017-04-19 1:51 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Tyrel Datwyler @ 2017-04-17 19:03 UTC (permalink / raw)
To: NeilBrown, James E.J. Bottomley, Martin K. Petersen
Cc: Tyrel Datwyler, linux-scsi, linuxppc-dev, linux-kernel
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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc()
2017-04-10 2:15 [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc() NeilBrown
2017-04-17 19:03 ` Tyrel Datwyler
@ 2017-04-19 1:51 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-04-19 1:51 UTC (permalink / raw)
To: NeilBrown
Cc: James E.J. Bottomley, Martin K. Petersen, Tyrel Datwyler,
linux-scsi, linuxppc-dev, linux-kernel
NeilBrown <neilb@suse.com> writes:
> mempool_alloc() cannot fail when passed GFP_NOIO or any other gfp
> setting that is permitted to sleep. So remove this pointless code.
Applied to 4.12/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-19 1:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 2:15 [PATCH] scsi: ibmvfc: don't check for failure from mempool_alloc() NeilBrown
2017-04-17 19:03 ` Tyrel Datwyler
2017-04-19 1:51 ` Martin K. Petersen
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).