linux/drivers/memstick/host
Arnd Bergmann f419a08fb3 drivers/memstick/host/r592.c: avoid gcc-6 warning
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>
2016-03-25 16:37:42 -07:00
..
jmb38x_ms.c memstick: remove deprecated use of pci api 2015-06-30 19:44:57 -07:00
Kconfig memstick: Add realtek USB memstick host driver 2014-04-28 11:02:46 +01:00
Makefile memstick: Add realtek USB memstick host driver 2014-04-28 11:02:46 +01:00
r592.c drivers/memstick/host/r592.c: avoid gcc-6 warning 2016-03-25 16:37:42 -07:00
r592.h Fix common misspellings 2011-03-31 11:26:23 -03:00
rtsx_pci_ms.c memstick: host: drop owner assignment from platform_drivers 2014-10-20 16:20:53 +02:00
rtsx_usb_ms.c memstick: host: drop owner assignment from platform_drivers 2014-10-20 16:20:53 +02:00
tifm_ms.c memstick: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:19 +08:00