Commit b1184020 authored by Joe Perches's avatar Joe Perches Committed by Jeff Garzik

e1000: checkpatch clean

Redefine DPRINTK macro using do while(0)
__FUNCTION__ to __func__
structs {} on separate lines
Surround negative constants with ()
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent e982f17c
...@@ -90,10 +90,13 @@ struct e1000_adapter; ...@@ -90,10 +90,13 @@ struct e1000_adapter;
#define E1000_ERR(args...) printk(KERN_ERR "e1000: " args) #define E1000_ERR(args...) printk(KERN_ERR "e1000: " args)
#define PFX "e1000: " #define PFX "e1000: "
#define DPRINTK(nlevel, klevel, fmt, args...) \
(void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \ #define DPRINTK(nlevel, klevel, fmt, args...) \
printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \ do { \
__FUNCTION__ , ## args)) if (NETIF_MSG_##nlevel & adapter->msg_enable) \
printk(KERN_##klevel PFX "%s: %s: " fmt, \
adapter->netdev->name, __func__, ##args); \
} while (0)
#define E1000_MAX_INTR 10 #define E1000_MAX_INTR 10
...@@ -151,9 +154,9 @@ struct e1000_adapter; ...@@ -151,9 +154,9 @@ struct e1000_adapter;
#define E1000_MASTER_SLAVE e1000_ms_hw_default #define E1000_MASTER_SLAVE e1000_ms_hw_default
#endif #endif
#define E1000_MNG_VLAN_NONE -1 #define E1000_MNG_VLAN_NONE (-1)
/* Number of packet split data buffers (not including the header buffer) */ /* Number of packet split data buffers (not including the header buffer) */
#define PS_PAGE_BUFFERS MAX_PS_BUFFERS-1 #define PS_PAGE_BUFFERS (MAX_PS_BUFFERS - 1)
/* wrapper around a pointer to a socket buffer, /* wrapper around a pointer to a socket buffer,
* so a DMA handle can be stored along with the buffer */ * so a DMA handle can be stored along with the buffer */
...@@ -165,9 +168,13 @@ struct e1000_buffer { ...@@ -165,9 +168,13 @@ struct e1000_buffer {
u16 next_to_watch; u16 next_to_watch;
}; };
struct e1000_ps_page {
struct page *ps_page[PS_PAGE_BUFFERS];
};
struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; struct e1000_ps_page_dma {
struct e1000_ps_page_dma { u64 ps_page_dma[PS_PAGE_BUFFERS]; }; u64 ps_page_dma[PS_PAGE_BUFFERS];
};
struct e1000_tx_ring { struct e1000_tx_ring {
/* pointer to the descriptor ring memory */ /* pointer to the descriptor ring memory */
...@@ -217,13 +224,13 @@ struct e1000_rx_ring { ...@@ -217,13 +224,13 @@ struct e1000_rx_ring {
u16 rdt; u16 rdt;
}; };
#define E1000_DESC_UNUSED(R) \ #define E1000_DESC_UNUSED(R) \
((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \ ((((R)->next_to_clean > (R)->next_to_use) \
(R)->next_to_clean - (R)->next_to_use - 1) ? 0 : (R)->count) + (R)->next_to_clean - (R)->next_to_use - 1)
#define E1000_RX_DESC_PS(R, i) \ #define E1000_RX_DESC_PS(R, i) \
(&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
#define E1000_RX_DESC_EXT(R, i) \ #define E1000_RX_DESC_EXT(R, i) \
(&(((union e1000_rx_desc_extended *)((R).desc))[i])) (&(((union e1000_rx_desc_extended *)((R).desc))[i]))
#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i])) #define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i]))
#define E1000_RX_DESC(R, i) E1000_GET_DESC(R, i, e1000_rx_desc) #define E1000_RX_DESC(R, i) E1000_GET_DESC(R, i, e1000_rx_desc)
...@@ -317,7 +324,6 @@ struct e1000_adapter { ...@@ -317,7 +324,6 @@ struct e1000_adapter {
u64 gorcl_old; u64 gorcl_old;
u16 rx_ps_bsize0; u16 rx_ps_bsize0;
/* OS defined structs */ /* OS defined structs */
struct net_device *netdev; struct net_device *netdev;
struct pci_dev *pdev; struct pci_dev *pdev;
......
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