sfc: Fix byte order warning in self-test
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 6 Sep 2012 01:11:06 +0000 (02:11 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Sat, 1 Dec 2012 00:26:07 +0000 (00:26 +0000)
Add necessary cast when setting a bogus checksum.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/selftest.c

index ce72ae4..f6651d3 100644 (file)
@@ -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;