android_kernel_xiaomi_sm7250/include
Sedat Dilek 1ef1b20f87 scsi: fcoe: make use of fip_mode enum complete
[ Upstream commit 8beb90aaf334a6efa3e924339926b5f93a234dbb ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-05 22:33:04 +02:00
..
acpi
asm-generic x86/unwind/orc: Fix ORC unwind table alignment 2019-03-23 20:10:10 +01:00
clocksource
crypto
drm drm: disable uncached DMA optimization for ARM and arm64 2019-03-13 14:02:40 -07:00
dt-bindings
keys keys: Fix dependency loop between construction record and auth key 2019-03-23 20:09:48 +01:00
kvm KVM: arm/arm64: vgic: Make vgic_dist->lpi_list_lock a raw_spinlock 2019-03-23 20:09:42 +01:00
linux clk: fractional-divider: check parent rate only if flag is set 2019-04-05 22:33:03 +02:00
math-emu
media media: cec: keep track of outstanding transmits 2019-01-09 17:38:46 +01:00
memory
misc
net sctp: get sctphdr by offset in sctp_compute_cksum 2019-04-03 06:26:17 +02:00
pcmcia
ras
rdma
scsi scsi: fcoe: make use of fip_mode enum complete 2019-04-05 22:33:04 +02:00
soc
sound ALSA: compress: Fix stop handling on compressed capture streams 2019-02-12 19:47:23 +01:00
target scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long enough 2019-01-26 09:32:38 +01:00
trace sunrpc: use-after-free in svc_process_common() 2019-01-16 22:04:37 +01:00
uapi inet_diag: fix reporting cgroup classid and fallback to priority 2019-02-27 10:08:58 +01:00
video udlfb: handle unplug properly 2019-02-27 10:09:03 +01:00
xen Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" 2018-12-17 09:24:39 +01:00