linux-stable/drivers
Arnd Bergmann 860cd9c076 scsi: qla4xxx: shut up warning for rd_reg_indirect
The qla4_83xx_rd_reg_indirect() function can fail when it is unable to
read a register, but not all callers check its return value before using
the register data, and gcc correctly warns about this:

qla4xxx/ql4_83xx.c: In function 'qla4_83xx_process_reset_template':
qla4xxx/ql4_83xx.c:1073:36: warning: 'value' may be used uninitialized in this function
     ha->reset_tmplt.array[index++] = value;
                                    ^
qla4xxx/ql4_83xx.c:1050:11: note: 'value' was declared here
  uint32_t value;
           ^
qla4xxx/ql4_83xx.c:902:8: warning: 'value' may be used uninitialized in this function
  value &= p_rmw_hdr->test_mask;
        ^
qla4xxx/ql4_83xx.c:895:11: note: 'value' was declared here
  uint32_t value;
           ^
In file included from ../include/linux/io.h:25:0,
                 from ../include/linux/pci.h:31,
                 from ../drivers/scsi/qla4xxx/ql4_def.h:16,
                 from ../drivers/scsi/qla4xxx/ql4_83xx.c:10:
asm/io.h:101:2: warning: 'value' may be used uninitialized in this function
  asm volatile("str %1, %0"
  ^
qla4xxx/ql4_83xx.c:874:11: note: 'value' was declared here
  uint32_t value;
           ^

Unfortunately, I don't see any helpful way to add proper error handling
for this case, and the failure scenario for rd_reg seems rather obscure,
so this bails out and makes the rd_reg accessor set the result to
0xffffffff so we at least get a predictable value.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-02-23 21:27:02 -05:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base Merge branch 'component' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-02-14 10:40:21 -08:00
bcma
block
bluetooth
bus
cdrom
char hpet: Drop stale URLs 2016-02-17 09:39:56 +01:00
clk clk: gpio: Really allow an optional clock= DT property 2016-02-18 19:10:22 -08:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
devfreq
dio
dma dmaengine: dw: disable BLOCK IRQs for non-cyclic xfer 2016-02-15 22:19:32 +05:30
dma-buf
edac
eisa
extcon
firewire
firmware efi: Add pstore variables to the deletion whitelist 2016-02-16 12:48:18 +00:00
fmc
fpga
gpio
gpu drm/nouveau: use post-decrement in error handling 2016-02-19 13:36:05 +10:00
hid
hsi
hv
hwmon hwmon: (gpio-fan) Remove un-necessary speed_index lookup for thermal hook 2016-02-19 17:14:25 -08:00
hwspinlock
hwtracing
i2c i2c: i801: Adding Intel Lewisburg support for iTCO 2016-02-18 13:18:48 +01:00
ide
idle
iio
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-02-22 12:18:07 -08:00
input
iommu SVM fixes for Linux 4.5 2016-02-16 08:04:06 -08:00
ipack
irqchip
isdn ser_gigaset: use container_of() instead of detour 2016-02-19 15:52:41 -05:00
leds
lguest
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message mptfusion: hide unused seq_mpt_print_ioc_summary function 2016-02-23 21:27:02 -05:00
mfd
misc
mmc
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-02-22 12:18:07 -08:00
nfc
ntb
nubus
nvdimm
nvme NVMe: Rate limit nvme IO warnings 2016-02-12 08:10:31 -07:00
nvmem
of DeviceTree fixes for 4.5-rc5: 2016-02-17 11:50:53 -08:00
oprofile
parisc
parport
pci Xen bug fixes for 4.5-rc5 2016-02-22 13:57:01 -08:00
pcmcia
perf
phy
pinctrl pinctrl: samsung: fix SMP race condition 2016-02-15 20:45:50 +01:00
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390/dasd: fix performance drop 2016-02-17 09:24:07 +01:00
sbus
scsi scsi: qla4xxx: shut up warning for rd_reg_indirect 2016-02-23 21:27:02 -05:00
sfi
sh
sn
soc
spi Merge remote-tracking branches 'spi/fix/atmel', 'spi/fix/bcm2835aux', 'spi/fix/fsl-espi', 'spi/fix/imx', 'spi/fix/loopback' and 'spi/fix/omap2-mcspi' into spi-linus 2016-02-12 23:04:41 +00:00
spmi
ssb
staging
target
tc
thermal
thunderbolt
tty
uio
usb
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen Xen bug fixes for 4.5-rc5 2016-02-22 13:57:01 -08:00
zorro
Kconfig
Makefile