* [PATCH] scsi: elx: efct: remove null check after call container_of()
@ 2022-05-17 1:25 Haowen Bai
2022-05-20 1:09 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Haowen Bai @ 2022-05-17 1:25 UTC (permalink / raw)
To: James Smart, Ram Vegesna, James E.J. Bottomley, Martin K. Petersen
Cc: Haowen Bai, linux-scsi, target-devel, linux-kernel
container_of() will never return NULL, so remove useless code.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
drivers/scsi/elx/efct/efct_lio.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c
index 8b004a5818d6..be4b5c1ee32d 100644
--- a/drivers/scsi/elx/efct/efct_lio.c
+++ b/drivers/scsi/elx/efct/efct_lio.c
@@ -370,9 +370,6 @@ static int efct_lio_get_cmd_state(struct se_cmd *cmd)
container_of(cmd, struct efct_scsi_tgt_io, cmd);
struct efct_io *io = container_of(ocp, struct efct_io, tgt_io);
- if (!io)
- return 0;
-
return io->tgt_io.state;
}
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: elx: efct: remove null check after call container_of()
2022-05-17 1:25 [PATCH] scsi: elx: efct: remove null check after call container_of() Haowen Bai
@ 2022-05-20 1:09 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2022-05-20 1:09 UTC (permalink / raw)
To: Haowen Bai, Ram Vegesna, James Smart, James E.J. Bottomley
Cc: Martin K . Petersen, linux-kernel, linux-scsi, target-devel
On Tue, 17 May 2022 09:25:36 +0800, Haowen Bai wrote:
> container_of() will never return NULL, so remove useless code.
>
>
Applied to 5.19/scsi-queue, thanks!
[1/1] scsi: elx: efct: remove null check after call container_of()
https://git.kernel.org/mkp/scsi/c/d627660c22b5
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-20 1:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 1:25 [PATCH] scsi: elx: efct: remove null check after call container_of() Haowen Bai
2022-05-20 1:09 ` 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
all inboxes | Powered by JetHome®