diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2014-11-17 04:51:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-18 15:19:32 -0500 |
commit | e453789a66ab152ecee80ded3279539d826c48ed (patch) | |
tree | f0bf1b8cfa8c9a3b0d9ea1654a427b80a6bc34a9 | |
parent | 6b7e4008389c8cb8140a9aef424b10048c44da39 (diff) |
net: fec: use swab32s() instead of cpu_to_be32()
when swap_buffer() is being called, we know for sure, that we need to
byte swap the data. Furthermore, this function is called for swapping
data in both directions. Thus cpu_to_be32() is semantically not
correct for all use cases. Use swab32s() to reflect this.
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 3884dd9de3a4..f73fee781e0b 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c | |||
@@ -293,7 +293,7 @@ static void *swap_buffer(void *bufaddr, int len) | |||
293 | unsigned int *buf = bufaddr; | 293 | unsigned int *buf = bufaddr; |
294 | 294 | ||
295 | for (i = 0; i < DIV_ROUND_UP(len, 4); i++, buf++) | 295 | for (i = 0; i < DIV_ROUND_UP(len, 4); i++, buf++) |
296 | *buf = cpu_to_be32(*buf); | 296 | swab32s(buf); |
297 | 297 | ||
298 | return bufaddr; | 298 | return bufaddr; |
299 | } | 299 | } |