scsi: fnic: Remove unnecessary else and unnecessary break in FDLS
Subsystems (2)
Karan Tilak Kumar
maintainerPATCH 1/3 scsi: fnic: Remove unnecessary else and unnecessary break in FDLS
Incorporate review comments from Martin:
Remove unnecessary else and unnecessary break to fix warnings in the FDLS code.
Reviewed-by Sesidhar Baddela <[email protected]>
Reviewed-by Arulprabhu Ponnusamy <[email protected]>
Reviewed-by Gian Carlo Boffa <[email protected]>
Reviewed-by Arun Easi <[email protected]>
Signed-off-by Karan Tilak Kumar <[email protected]>
--- drivers/scsi/fnic/fdls_disc.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/scsi/fnic/fdls_disc.c +6 -10
@@ -2776,23 +2776,19 @@ fdls_process_tgt_prli_rsp(struct fnic_iport_s *iport,/*Retry Plogi again from the timer routine. */ tport->flags |=FNIC_FDLS_RETRY_FRAME ;return ; - }else { -FNIC_FCS_DBG (KERN_INFO , fnic->host, fnic->fnic_num, -"PRLI returned ELS_LS_RJT from target: 0x%x" , - tgt_fcid); - -fdls_tgt_logout (iport, tport); -fdls_delete_tport (iport, tport); -return ; } -break ; +FNIC_FCS_DBG (KERN_INFO , fnic->host, fnic->fnic_num, +"PRLI returned ELS_LS_RJT from target: 0x%x" , + tgt_fcid); +fdls_tgt_logout (iport, tport); +fdls_delete_tport (iport, tport); +return ;default :atomic64_inc (&iport->iport_stats.tport_prli_misc_rejects);FNIC_FCS_DBG (KERN_INFO , fnic->host, fnic->fnic_num,"PRLI not accepted from target: 0x%x" , tgt_fcid);return ; -break ; } FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
Signature · 1 line
2.47.1
Karan Tilak Kumar
maintainerPATCH 2/3 scsi: fnic: Remove extern definition from .c files
Implement review comments from Martin:
Remove extern definition of fnic_fip_queue from .c files
Reviewed-by Sesidhar Baddela <[email protected]>
Reviewed-by Arulprabhu Ponnusamy <[email protected]>
Reviewed-by Gian Carlo Boffa <[email protected]>
Reviewed-by Arun Easi <[email protected]>
Signed-off-by Karan Tilak Kumar <[email protected]>
--- drivers/scsi/fnic/fip.c | 2 -- drivers/scsi/fnic/fip.h | 2 ++ drivers/scsi/fnic/fnic_fcs.c | 1 - 3 files changed, 2 insertions(+), 3 deletions(-)
drivers/scsi/fnic/fip.c +0 -2
@@ -7,8 +7,6 @@#include "fip.h" #include <linux/etherdevice.h> -extern struct workqueue_struct *fnic_fip_queue; -#define FIP_FNIC_RESET_WAIT_COUNT 15/**
drivers/scsi/fnic/fip.h +2 -0
@@ -131,6 +131,8 @@ void fnic_fcoe_start_flogi(struct fnic *fnic);void fnic_fcoe_process_cvl (struct fnic *fnic,struct fip_header *fiph);void fnic_vlan_discovery_timeout (struct fnic *fnic); +extern struct workqueue_struct *fnic_fip_queue; +#ifdef FNIC_DEBUG static inline void fnic_debug_dump_fip_frame(struct fnic *fnic, struct ethhdr *eth,
drivers/scsi/fnic/fnic_fcs.c +0 -1
@@ -27,7 +27,6 @@#define MAX_RESET_WAIT_COUNT 64 -extern struct workqueue_struct *fnic_fip_queue;struct workqueue_struct *fnic_event_queue;static uint8_t FCOE_ALL_FCF_MAC [6 ] =FC_FCOE_FLOGI_MAC ;
Signature · 1 line
2.47.1
Karan Tilak Kumar
maintainerPATCH 3/3 scsi: fnic: Remove unnecessary else to fix warning in FDLS FIP
In reply to Karan Tilak KumarImplement review comments from Martin:
Remove unnecessary else from fip.c to fix a warning.
Reviewed-by Sesidhar Baddela <[email protected]>
Reviewed-by Arulprabhu Ponnusamy <[email protected]>
Reviewed-by Gian Carlo Boffa <[email protected]>
Reviewed-by Arun Easi <[email protected]>
Signed-off-by Karan Tilak Kumar <[email protected]>
--- drivers/scsi/fnic/fip.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/scsi/fnic/fip.c +8 -9
@@ -154,16 +154,15 @@ void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct fip_header *fiph) vlan->state =FIP_VLAN_AVAIL ;list_add_tail (&vlan->list, &fnic->vlan_list);break ; - }else { -FNIC_FIP_DBG (KERN_INFO , fnic->host, - fnic->fnic_num, -"Invalid descriptor type(%x) in VLan response\n" , - vlan_desc->fd_desc.fip_dtype); -/* -* Note : received a type=2 descriptor here i.e. FIP -* MAC Address Descriptor -*/ } +FNIC_FIP_DBG (KERN_INFO , fnic->host, + fnic->fnic_num, +"Invalid descriptor type(%x) in VLan response\n" , + vlan_desc->fd_desc.fip_dtype); +/* +* Note : received a type=2 descriptor here i.e. FIP +* MAC Address Descriptor +*/ cur_desc += vlan_desc->fd_desc.fip_dlen; desc_len -= vlan_desc->fd_desc.fip_dlen; }
Signature · 1 line
2.47.1