From: Ben Hutchings Date: Thu, 6 Sep 2012 01:11:06 +0000 (+0100) Subject: sfc: Fix byte order warning in self-test X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3f978ef36cca9bb10c88a56baec1d9d1cb072b98;p=linux.git sfc: Fix byte order warning in self-test Add necessary cast when setting a bogus checksum. Signed-off-by: Ben Hutchings --- diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c index ce72ae4f399fd..f6651d35d615c 100644 --- a/drivers/net/ethernet/sfc/selftest.c +++ b/drivers/net/ethernet/sfc/selftest.c @@ -373,7 +373,7 @@ static void efx_iterate_state(struct efx_nic *efx) /* saddr set later and used as incrementing count */ payload->ip.daddr = htonl(INADDR_LOOPBACK); payload->ip.ihl = 5; - payload->ip.check = htons(0xdead); + payload->ip.check = (__force __sum16) htons(0xdead); payload->ip.tot_len = htons(sizeof(*payload) - sizeof(struct ethhdr)); payload->ip.version = IPVERSION; payload->ip.protocol = IPPROTO_UDP;