aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2010-12-11 00:53:32 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-25 00:28:18 -0500
commitf0f1a172b2a9e26319b9aa95fa6c322ebb01089d (patch)
treeb4d37fada398b2c91706317d992e01aa6be72931 /drivers/net/e1000e
parent68f20d948c86bd6bbc075052f6b6c45b8f56957e (diff)
e1000e: checkpatch error - macro panethesis
ERROR: Macros with complex values should be enclosed in parenthesis Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/ethtool.c114
-rw-r--r--drivers/net/e1000e/netdev.c2
2 files changed, 60 insertions, 56 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 39349d6dcd0b..15c63304bd91 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -45,63 +45,67 @@ struct e1000_stats {
45 int stat_offset; 45 int stat_offset;
46}; 46};
47 47
48#define E1000_STAT(m) E1000_STATS, \ 48#define E1000_STAT(str, m) { \
49 sizeof(((struct e1000_adapter *)0)->m), \ 49 .stat_string = str, \
50 offsetof(struct e1000_adapter, m) 50 .type = E1000_STATS, \
51#define E1000_NETDEV_STAT(m) NETDEV_STATS, \ 51 .sizeof_stat = sizeof(((struct e1000_adapter *)0)->m), \
52 sizeof(((struct net_device *)0)->m), \ 52 .stat_offset = offsetof(struct e1000_adapter, m) }
53 offsetof(struct net_device, m) 53#define E1000_NETDEV_STAT(str, m) { \
54 .stat_string = str, \
55 .type = NETDEV_STATS, \
56 .sizeof_stat = sizeof(((struct net_device *)0)->m), \
57 .stat_offset = offsetof(struct net_device, m) }
54 58
55static const struct e1000_stats e1000_gstrings_stats[] = { 59static const struct e1000_stats e1000_gstrings_stats[] = {
56 { "rx_packets", E1000_STAT(stats.gprc) }, 60 E1000_STAT("rx_packets", stats.gprc),
57 { "tx_packets", E1000_STAT(stats.gptc) }, 61 E1000_STAT("tx_packets", stats.gptc),
58 { "rx_bytes", E1000_STAT(stats.gorc) }, 62 E1000_STAT("rx_bytes", stats.gorc),
59 { "tx_bytes", E1000_STAT(stats.gotc) }, 63 E1000_STAT("tx_bytes", stats.gotc),
60 { "rx_broadcast", E1000_STAT(stats.bprc) }, 64 E1000_STAT("rx_broadcast", stats.bprc),
61 { "tx_broadcast", E1000_STAT(stats.bptc) }, 65 E1000_STAT("tx_broadcast", stats.bptc),
62 { "rx_multicast", E1000_STAT(stats.mprc) }, 66 E1000_STAT("rx_multicast", stats.mprc),
63 { "tx_multicast", E1000_STAT(stats.mptc) }, 67 E1000_STAT("tx_multicast", stats.mptc),
64 { "rx_errors", E1000_NETDEV_STAT(stats.rx_errors) }, 68 E1000_NETDEV_STAT("rx_errors", stats.rx_errors),
65 { "tx_errors", E1000_NETDEV_STAT(stats.tx_errors) }, 69 E1000_NETDEV_STAT("tx_errors", stats.tx_errors),
66 { "tx_dropped", E1000_NETDEV_STAT(stats.tx_dropped) }, 70 E1000_NETDEV_STAT("tx_dropped", stats.tx_dropped),
67 { "multicast", E1000_STAT(stats.mprc) }, 71 E1000_STAT("multicast", stats.mprc),
68 { "collisions", E1000_STAT(stats.colc) }, 72 E1000_STAT("collisions", stats.colc),
69 { "rx_length_errors", E1000_NETDEV_STAT(stats.rx_length_errors) }, 73 E1000_NETDEV_STAT("rx_length_errors", stats.rx_length_errors),
70 { "rx_over_errors", E1000_NETDEV_STAT(stats.rx_over_errors) }, 74 E1000_NETDEV_STAT("rx_over_errors", stats.rx_over_errors),
71 { "rx_crc_errors", E1000_STAT(stats.crcerrs) }, 75 E1000_STAT("rx_crc_errors", stats.crcerrs),
72 { "rx_frame_errors", E1000_NETDEV_STAT(stats.rx_frame_errors) }, 76 E1000_NETDEV_STAT("rx_frame_errors", stats.rx_frame_errors),
73 { "rx_no_buffer_count", E1000_STAT(stats.rnbc) }, 77 E1000_STAT("rx_no_buffer_count", stats.rnbc),
74 { "rx_missed_errors", E1000_STAT(stats.mpc) }, 78 E1000_STAT("rx_missed_errors", stats.mpc),
75 { "tx_aborted_errors", E1000_STAT(stats.ecol) }, 79 E1000_STAT("tx_aborted_errors", stats.ecol),
76 { "tx_carrier_errors", E1000_STAT(stats.tncrs) }, 80 E1000_STAT("tx_carrier_errors", stats.tncrs),
77 { "tx_fifo_errors", E1000_NETDEV_STAT(stats.tx_fifo_errors) }, 81 E1000_NETDEV_STAT("tx_fifo_errors", stats.tx_fifo_errors),
78 { "tx_heartbeat_errors", E1000_NETDEV_STAT(stats.tx_heartbeat_errors) }, 82 E1000_NETDEV_STAT("tx_heartbeat_errors", stats.tx_heartbeat_errors),
79 { "tx_window_errors", E1000_STAT(stats.latecol) }, 83 E1000_STAT("tx_window_errors", stats.latecol),
80 { "tx_abort_late_coll", E1000_STAT(stats.latecol) }, 84 E1000_STAT("tx_abort_late_coll", stats.latecol),
81 { "tx_deferred_ok", E1000_STAT(stats.dc) }, 85 E1000_STAT("tx_deferred_ok", stats.dc),
82 { "tx_single_coll_ok", E1000_STAT(stats.scc) }, 86 E1000_STAT("tx_single_coll_ok", stats.scc),
83 { "tx_multi_coll_ok", E1000_STAT(stats.mcc) }, 87 E1000_STAT("tx_multi_coll_ok", stats.mcc),
84 { "tx_timeout_count", E1000_STAT(tx_timeout_count) }, 88 E1000_STAT("tx_timeout_count", tx_timeout_count),
85 { "tx_restart_queue", E1000_STAT(restart_queue) }, 89 E1000_STAT("tx_restart_queue", restart_queue),
86 { "rx_long_length_errors", E1000_STAT(stats.roc) }, 90 E1000_STAT("rx_long_length_errors", stats.roc),
87 { "rx_short_length_errors", E1000_STAT(stats.ruc) }, 91 E1000_STAT("rx_short_length_errors", stats.ruc),
88 { "rx_align_errors", E1000_STAT(stats.algnerrc) }, 92 E1000_STAT("rx_align_errors", stats.algnerrc),
89 { "tx_tcp_seg_good", E1000_STAT(stats.tsctc) }, 93 E1000_STAT("tx_tcp_seg_good", stats.tsctc),
90 { "tx_tcp_seg_failed", E1000_STAT(stats.tsctfc) }, 94 E1000_STAT("tx_tcp_seg_failed", stats.tsctfc),
91 { "rx_flow_control_xon", E1000_STAT(stats.xonrxc) }, 95 E1000_STAT("rx_flow_control_xon", stats.xonrxc),
92 { "rx_flow_control_xoff", E1000_STAT(stats.xoffrxc) }, 96 E1000_STAT("rx_flow_control_xoff", stats.xoffrxc),
93 { "tx_flow_control_xon", E1000_STAT(stats.xontxc) }, 97 E1000_STAT("tx_flow_control_xon", stats.xontxc),
94 { "tx_flow_control_xoff", E1000_STAT(stats.xofftxc) }, 98 E1000_STAT("tx_flow_control_xoff", stats.xofftxc),
95 { "rx_long_byte_count", E1000_STAT(stats.gorc) }, 99 E1000_STAT("rx_long_byte_count", stats.gorc),
96 { "rx_csum_offload_good", E1000_STAT(hw_csum_good) }, 100 E1000_STAT("rx_csum_offload_good", hw_csum_good),
97 { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, 101 E1000_STAT("rx_csum_offload_errors", hw_csum_err),
98 { "rx_header_split", E1000_STAT(rx_hdr_split) }, 102 E1000_STAT("rx_header_split", rx_hdr_split),
99 { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, 103 E1000_STAT("alloc_rx_buff_failed", alloc_rx_buff_failed),
100 { "tx_smbus", E1000_STAT(stats.mgptc) }, 104 E1000_STAT("tx_smbus", stats.mgptc),
101 { "rx_smbus", E1000_STAT(stats.mgprc) }, 105 E1000_STAT("rx_smbus", stats.mgprc),
102 { "dropped_smbus", E1000_STAT(stats.mgpdc) }, 106 E1000_STAT("dropped_smbus", stats.mgpdc),
103 { "rx_dma_failed", E1000_STAT(rx_dma_failed) }, 107 E1000_STAT("rx_dma_failed", rx_dma_failed),
104 { "tx_dma_failed", E1000_STAT(tx_dma_failed) }, 108 E1000_STAT("tx_dma_failed", tx_dma_failed),
105}; 109};
106 110
107#define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats) 111#define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index a45dafdf343a..ec7b77fea98b 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1325,7 +1325,7 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
1325 goto next_desc; 1325 goto next_desc;
1326 } 1326 }
1327 1327
1328#define rxtop rx_ring->rx_skb_top 1328#define rxtop (rx_ring->rx_skb_top)
1329 if (!(status & E1000_RXD_STAT_EOP)) { 1329 if (!(status & E1000_RXD_STAT_EOP)) {
1330 /* this descriptor is only the beginning (or middle) */ 1330 /* this descriptor is only the beginning (or middle) */
1331 if (!rxtop) { 1331 if (!rxtop) {