linux/drivers
Arnd Bergmann a4f642a8a3 tty: nozomi: avoid a harmless gcc warning
The nozomi wireless data driver has its own helper function to
transfer data from a FIFO, doing an extra byte swap on big-endian
architectures, presumably to bring the data back into byte-serial
order after readw() or readl() perform their implicit byteswap.

This helper function is used in the receive_data() function to
first read the length into a 32-bit variable, which causes
a compile-time warning:

drivers/tty/nozomi.c: In function 'receive_data':
drivers/tty/nozomi.c:857:9: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized]

The problem is that gcc is unsure whether the data was actually
read or not. We know that it is at this point, so we can replace
it with a single readl() to shut up that warning.

I am leaving the byteswap in there, to preserve the existing
behavior, even though this seems fishy: Reading the length of
the data into a cpu-endian variable should normally not use
a second byteswap on big-endian systems, unless the hardware
is aware of the CPU endianess.

There appears to be a lot more confusion about endianess in this
driver, so it probably has not worked on big-endian systems in
a long time, if ever, and I have no way to test it. It's well
possible that this driver has not been used by anyone in a while,
the last patch that looks like it was tested on the hardware is
from 2008.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-06 23:41:17 -08:00
..
accessibility
acpi Merge branches 'acpi-video' and 'acpi-hotplug' 2016-01-29 21:44:53 +01:00
amba
android
ata
atm
auxdisplay
base Driver core fix for 4.5-rc2 2016-01-31 16:55:04 -08:00
bcma
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2016-01-24 12:34:13 -08:00
bluetooth
bus
cdrom
char char: constify tty_port_operations structs 2016-02-06 23:31:08 -08:00
clk
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-01-31 15:49:06 -08:00
connector
cpufreq Merge branches 'pm-cpuidle', 'pm-cpufreq', 'pm-domains' and 'pm-sleep' 2016-01-29 21:45:17 +01:00
cpuidle Merge branches 'pm-cpuidle', 'pm-cpufreq', 'pm-domains' and 'pm-sleep' 2016-01-29 21:45:17 +01:00
crypto
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
fpga
gpio
gpu Merge branch 'drm-rockchip-next-fixes-2016-01-22' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes 2016-01-29 10:04:29 +10:00
hid
hsi
hv
hwmon hwmon: (fam15h_power) Add bit masking for tdp_limit 2016-01-27 18:48:46 -08:00
hwspinlock
hwtracing
i2c i2c: piix4: don't regress on bus names 2016-01-29 11:13:52 +01:00
ide
idle
iio Staging fixes for 4.5-rc2 2016-01-31 17:00:27 -08:00
infiniband Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-01-22 17:20:30 -08:00
iommu iommu/amd: Correct the wrong setting of alias DTE in do_attach 2016-01-29 12:30:47 +01:00
ipack
irqchip Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-01-31 14:48:58 -08:00
isdn isdn: Remove ASYNC_CLOSING 2016-01-28 14:19:12 -08:00
leds
lguest
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc tty: Use termios c_*flag macros 2016-01-28 14:13:44 -08:00
mtd Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-01-24 12:50:56 -08:00
net net: irda: Fix use-after-free in irtty_open() 2016-02-06 23:28:31 -08:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of of: earlycon: Log more helpful message if stdout-path node not found 2016-02-06 22:07:37 -08:00
oprofile
parisc
parport
pci Merge branches 'acpi-video' and 'acpi-hotplug' 2016-01-29 21:44:53 +01:00
pcmcia
perf
phy
pinctrl
platform ideapad-laptop: Add Lenovo Yoga 700 to no_hw_rfkill dmi list 2016-01-24 10:15:01 -08:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 Merge 4.5-rc2 into tty-next 2016-02-01 12:53:14 -08:00
sbus
scsi Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes 2016-01-26 17:44:42 -08:00
sfi
sh
sn
soc ARM: SoC support for Tegra platforms for v4.5 2016-01-22 17:30:52 -08:00
spi
spmi
ssb
staging Merge 4.5-rc2 into tty-next 2016-02-01 12:53:14 -08:00
target
tc
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2016-01-24 12:43:06 -08:00
thunderbolt
tty tty: nozomi: avoid a harmless gcc warning 2016-02-06 23:41:17 -08:00
uio
usb Merge 4.5-rc2 into tty-next 2016-02-01 12:53:14 -08:00
uwb
vfio vfio/noiommu: Don't use iommu_present() to track fake groups 2016-01-27 11:22:25 -07:00
vhost
video
virt
virtio virtio_pci: fix use after free on release 2016-01-26 10:18:28 +02:00
vlynq
vme
w1
watchdog
xen Merge branch 'stable/for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm 2016-01-29 15:13:48 -08:00
zorro
Kconfig
Makefile