summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-02-11 15:11:50 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-02-11 15:11:50 +0000
commitd1d492eaf95fecf38f002e177de79c475c5dab32 (patch)
tree39de1ee804e554241a24448641bd49c00f5ea35c
parent825069235900e46a9a05c95ab7c301ccfecf31ec (diff)
downloadmtk-20170518-d1d492eaf95fecf38f002e177de79c475c5dab32.zip
mtk-20170518-d1d492eaf95fecf38f002e177de79c475c5dab32.tar.gz
mtk-20170518-d1d492eaf95fecf38f002e177de79c475c5dab32.tar.bz2
ramips: raeth: protect macro parameters
SVN-Revision: 30441
-rw-r--r--target/linux/ramips/files/drivers/net/ramips_eth.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips_eth.h b/target/linux/ramips/files/drivers/net/ramips_eth.h
index ecf8d77..9ad6046 100644
--- a/target/linux/ramips/files/drivers/net/ramips_eth.h
+++ b/target/linux/ramips/files/drivers/net/ramips_eth.h
@@ -185,7 +185,7 @@
#define RAMIPS_US_CYC_CNT_SHIFT 0x8
#define RAMIPS_US_CYC_CNT_DIVISOR 1000000
-#define RX_DMA_PLEN0(x) ((x >> 16) & 0x3fff)
+#define RX_DMA_PLEN0(_x) (((_x) >> 16) & 0x3fff)
#define RX_DMA_LSO BIT(30)
#define RX_DMA_DONE BIT(31)
@@ -197,11 +197,11 @@ struct ramips_rx_dma {
};
#define TX_DMA_PLEN0_MASK ((0x3fff) << 16)
-#define TX_DMA_PLEN0(x) ((x & 0x3fff) << 16)
+#define TX_DMA_PLEN0(_x) (((_x) & 0x3fff) << 16)
#define TX_DMA_LSO BIT(30)
#define TX_DMA_DONE BIT(31)
-#define TX_DMA_QN(x) (x << 16)
-#define TX_DMA_PN(x) (x << 24)
+#define TX_DMA_QN(_x) ((_x) << 16)
+#define TX_DMA_PN(_x) ((_x) << 24)
#define TX_DMA_QN_MASK TX_DMA_QN(0x7)
#define TX_DMA_PN_MASK TX_DMA_PN(0x7)