]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-netback: fix type mismatch warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 12 May 2017 08:46:36 +0000 (09:46 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Wed, 31 May 2017 21:51:56 +0000 (22:51 +0100)
commit1993cdf4e562753ff5cd3802ecbe3503f5eba12a
tree58d0373cbd88dad2153db405612a85dd12c3c6ef
parent41bc649ff27a686ea08dfad05720dda1206f1ac6
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: eb1723a29b9a ("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>
(cherry picked from commit f112be65fd3964ec2d56ddd0d5e6061b0fd502da)
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/net/xen-netback/rx.c