diff mbox series

scsi: fcoe: remove redundant call to skb_transport_header

Message ID 20190815091454.13430-1-colin.king@canonical.com (mailing list archive)
State Mainlined
Commit e8fd0b9f6f487820a05a46ce3ac4b5df11ad6799
Headers show
Series scsi: fcoe: remove redundant call to skb_transport_header | expand

Commit Message

Colin King Aug. 15, 2019, 9:14 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer fh is being assigned a return value from the call to
skb_transport_header however this value is never read and fh
is being re-assigned immediately afterwards with a new value.
Since there are side-effects from calling skb_transport_header
the call is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/fcoe/fcoe.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Martin K. Petersen Aug. 29, 2019, 9:45 p.m. UTC | #1
Colin,

> Pointer fh is being assigned a return value from the call to
> skb_transport_header however this value is never read and fh is being
> re-assigned immediately afterwards with a new value.  Since there are
> side-effects from calling skb_transport_header the call is redundant
> and can be removed.

Applied to 5.4/scsi-queue. Thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 587d4bbb7d22..6fd61555120a 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1617,7 +1617,6 @@  static inline int fcoe_filter_frames(struct fc_lport *lport,
 	else
 		fr_flags(fp) |= FCPHF_CRC_UNCHECKED;
 
-	fh = (struct fc_frame_header *) skb_transport_header(skb);
 	fh = fc_frame_header_get(fp);
 	if (fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA && fh->fh_type == FC_TYPE_FCP)
 		return 0;