]> git.hungrycats.org Git - linux/commitdiff
sfc: Fix memcpy() with const destination compiler warning.
authorDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2015 19:15:40 +0000 (15:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 20:50:24 +0000 (12:50 -0800)
commit 1d20a16062e771b6e26b843c0cde3b17c1146e00 upstream.

drivers/net/ethernet/sfc/selftest.c: In function ‘efx_iterate_state’:
drivers/net/ethernet/sfc/selftest.c:388:9: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]

This is because the msg[] member of struct efx_loopback_payload
is marked as 'const'.  Remove that.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sfc/selftest.c

index 26641817a9c73ab6634057faaa93cba9f91ece0d..c9fcf6fa5479bd9d8e58c2a649ba5022c88f790b 100644 (file)
@@ -46,7 +46,7 @@ struct efx_loopback_payload {
        struct iphdr ip;
        struct udphdr udp;
        __be16 iteration;
-       const char msg[64];
+       char msg[64];
 } __packed;
 
 /* Loopback test source MAC address */