* [PATCH] scsi: libfc: remove unnecessary assertion on ep variable
@ 2019-12-17 21:22 Aditya Pakki
2019-12-18 11:12 ` Hannes Reinecke
2019-12-19 23:45 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Aditya Pakki @ 2019-12-17 21:22 UTC (permalink / raw)
To: pakki001
Cc: kjlu, Martin K. Petersen, Andrew Morton, Thomas Gleixner,
Ira Weiny, Allison Randal, Greg Kroah-Hartman,
Matthew Wilcox (Oracle),
linux-scsi, target-devel, linux-kernel
In ft_recv_write_data(), the pointer ep is dereferenced first and
then asserts for NULL. The patch removes the unnecessary assertion.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
drivers/target/tcm_fc/tfc_io.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
index 1354a157e9af..6a38ff936389 100644
--- a/drivers/target/tcm_fc/tfc_io.c
+++ b/drivers/target/tcm_fc/tfc_io.c
@@ -221,7 +221,6 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
ep = fc_seq_exch(seq);
lport = ep->lp;
if (cmd->was_ddp_setup) {
- BUG_ON(!ep);
BUG_ON(!lport);
/*
* Since DDP (Large Rx offload) was setup for this request,
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: libfc: remove unnecessary assertion on ep variable
2019-12-17 21:22 [PATCH] scsi: libfc: remove unnecessary assertion on ep variable Aditya Pakki
@ 2019-12-18 11:12 ` Hannes Reinecke
2019-12-19 23:45 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2019-12-18 11:12 UTC (permalink / raw)
To: Aditya Pakki
Cc: kjlu, Martin K. Petersen, Andrew Morton, Thomas Gleixner,
Ira Weiny, Allison Randal, Greg Kroah-Hartman,
Matthew Wilcox (Oracle),
linux-scsi, target-devel, linux-kernel
On 12/17/19 10:22 PM, Aditya Pakki wrote:
> In ft_recv_write_data(), the pointer ep is dereferenced first and
> then asserts for NULL. The patch removes the unnecessary assertion.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> drivers/target/tcm_fc/tfc_io.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
> index 1354a157e9af..6a38ff936389 100644
> --- a/drivers/target/tcm_fc/tfc_io.c
> +++ b/drivers/target/tcm_fc/tfc_io.c
> @@ -221,7 +221,6 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
> ep = fc_seq_exch(seq);
> lport = ep->lp;
> if (cmd->was_ddp_setup) {
> - BUG_ON(!ep);
> BUG_ON(!lport);
> /*
> * Since DDP (Large Rx offload) was setup for this request,
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: libfc: remove unnecessary assertion on ep variable
2019-12-17 21:22 [PATCH] scsi: libfc: remove unnecessary assertion on ep variable Aditya Pakki
2019-12-18 11:12 ` Hannes Reinecke
@ 2019-12-19 23:45 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-12-19 23:45 UTC (permalink / raw)
To: Aditya Pakki
Cc: kjlu, Martin K. Petersen, Andrew Morton, Thomas Gleixner,
Ira Weiny, Allison Randal, Greg Kroah-Hartman,
Matthew Wilcox (Oracle),
linux-scsi, target-devel, linux-kernel
Aditya,
> In ft_recv_write_data(), the pointer ep is dereferenced first and
> then asserts for NULL. The patch removes the unnecessary assertion.
Applied to 5.6/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-19 23:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 21:22 [PATCH] scsi: libfc: remove unnecessary assertion on ep variable Aditya Pakki
2019-12-18 11:12 ` Hannes Reinecke
2019-12-19 23:45 ` 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).