Browse Source

[e1000] Fix dubious syntax in e1000 I/O wrapper macros

tags/v0.9.6
Michael Brown 16 years ago
parent
commit
0b5c39d167
1 changed files with 24 additions and 24 deletions
  1. 24
    24
      src/drivers/net/e1000/e1000_osdep.h

+ 24
- 24
src/drivers/net/e1000/e1000_osdep.h View File

74
 #define DEBUGOUT3 DEBUGOUT1
74
 #define DEBUGOUT3 DEBUGOUT1
75
 #define DEBUGOUT7 DEBUGOUT1
75
 #define DEBUGOUT7 DEBUGOUT1
76
 
76
 
77
-#define E1000_WRITE_REG(a, reg, value) ( \
77
+#define E1000_WRITE_REG(a, reg, value) \
78
     writel((value), ((a)->hw_addr + \
78
     writel((value), ((a)->hw_addr + \
79
-        (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg))))
79
+        (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg)))
80
 
80
 
81
-#define E1000_READ_REG(a, reg) ( \
81
+#define E1000_READ_REG(a, reg) \
82
     readl((a)->hw_addr + \
82
     readl((a)->hw_addr + \
83
-        (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg)))
83
+        (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg))
84
 
84
 
85
-#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \
85
+#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) \
86
     writel((value), ((a)->hw_addr + \
86
     writel((value), ((a)->hw_addr + \
87
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
87
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
88
-        ((offset) << 2))))
88
+        ((offset) << 2)))
89
 
89
 
90
-#define E1000_READ_REG_ARRAY(a, reg, offset) ( \
90
+#define E1000_READ_REG_ARRAY(a, reg, offset) \
91
     readl((a)->hw_addr + \
91
     readl((a)->hw_addr + \
92
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
92
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
93
-        ((offset) << 2)))
93
+        ((offset) << 2))
94
 
94
 
95
 #define E1000_READ_REG_ARRAY_DWORD E1000_READ_REG_ARRAY
95
 #define E1000_READ_REG_ARRAY_DWORD E1000_READ_REG_ARRAY
96
 #define E1000_WRITE_REG_ARRAY_DWORD E1000_WRITE_REG_ARRAY
96
 #define E1000_WRITE_REG_ARRAY_DWORD E1000_WRITE_REG_ARRAY
97
 
97
 
98
-#define E1000_WRITE_REG_ARRAY_WORD(a, reg, offset, value) ( \
98
+#define E1000_WRITE_REG_ARRAY_WORD(a, reg, offset, value) \
99
     writew((value), ((a)->hw_addr + \
99
     writew((value), ((a)->hw_addr + \
100
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
100
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
101
-        ((offset) << 1))))
101
+        ((offset) << 1)))
102
 
102
 
103
-#define E1000_READ_REG_ARRAY_WORD(a, reg, offset) ( \
103
+#define E1000_READ_REG_ARRAY_WORD(a, reg, offset) \
104
     readw((a)->hw_addr + \
104
     readw((a)->hw_addr + \
105
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
105
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
106
-        ((offset) << 1)))
106
+        ((offset) << 1))
107
 
107
 
108
-#define E1000_WRITE_REG_ARRAY_BYTE(a, reg, offset, value) ( \
108
+#define E1000_WRITE_REG_ARRAY_BYTE(a, reg, offset, value) \
109
     writeb((value), ((a)->hw_addr + \
109
     writeb((value), ((a)->hw_addr + \
110
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
110
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
111
-        (offset))))
111
+        (offset)))
112
 
112
 
113
-#define E1000_READ_REG_ARRAY_BYTE(a, reg, offset) ( \
113
+#define E1000_READ_REG_ARRAY_BYTE(a, reg, offset) \
114
     readb((a)->hw_addr + \
114
     readb((a)->hw_addr + \
115
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
115
         (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
116
-        (offset)))
116
+        (offset))
117
 
117
 
118
 #define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS)
118
 #define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS)
119
 
119
 
120
-#define E1000_WRITE_ICH_FLASH_REG(a, reg, value) ( \
121
-    writel((value), ((a)->flash_address + reg)))
120
+#define E1000_WRITE_ICH_FLASH_REG(a, reg, value) \
121
+    writel((value), ((a)->flash_address + reg))
122
 
122
 
123
-#define E1000_READ_ICH_FLASH_REG(a, reg) ( \
124
-    readl((a)->flash_address + reg))
123
+#define E1000_READ_ICH_FLASH_REG(a, reg) \
124
+    readl((a)->flash_address + reg)
125
 
125
 
126
-#define E1000_WRITE_ICH_FLASH_REG16(a, reg, value) ( \
127
-    writew((value), ((a)->flash_address + reg)))
126
+#define E1000_WRITE_ICH_FLASH_REG16(a, reg, value) \
127
+    writew((value), ((a)->flash_address + reg))
128
 
128
 
129
-#define E1000_READ_ICH_FLASH_REG16(a, reg) ( \
130
-    readw((a)->flash_address + reg))
129
+#define E1000_READ_ICH_FLASH_REG16(a, reg) \
130
+    readw((a)->flash_address + reg)
131
 
131
 
132
 #define	msleep(n) 	mdelay(n)
132
 #define	msleep(n) 	mdelay(n)
133
 
133
 

Loading…
Cancel
Save