Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1658039 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-06-05 19:40 +0200 |
| Last post | 2017-06-13 03:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on tgt Colin King <colin.king@canonical.com> - 2017-06-05 19:40 +0200
Re: [PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on tgt "Madhani, Himanshu" <Himanshu.Madhani@cavium.com> - 2017-06-08 00:50 +0200
Re: [PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on tgt "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-06-13 03:20 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-06-05 19:40 +0200 |
| Subject | [PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on tgt |
| Message-ID | <tP48W-5TT-29@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
An earlier commit ed7fb808477b846bb2 ("scsi: qla2xxx: Remove
redundant wait when target is stopped.") removed a null check
on ha->tgt.tgt_ops and replaced it with a new check that null
checked tgt, thus making the subsequent null check on tgt
totally redundant. Remove it.
Detected by CoverityScan, CID#1440452 ("Logically Dead Code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/qla2xxx/qla_target.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index cb33ca87ca37..3594a76f6155 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -5519,12 +5519,6 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha,
if (!tgt || tgt->tgt_stop || tgt->tgt_stopped)
return;
- if (unlikely(tgt == NULL)) {
- ql_dbg(ql_dbg_tgt, vha, 0xe03a,
- "ASYNC EVENT %#x, but no tgt (ha %p)\n", code, ha);
- return;
- }
-
if (((code == MBA_POINT_TO_POINT) || (code == MBA_CHG_IN_CONNECTION)) &&
IS_QLA2100(ha))
return;
--
2.11.0
[toc] | [next] | [standalone]
| From | "Madhani, Himanshu" <Himanshu.Madhani@cavium.com> |
|---|---|
| Date | 2017-06-08 00:50 +0200 |
| Subject | Re: [PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on tgt |
| Message-ID | <tPRW2-4j4-15@gated-at.bofh.it> |
| In reply to | #1658039 |
> On Jun 5, 2017, at 10:29 AM, Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> An earlier commit ed7fb808477b846bb2 ("scsi: qla2xxx: Remove
> redundant wait when target is stopped.") removed a null check
> on ha->tgt.tgt_ops and replaced it with a new check that null
> checked tgt, thus making the subsequent null check on tgt
> totally redundant. Remove it.
>
> Detected by CoverityScan, CID#1440452 ("Logically Dead Code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/scsi/qla2xxx/qla_target.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
> index cb33ca87ca37..3594a76f6155 100644
> --- a/drivers/scsi/qla2xxx/qla_target.c
> +++ b/drivers/scsi/qla2xxx/qla_target.c
> @@ -5519,12 +5519,6 @@ void qlt_async_event(uint16_t code, struct scsi_qla_host *vha,
> if (!tgt || tgt->tgt_stop || tgt->tgt_stopped)
> return;
>
> - if (unlikely(tgt == NULL)) {
> - ql_dbg(ql_dbg_tgt, vha, 0xe03a,
> - "ASYNC EVENT %#x, but no tgt (ha %p)\n", code, ha);
> - return;
> - }
> -
> if (((code == MBA_POINT_TO_POINT) || (code == MBA_CHG_IN_CONNECTION)) &&
> IS_QLA2100(ha))
> return;
> --
> 2.11.0
>
Looks good.
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Thanks,
- Himanshu
[toc] | [prev] | [next] | [standalone]
| From | "Martin K. Petersen" <martin.petersen@oracle.com> |
|---|---|
| Date | 2017-06-13 03:20 +0200 |
| Message-ID | <tRIEW-1n3-11@gated-at.bofh.it> |
| In reply to | #1658039 |
Colin,
> An earlier commit ed7fb808477b846bb2 ("scsi: qla2xxx: Remove redundant
> wait when target is stopped.") removed a null check on ha->tgt.tgt_ops
> and replaced it with a new check that null checked tgt, thus making
> the subsequent null check on tgt totally redundant. Remove it.
Applied to 4.13/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web