]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netback: fix type mismatch warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 12 Oct 2016 14:54:01 +0000 (16:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Oct 2016 15:02:25 +0000 (11:02 -0400)
commit364167a4b680f280a9129df1797428af4e909034
tree37d2f1166601e98d8c51f3ef1f9df3fc99f3ec6c
parent38fc2bba10d2eab3e8fa446465a8643420ae6afc
xen-netback: fix type mismatch warning

Wiht the latest rework of the xen-netback driver, we get a warning
on ARM about the types passed into min():

drivers/net/xen-netback/rx.c: In function 'xenvif_rx_next_chunk':
include/linux/kernel.h:739:16: error: comparison of distinct pointer types lacks a cast [-Werror]

The reason is that XEN_PAGE_SIZE is not size_t here. There
is no actual bug, and we can easily avoid the warning using the
min_t() macro instead of min().

Fixes: 6fd0b7a0b30b ("xen-netback: refactor guest rx")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/rx.c