From 170b7d2de29e6239b8dbc63a88de1fa9789b0d8d Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Mon, 19 Oct 2020 07:23:33 -0700 Subject: scsi: Remove unneeded break statements A break is not needed if it is preceded by a return or goto. Link: https://lore.kernel.org/r/20201019142333.16584-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen --- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/scsi/bnx2fc') diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c index 08992095ce7a..b37b0a9ec12d 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c +++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c @@ -770,7 +770,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe) } else printk(KERN_ERR PFX "SRR in progress\n"); goto ret_err_rqe; - break; default: break; } -- cgit From e31ac898ac298b7a0451b0406769a024bd286e4d Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 26 Oct 2020 17:06:12 +0100 Subject: scsi: libfc: Move scsi/fc_encode.h to libfc Most of this file is only used inside of libfc, so move it to where it is actually used, with only fc_fill_fc_hdr() left inside of the header. Link: https://lore.kernel.org/r/20201026160705.3706396-1-arnd@kernel.org Reported-by: kernel test robot Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen --- drivers/scsi/bnx2fc/bnx2fc.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/scsi/bnx2fc') diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index b6e8ed757252..b4cea8b06ea1 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++ b/drivers/scsi/bnx2fc/bnx2fc.h @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include -- cgit From 4a9435b7b04ed8bb39e2c563d93b522bc226b16f Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sun, 1 Nov 2020 06:38:12 -0800 Subject: scsi: bnx2fc: Remove unneeded semicolon A semicolon is not needed after a switch statement. Link: https://lore.kernel.org/r/20201101143812.2283642-1-trix@redhat.com Reviewed-by: Saurav Kashyap Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/bnx2fc') diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 6890bbe04a8c..a436adb6092d 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2275,7 +2275,7 @@ static int bnx2fc_ctlr_enabled(struct fcoe_ctlr_device *cdev) case FCOE_CTLR_UNUSED: default: return -ENOTSUPP; - }; + } } enum bnx2fc_create_link_state { -- cgit From cb2b4e8f5ea69b6dc0a37ace8c6ffb1854c1f9e5 Mon Sep 17 00:00:00 2001 From: Kaixu Xia Date: Sun, 8 Nov 2020 00:52:00 +0800 Subject: scsi: bnx2fc: Fix comparison to bool warning Fix the following coccicheck warning: ./drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2089:5-23: WARNING: Comparison to bool ./drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2187:5-23: WARNING: Comparison to bool Link: https://lore.kernel.org/r/1604767920-8361-1-git-send-email-kaixuxia@tencent.com Reported-by: Tosk Robot Acked-by: Saurav Kashyap Signed-off-by: Kaixu Xia Signed-off-by: Martin K. Petersen --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/bnx2fc') diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index a436adb6092d..52bd0db643b0 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2086,7 +2086,7 @@ static int __bnx2fc_disable(struct fcoe_ctlr *ctlr) { struct bnx2fc_interface *interface = fcoe_ctlr_priv(ctlr); - if (interface->enabled == true) { + if (interface->enabled) { if (!ctlr->lp) { pr_err(PFX "__bnx2fc_disable: lport not found\n"); return -ENODEV; @@ -2184,7 +2184,7 @@ static int __bnx2fc_enable(struct fcoe_ctlr *ctlr) struct cnic_fc_npiv_tbl *npiv_tbl; struct fc_lport *lport; - if (interface->enabled == false) { + if (!interface->enabled) { if (!ctlr->lp) { pr_err(PFX "__bnx2fc_enable: lport not found\n"); return -ENODEV; -- cgit