linux/drivers/scsi/qedf
Sedat Dilek 8beb90aaf3 scsi: fcoe: make use of fip_mode enum complete
commit 1917d42d14 ("fcoe: use enum for fip_mode") introduces a separate
enum for the fip_mode that shall be used during initialisation handling
until it is passed to fcoe_ctrl_link_up to set the initial fip_state.  That
change was incomplete and gcc quietly converted in various places between
the fip_mode and the fip_state enum values with implicit enum conversions,
which fortunately cannot cause any issues in the actual code's execution.

clang however warns about these implicit enum conversions in the scsi
drivers. This commit consolidates the use of the two enums, guided by
clang's enum-conversion warnings.

This commit now completes the use of the fip_mode: It expects and uses
fip_mode in {bnx2fc,fcoe}_interface_create and fcoe_ctlr_init, and it calls
fcoe_ctrl_set_set() with the correct values in fcoe_ctlr_link_up().  It
also breaks the association between FIP_MODE_AUTO and FIP_ST_AUTO to
indicate these two enums are distinct.

Link: https://github.com/ClangBuiltLinux/linux/issues/151
Fixes: 1917d42d14 ("fcoe: use enum for fip_mode")
Reported-by: Dmitry Golovin <dima@golovin.in>
Original-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
CC: Lukas Bulwahn <lukas.bulwahn@gmail.com>
CC: Nick Desaulniers <ndesaulniers@google.com>
CC: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Suggested-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-02-19 18:58:38 -05:00
..
drv_fcoe_fw_funcs.c scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
drv_fcoe_fw_funcs.h scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
drv_scsi_fw_funcs.c scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
drv_scsi_fw_funcs.h scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
Kconfig
Makefile qed*: Utilize Firmware 8.15.3.0 2017-03-13 15:33:09 -07:00
qedf_attr.c scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
qedf_dbg.c scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
qedf_dbg.h scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
qedf_debugfs.c scsi: qedf: no need to check return value of debugfs_create functions 2019-01-29 00:40:54 -05:00
qedf_els.c scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
qedf_fip.c SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
qedf_hsi.h scsi: qedf: Update copyright for 2018 2018-05-08 00:57:11 -04:00
qedf_io.c scsi: stop setting up request->special 2019-02-05 21:29:49 -05:00
qedf_main.c scsi: fcoe: make use of fip_mode enum complete 2019-02-19 18:58:38 -05:00
qedf_version.h scsi: qedf: Update version number to 8.33.16.20 2018-05-08 00:57:11 -04:00
qedf.h SCSI misc on 20180610 2018-06-10 13:01:12 -07:00