diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-07-28 20:26:08 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-08-07 21:30:50 -0400 |
commit | 4c73598732f7954867d95e315e5465b6ce7767a0 (patch) | |
tree | db72d13e722ce389a5336e4f0c6bbeeb9d6c9168 | |
parent | e5460f084b84f06756e558fbfd2313202fb1dbd0 (diff) |
scsi: ibmvfc: Mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_npiv_login_done':
drivers/scsi/ibmvscsi/ibmvfc.c:4022:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
ibmvfc_retry_host_init(vhost);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ibmvscsi/ibmvfc.c:4023:2: note: here
case IBMVFC_MAD_DRIVER_FAILED:
^~~~
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_bsg_request':
drivers/scsi/ibmvscsi/ibmvfc.c:1830:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
port_id = (bsg_request->rqst_data.h_els.port_id[0] << 16) |
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(bsg_request->rqst_data.h_els.port_id[1] << 8) |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bsg_request->rqst_data.h_els.port_id[2];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ibmvscsi/ibmvfc.c:1833:2: note: here
case FC_BSG_RPT_ELS:
^~~~
drivers/scsi/ibmvscsi/ibmvfc.c:1838:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
port_id = (bsg_request->rqst_data.h_ct.port_id[0] << 16) |
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(bsg_request->rqst_data.h_ct.port_id[1] << 8) |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bsg_request->rqst_data.h_ct.port_id[2];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ibmvscsi/ibmvfc.c:1841:2: note: here
case FC_BSG_RPT_CT:
^~~~
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index acd16e0d52cf..fe38d92c9c9f 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -1830,6 +1830,7 @@ static int ibmvfc_bsg_request(struct bsg_job *job) | |||
1830 | port_id = (bsg_request->rqst_data.h_els.port_id[0] << 16) | | 1830 | port_id = (bsg_request->rqst_data.h_els.port_id[0] << 16) | |
1831 | (bsg_request->rqst_data.h_els.port_id[1] << 8) | | 1831 | (bsg_request->rqst_data.h_els.port_id[1] << 8) | |
1832 | bsg_request->rqst_data.h_els.port_id[2]; | 1832 | bsg_request->rqst_data.h_els.port_id[2]; |
1833 | /* fall through */ | ||
1833 | case FC_BSG_RPT_ELS: | 1834 | case FC_BSG_RPT_ELS: |
1834 | fc_flags = IBMVFC_FC_ELS; | 1835 | fc_flags = IBMVFC_FC_ELS; |
1835 | break; | 1836 | break; |
@@ -1838,6 +1839,7 @@ static int ibmvfc_bsg_request(struct bsg_job *job) | |||
1838 | port_id = (bsg_request->rqst_data.h_ct.port_id[0] << 16) | | 1839 | port_id = (bsg_request->rqst_data.h_ct.port_id[0] << 16) | |
1839 | (bsg_request->rqst_data.h_ct.port_id[1] << 8) | | 1840 | (bsg_request->rqst_data.h_ct.port_id[1] << 8) | |
1840 | bsg_request->rqst_data.h_ct.port_id[2]; | 1841 | bsg_request->rqst_data.h_ct.port_id[2]; |
1842 | /* fall through */ | ||
1841 | case FC_BSG_RPT_CT: | 1843 | case FC_BSG_RPT_CT: |
1842 | fc_flags = IBMVFC_FC_CT_IU; | 1844 | fc_flags = IBMVFC_FC_CT_IU; |
1843 | break; | 1845 | break; |
@@ -4020,6 +4022,7 @@ static void ibmvfc_npiv_login_done(struct ibmvfc_event *evt) | |||
4020 | return; | 4022 | return; |
4021 | case IBMVFC_MAD_CRQ_ERROR: | 4023 | case IBMVFC_MAD_CRQ_ERROR: |
4022 | ibmvfc_retry_host_init(vhost); | 4024 | ibmvfc_retry_host_init(vhost); |
4025 | /* fall through */ | ||
4023 | case IBMVFC_MAD_DRIVER_FAILED: | 4026 | case IBMVFC_MAD_DRIVER_FAILED: |
4024 | ibmvfc_free_event(evt); | 4027 | ibmvfc_free_event(evt); |
4025 | return; | 4028 | return; |