Commit 4725ceb9 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller

rocker: make checkpatch -f clean

Well almost clean: ignore the CHECKs for space after cast operator and some
longer-than-80 char cases where for readability it's better to keep as-is.
Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7889cbee
......@@ -181,7 +181,7 @@ struct rocker_desc_info {
size_t data_size;
size_t tlv_size;
struct rocker_desc *desc;
DEFINE_DMA_UNMAP_ADDR(mapaddr);
dma_addr_t mapaddr;
};
struct rocker_dma_ring_info {
......@@ -237,21 +237,21 @@ struct rocker {
struct {
u64 id;
} hw;
spinlock_t cmd_ring_lock;
spinlock_t cmd_ring_lock; /* for cmd ring accesses */
struct rocker_dma_ring_info cmd_ring;
struct rocker_dma_ring_info event_ring;
DECLARE_HASHTABLE(flow_tbl, 16);
spinlock_t flow_tbl_lock;
spinlock_t flow_tbl_lock; /* for flow tbl accesses */
u64 flow_tbl_next_cookie;
DECLARE_HASHTABLE(group_tbl, 16);
spinlock_t group_tbl_lock;
spinlock_t group_tbl_lock; /* for group tbl accesses */
DECLARE_HASHTABLE(fdb_tbl, 16);
spinlock_t fdb_tbl_lock;
spinlock_t fdb_tbl_lock; /* for fdb tbl accesses */
unsigned long internal_vlan_bitmap[ROCKER_INTERNAL_VLAN_BITMAP_LEN];
DECLARE_HASHTABLE(internal_vlan_tbl, 8);
spinlock_t internal_vlan_tbl_lock;
spinlock_t internal_vlan_tbl_lock; /* for vlan tbl accesses */
DECLARE_HASHTABLE(neigh_tbl, 16);
spinlock_t neigh_tbl_lock;
spinlock_t neigh_tbl_lock; /* for neigh tbl accesses */
u32 neigh_tbl_next_index;
};
......@@ -4688,8 +4688,6 @@ static void rocker_port_get_stats(struct net_device *dev,
for (i = 0; i < ARRAY_SIZE(rocker_port_stats); ++i)
data[i] = 0;
}
return;
}
static int rocker_port_get_sset_count(struct net_device *netdev, int sset)
......@@ -4743,8 +4741,9 @@ static int rocker_port_poll_tx(struct napi_struct *napi, int budget)
if (err == 0) {
rocker_port->dev->stats.tx_packets++;
rocker_port->dev->stats.tx_bytes += skb->len;
} else
} else {
rocker_port->dev->stats.tx_errors++;
}
dev_kfree_skb_any(skb);
credits++;
......
......@@ -65,9 +65,9 @@ enum {
#define ROCKER_TEST_DMA_CTRL 0x0034
/* Rocker test register ctrl */
#define ROCKER_TEST_DMA_CTRL_CLEAR (1 << 0)
#define ROCKER_TEST_DMA_CTRL_FILL (1 << 1)
#define ROCKER_TEST_DMA_CTRL_INVERT (1 << 2)
#define ROCKER_TEST_DMA_CTRL_CLEAR BIT(0)
#define ROCKER_TEST_DMA_CTRL_FILL BIT(1)
#define ROCKER_TEST_DMA_CTRL_INVERT BIT(2)
/* Rocker DMA ring register offsets */
#define ROCKER_DMA_DESC_ADDR(x) (0x1000 + (x) * 32) /* 8-byte */
......@@ -79,7 +79,7 @@ enum {
#define ROCKER_DMA_DESC_RES1(x) (0x101c + (x) * 32)
/* Rocker dma ctrl register bits */
#define ROCKER_DMA_DESC_CTRL_RESET (1 << 0)
#define ROCKER_DMA_DESC_CTRL_RESET BIT(0)
/* Rocker DMA ring types */
enum rocker_dma_type {
......@@ -111,7 +111,7 @@ struct rocker_desc {
u16 comp_err;
};
#define ROCKER_DMA_DESC_COMP_ERR_GEN (1 << 15)
#define ROCKER_DMA_DESC_COMP_ERR_GEN BIT(15)
/* Rocker DMA TLV struct */
struct rocker_tlv {
......@@ -237,14 +237,14 @@ enum {
ROCKER_TLV_RX_MAX = __ROCKER_TLV_RX_MAX - 1,
};
#define ROCKER_RX_FLAGS_IPV4 (1 << 0)
#define ROCKER_RX_FLAGS_IPV6 (1 << 1)
#define ROCKER_RX_FLAGS_CSUM_CALC (1 << 2)
#define ROCKER_RX_FLAGS_IPV4_CSUM_GOOD (1 << 3)
#define ROCKER_RX_FLAGS_IP_FRAG (1 << 4)
#define ROCKER_RX_FLAGS_TCP (1 << 5)
#define ROCKER_RX_FLAGS_UDP (1 << 6)
#define ROCKER_RX_FLAGS_TCP_UDP_CSUM_GOOD (1 << 7)
#define ROCKER_RX_FLAGS_IPV4 BIT(0)
#define ROCKER_RX_FLAGS_IPV6 BIT(1)
#define ROCKER_RX_FLAGS_CSUM_CALC BIT(2)
#define ROCKER_RX_FLAGS_IPV4_CSUM_GOOD BIT(3)
#define ROCKER_RX_FLAGS_IP_FRAG BIT(4)
#define ROCKER_RX_FLAGS_TCP BIT(5)
#define ROCKER_RX_FLAGS_UDP BIT(6)
#define ROCKER_RX_FLAGS_TCP_UDP_CSUM_GOOD BIT(7)
enum {
ROCKER_TLV_TX_UNSPEC,
......@@ -460,6 +460,6 @@ enum rocker_of_dpa_overlay_type {
#define ROCKER_SWITCH_ID 0x0320 /* 8-byte */
/* Rocker control bits */
#define ROCKER_CONTROL_RESET (1 << 0)
#define ROCKER_CONTROL_RESET BIT(0)
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment