]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
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 ce72ae4f399fdf3861262967aeb8222d5856bd85..f6651d35d615c2c85c6b129a9fc8dcffeba22176 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;