diff options
author | David S. Miller <davem@davemloft.net> | 2015-04-17 15:15:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-11-09 12:50:24 -0800 |
commit | 5211b8aef9f583140302f111028b3a1ea0e08e4d (patch) | |
tree | bfbf51b3c9b9e80b8d5da7db1adf5b6e2523dc5e | |
parent | b8319d55f4d62bef89f54530832dd2914e5bd220 (diff) | |
download | lwn-5211b8aef9f583140302f111028b3a1ea0e08e4d.tar.gz lwn-5211b8aef9f583140302f111028b3a1ea0e08e4d.zip |
sfc: Fix memcpy() with const destination compiler warning.
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>
-rw-r--r-- | drivers/net/ethernet/sfc/selftest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c index 26641817a9c7..c9fcf6fa5479 100644 --- a/drivers/net/ethernet/sfc/selftest.c +++ b/drivers/net/ethernet/sfc/selftest.c @@ -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 */ |