Revision f419a08fb329e235df0cb8e329cff770e02d171a authored by Arnd Bergmann on 25 March 2016, 21:21:47 UTC, committed by Linus Torvalds on 25 March 2016, 23:37:42 UTC
The r592 driver relies on behavior of the DMA mapping API that is
normally observed but not guaranteed by the API.  Instead it uses a
runtime check to fail transfers if the API ever behaves

When CONFIG_NEED_SG_DMA_LENGTH is not set, one of the checks turns into a
comparison of a variable with itself, which gcc-6.0 now warns about:

drivers/memstick/host/r592.c: In function 'r592_transfer_fifo_dma':
drivers/memstick/host/r592.c:302:31: error: self-comparison always evaluates to false [-Werror=tautological-compare]
    (sg_dma_len(&dev->req->sg) < dev->req->sg.length)) {
                               ^

The check itself is not a problem, so this patch just rephrases the
condition in a way that gcc does not consider an indication of a mistake.
We already know that dev->req->sg.length was initially R592_LFIFO_SIZE, so
we can compare it to that constant again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 102c259
History
File Mode Size
Kconfig -rw-r--r-- 1.7 KB
Makefile -rw-r--r-- 323 bytes
budget.c -rw-r--r-- 23.8 KB
commit.c -rw-r--r-- 20.5 KB
compress.c -rw-r--r-- 6.7 KB
debug.c -rw-r--r-- 83.5 KB
debug.h -rw-r--r-- 12.4 KB
dir.c -rw-r--r-- 32.0 KB
file.c -rw-r--r-- 46.1 KB
find.c -rw-r--r-- 30.1 KB
gc.c -rw-r--r-- 27.8 KB
io.c -rw-r--r-- 33.4 KB
ioctl.c -rw-r--r-- 5.2 KB
journal.c -rw-r--r-- 42.4 KB
key.h -rw-r--r-- 14.7 KB
log.c -rw-r--r-- 19.3 KB
lprops.c -rw-r--r-- 36.0 KB
lpt.c -rw-r--r-- 58.6 KB
lpt_commit.c -rw-r--r-- 51.8 KB
master.c -rw-r--r-- 10.4 KB
misc.c -rw-r--r-- 1.1 KB
misc.h -rw-r--r-- 8.1 KB
orphan.c -rw-r--r-- 24.7 KB
recovery.c -rw-r--r-- 42.7 KB
replay.c -rw-r--r-- 29.4 KB
sb.c -rw-r--r-- 23.1 KB
scan.c -rw-r--r-- 9.5 KB
shrinker.c -rw-r--r-- 9.6 KB
super.c -rw-r--r-- 60.2 KB
tnc.c -rw-r--r-- 86.7 KB
tnc_commit.c -rw-r--r-- 26.8 KB
tnc_misc.c -rw-r--r-- 12.7 KB
ubifs-media.h -rw-r--r-- 22.7 KB
ubifs.h -rw-r--r-- 61.5 KB
xattr.c -rw-r--r-- 16.7 KB

back to top