aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-07-11 18:17:23 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-22 19:38:58 -0400
commitb11840204f36f9a1e3027033227e17d167e04377 (patch)
treebb0ad9ad4b1711258f918327ef29aad7a78912eb /drivers/net/e1000/e1000.h
parente982f17c87488a98df6bc4f5454a176646b4d00b (diff)
e1000: checkpatch clean
Redefine DPRINTK macro using do while(0) __FUNCTION__ to __func__ structs {} on separate lines Surround negative constants with () Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/e1000/e1000.h')
-rw-r--r--drivers/net/e1000/e1000.h34
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index a1f4a764bfb5..3aeba9305dfa 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -90,10 +90,13 @@ struct e1000_adapter;
90#define E1000_ERR(args...) printk(KERN_ERR "e1000: " args) 90#define E1000_ERR(args...) printk(KERN_ERR "e1000: " args)
91 91
92#define PFX "e1000: " 92#define PFX "e1000: "
93#define DPRINTK(nlevel, klevel, fmt, args...) \ 93
94 (void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \ 94#define DPRINTK(nlevel, klevel, fmt, args...) \
95 printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \ 95do { \
96 __FUNCTION__ , ## args)) 96 if (NETIF_MSG_##nlevel & adapter->msg_enable) \
97 printk(KERN_##klevel PFX "%s: %s: " fmt, \
98 adapter->netdev->name, __func__, ##args); \
99} while (0)
97 100
98#define E1000_MAX_INTR 10 101#define E1000_MAX_INTR 10
99 102
@@ -151,9 +154,9 @@ struct e1000_adapter;
151#define E1000_MASTER_SLAVE e1000_ms_hw_default 154#define E1000_MASTER_SLAVE e1000_ms_hw_default
152#endif 155#endif
153 156
154#define E1000_MNG_VLAN_NONE -1 157#define E1000_MNG_VLAN_NONE (-1)
155/* Number of packet split data buffers (not including the header buffer) */ 158/* Number of packet split data buffers (not including the header buffer) */
156#define PS_PAGE_BUFFERS MAX_PS_BUFFERS-1 159#define PS_PAGE_BUFFERS (MAX_PS_BUFFERS - 1)
157 160
158/* wrapper around a pointer to a socket buffer, 161/* wrapper around a pointer to a socket buffer,
159 * so a DMA handle can be stored along with the buffer */ 162 * so a DMA handle can be stored along with the buffer */
@@ -165,9 +168,13 @@ struct e1000_buffer {
165 u16 next_to_watch; 168 u16 next_to_watch;
166}; 169};
167 170
171struct e1000_ps_page {
172 struct page *ps_page[PS_PAGE_BUFFERS];
173};
168 174
169struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; 175struct e1000_ps_page_dma {
170struct e1000_ps_page_dma { u64 ps_page_dma[PS_PAGE_BUFFERS]; }; 176 u64 ps_page_dma[PS_PAGE_BUFFERS];
177};
171 178
172struct e1000_tx_ring { 179struct e1000_tx_ring {
173 /* pointer to the descriptor ring memory */ 180 /* pointer to the descriptor ring memory */
@@ -217,13 +224,13 @@ struct e1000_rx_ring {
217 u16 rdt; 224 u16 rdt;
218}; 225};
219 226
220#define E1000_DESC_UNUSED(R) \ 227#define E1000_DESC_UNUSED(R) \
221 ((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \ 228 ((((R)->next_to_clean > (R)->next_to_use) \
222 (R)->next_to_clean - (R)->next_to_use - 1) 229 ? 0 : (R)->count) + (R)->next_to_clean - (R)->next_to_use - 1)
223 230
224#define E1000_RX_DESC_PS(R, i) \ 231#define E1000_RX_DESC_PS(R, i) \
225 (&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) 232 (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
226#define E1000_RX_DESC_EXT(R, i) \ 233#define E1000_RX_DESC_EXT(R, i) \
227 (&(((union e1000_rx_desc_extended *)((R).desc))[i])) 234 (&(((union e1000_rx_desc_extended *)((R).desc))[i]))
228#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i])) 235#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
229#define E1000_RX_DESC(R, i) E1000_GET_DESC(R, i, e1000_rx_desc) 236#define E1000_RX_DESC(R, i) E1000_GET_DESC(R, i, e1000_rx_desc)
@@ -317,7 +324,6 @@ struct e1000_adapter {
317 u64 gorcl_old; 324 u64 gorcl_old;
318 u16 rx_ps_bsize0; 325 u16 rx_ps_bsize0;
319 326
320
321 /* OS defined structs */ 327 /* OS defined structs */
322 struct net_device *netdev; 328 struct net_device *netdev;
323 struct pci_dev *pdev; 329 struct pci_dev *pdev;