Skip to content

Commit b67445f

Browse files
Wu Fengguangtorvalds
authored andcommitted
generic swap(): iphase: rename swap() to swap_byte_order()
In preparation for the introduction of a generic swap() macro. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1a8a27c commit b67445f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/atm/iphase.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#include <linux/jiffies.h>
6565
#include "iphase.h"
6666
#include "suni.h"
67-
#define swap(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))
67+
#define swap_byte_order(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))
6868

6969
#define PRIV(dev) ((struct suni_priv *) dev->phy_data)
7070

@@ -1306,7 +1306,7 @@ static void rx_dle_intr(struct atm_dev *dev)
13061306
// get real pkt length pwang_test
13071307
trailer = (struct cpcs_trailer*)((u_char *)skb->data +
13081308
skb->len - sizeof(*trailer));
1309-
length = swap(trailer->length);
1309+
length = swap_byte_order(trailer->length);
13101310
if ((length > iadev->rx_buf_sz) || (length >
13111311
(skb->len - sizeof(struct cpcs_trailer))))
13121312
{
@@ -2995,7 +2995,7 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) {
29952995
skb->len, PCI_DMA_TODEVICE);
29962996
wr_ptr->local_pkt_addr = (buf_desc_ptr->buf_start_hi << 16) |
29972997
buf_desc_ptr->buf_start_lo;
2998-
/* wr_ptr->bytes = swap(total_len); didn't seem to affect ?? */
2998+
/* wr_ptr->bytes = swap_byte_order(total_len); didn't seem to affect?? */
29992999
wr_ptr->bytes = skb->len;
30003000

30013001
/* hw bug - DLEs of 0x2d, 0x2e, 0x2f cause DMA lockup */

0 commit comments

Comments
 (0)