Skip to content

Commit 3ff578c

Browse files
kedareswararaodavem330
authored andcommitted
net: axienet: Replace the occurrences of (1<<x) by BIT(x)
Replace all occurences of (1<<x) by BIT(x) to get rid of checkpatch.pl "CHECK" output "Prefer using the BIT macro". Signed-off-by: Appana Durga Kedareswara Rao <[email protected]> Signed-off-by: Radhey Shyam Pandey <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3361a6e commit 3ff578c

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

drivers/net/ethernet/xilinx/xilinx_axienet.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,40 +29,40 @@
2929
/* Configuration options */
3030

3131
/* Accept all incoming packets. Default: disabled (cleared) */
32-
#define XAE_OPTION_PROMISC (1 << 0)
32+
#define XAE_OPTION_PROMISC BIT(0)
3333

3434
/* Jumbo frame support for Tx & Rx. Default: disabled (cleared) */
35-
#define XAE_OPTION_JUMBO (1 << 1)
35+
#define XAE_OPTION_JUMBO BIT(1)
3636

3737
/* VLAN Rx & Tx frame support. Default: disabled (cleared) */
38-
#define XAE_OPTION_VLAN (1 << 2)
38+
#define XAE_OPTION_VLAN BIT(2)
3939

4040
/* Enable recognition of flow control frames on Rx. Default: enabled (set) */
41-
#define XAE_OPTION_FLOW_CONTROL (1 << 4)
41+
#define XAE_OPTION_FLOW_CONTROL BIT(4)
4242

4343
/* Strip FCS and PAD from incoming frames. Note: PAD from VLAN frames is not
4444
* stripped. Default: disabled (set)
4545
*/
46-
#define XAE_OPTION_FCS_STRIP (1 << 5)
46+
#define XAE_OPTION_FCS_STRIP BIT(5)
4747

4848
/* Generate FCS field and add PAD automatically for outgoing frames.
4949
* Default: enabled (set)
5050
*/
51-
#define XAE_OPTION_FCS_INSERT (1 << 6)
51+
#define XAE_OPTION_FCS_INSERT BIT(6)
5252

5353
/* Enable Length/Type error checking for incoming frames. When this option is
5454
* set, the MAC will filter frames that have a mismatched type/length field
5555
* and if XAE_OPTION_REPORT_RXERR is set, the user is notified when these
5656
* types of frames are encountered. When this option is cleared, the MAC will
5757
* allow these types of frames to be received. Default: enabled (set)
5858
*/
59-
#define XAE_OPTION_LENTYPE_ERR (1 << 7)
59+
#define XAE_OPTION_LENTYPE_ERR BIT(7)
6060

6161
/* Enable the transmitter. Default: enabled (set) */
62-
#define XAE_OPTION_TXEN (1 << 11)
62+
#define XAE_OPTION_TXEN BIT(11)
6363

6464
/* Enable the receiver. Default: enabled (set) */
65-
#define XAE_OPTION_RXEN (1 << 12)
65+
#define XAE_OPTION_RXEN BIT(12)
6666

6767
/* Default options set when device is initialized or reset */
6868
#define XAE_OPTION_DEFAULTS \
@@ -326,11 +326,11 @@
326326
#define XAE_MULTICAST_CAM_TABLE_NUM 4
327327

328328
/* Axi Ethernet Synthesis features */
329-
#define XAE_FEATURE_PARTIAL_RX_CSUM (1 << 0)
330-
#define XAE_FEATURE_PARTIAL_TX_CSUM (1 << 1)
331-
#define XAE_FEATURE_FULL_RX_CSUM (1 << 2)
332-
#define XAE_FEATURE_FULL_TX_CSUM (1 << 3)
333-
#define XAE_FEATURE_DMA_64BIT (1 << 4)
329+
#define XAE_FEATURE_PARTIAL_RX_CSUM BIT(0)
330+
#define XAE_FEATURE_PARTIAL_TX_CSUM BIT(1)
331+
#define XAE_FEATURE_FULL_RX_CSUM BIT(2)
332+
#define XAE_FEATURE_FULL_TX_CSUM BIT(3)
333+
#define XAE_FEATURE_DMA_64BIT BIT(4)
334334

335335
#define XAE_NO_CSUM_OFFLOAD 0
336336

0 commit comments

Comments
 (0)