diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2012-01-05 13:50:18 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-03-18 21:26:29 -0400 |
commit | 7fe83ad877321f44c8141b8334bd2f6614deb739 (patch) | |
tree | db3f22563dd76bf600c171bdd4bb2730b699b101 | |
parent | a6bee4a5571d24b9ba7c98f6becc7c45312a537d (diff) |
hwmon: remove () used with return
fix checkpatch ERROR:
return is not a function, parentheses are not required
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
-rw-r--r-- | drivers/hwmon/atxp1.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/f71805f.c | 14 | ||||
-rw-r--r-- | drivers/hwmon/hwmon-vid.c | 24 | ||||
-rw-r--r-- | drivers/hwmon/pcf8591.c | 4 | ||||
-rw-r--r-- | drivers/hwmon/w83627hf.c | 8 | ||||
-rw-r--r-- | drivers/hwmon/w83792d.c | 4 | ||||
-rw-r--r-- | drivers/hwmon/w83793.c | 6 | ||||
-rw-r--r-- | drivers/hwmon/w83l786ng.c | 2 |
8 files changed, 32 insertions, 32 deletions
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c index 33cc143b2069..805e3b1b5621 100644 --- a/drivers/hwmon/atxp1.c +++ b/drivers/hwmon/atxp1.c | |||
@@ -106,7 +106,7 @@ static struct atxp1_data * atxp1_update_device(struct device *dev) | |||
106 | 106 | ||
107 | mutex_unlock(&data->update_lock); | 107 | mutex_unlock(&data->update_lock); |
108 | 108 | ||
109 | return(data); | 109 | return data; |
110 | } | 110 | } |
111 | 111 | ||
112 | /* sys file functions for cpu0_vid */ | 112 | /* sys file functions for cpu0_vid */ |
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index 6dbfd3e516e4..2309be5b1861 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c | |||
@@ -202,7 +202,7 @@ struct f71805f_sio_data { | |||
202 | 202 | ||
203 | static inline long in_from_reg(u8 reg) | 203 | static inline long in_from_reg(u8 reg) |
204 | { | 204 | { |
205 | return (reg * 8); | 205 | return reg * 8; |
206 | } | 206 | } |
207 | 207 | ||
208 | /* The 2 least significant bits are not used */ | 208 | /* The 2 least significant bits are not used */ |
@@ -212,13 +212,13 @@ static inline u8 in_to_reg(long val) | |||
212 | return 0; | 212 | return 0; |
213 | if (val >= 2016) | 213 | if (val >= 2016) |
214 | return 0xfc; | 214 | return 0xfc; |
215 | return (((val + 16) / 32) << 2); | 215 | return ((val + 16) / 32) << 2; |
216 | } | 216 | } |
217 | 217 | ||
218 | /* in0 is downscaled by a factor 2 internally */ | 218 | /* in0 is downscaled by a factor 2 internally */ |
219 | static inline long in0_from_reg(u8 reg) | 219 | static inline long in0_from_reg(u8 reg) |
220 | { | 220 | { |
221 | return (reg * 16); | 221 | return reg * 16; |
222 | } | 222 | } |
223 | 223 | ||
224 | static inline u8 in0_to_reg(long val) | 224 | static inline u8 in0_to_reg(long val) |
@@ -227,7 +227,7 @@ static inline u8 in0_to_reg(long val) | |||
227 | return 0; | 227 | return 0; |
228 | if (val >= 4032) | 228 | if (val >= 4032) |
229 | return 0xfc; | 229 | return 0xfc; |
230 | return (((val + 32) / 64) << 2); | 230 | return ((val + 32) / 64) << 2; |
231 | } | 231 | } |
232 | 232 | ||
233 | /* The 4 most significant bits are not used */ | 233 | /* The 4 most significant bits are not used */ |
@@ -236,7 +236,7 @@ static inline long fan_from_reg(u16 reg) | |||
236 | reg &= 0xfff; | 236 | reg &= 0xfff; |
237 | if (!reg || reg == 0xfff) | 237 | if (!reg || reg == 0xfff) |
238 | return 0; | 238 | return 0; |
239 | return (1500000 / reg); | 239 | return 1500000 / reg; |
240 | } | 240 | } |
241 | 241 | ||
242 | static inline u16 fan_to_reg(long rpm) | 242 | static inline u16 fan_to_reg(long rpm) |
@@ -246,7 +246,7 @@ static inline u16 fan_to_reg(long rpm) | |||
246 | so that no alarm will ever trigger. */ | 246 | so that no alarm will ever trigger. */ |
247 | if (rpm < 367) | 247 | if (rpm < 367) |
248 | return 0xfff; | 248 | return 0xfff; |
249 | return (1500000 / rpm); | 249 | return 1500000 / rpm; |
250 | } | 250 | } |
251 | 251 | ||
252 | static inline unsigned long pwm_freq_from_reg(u8 reg) | 252 | static inline unsigned long pwm_freq_from_reg(u8 reg) |
@@ -278,7 +278,7 @@ static inline int pwm_mode_from_reg(u8 reg) | |||
278 | 278 | ||
279 | static inline long temp_from_reg(u8 reg) | 279 | static inline long temp_from_reg(u8 reg) |
280 | { | 280 | { |
281 | return (reg * 1000); | 281 | return reg * 1000; |
282 | } | 282 | } |
283 | 283 | ||
284 | static inline u8 temp_to_reg(long val) | 284 | static inline u8 temp_to_reg(long val) |
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c index 932da8a5aaf4..4fcb867122ec 100644 --- a/drivers/hwmon/hwmon-vid.c +++ b/drivers/hwmon/hwmon-vid.c | |||
@@ -96,14 +96,14 @@ int vid_from_reg(int val, u8 vrm) | |||
96 | vid = 1862500 - (val & 0x1f) * 25000; | 96 | vid = 1862500 - (val & 0x1f) * 25000; |
97 | if(val & 0x20) | 97 | if(val & 0x20) |
98 | vid -= 12500; | 98 | vid -= 12500; |
99 | return((vid + 500) / 1000); | 99 | return (vid + 500) / 1000; |
100 | 100 | ||
101 | case 110: /* Intel Conroe */ | 101 | case 110: /* Intel Conroe */ |
102 | /* compute in uV, round to mV */ | 102 | /* compute in uV, round to mV */ |
103 | val &= 0xff; | 103 | val &= 0xff; |
104 | if (val < 0x02 || val > 0xb2) | 104 | if (val < 0x02 || val > 0xb2) |
105 | return 0; | 105 | return 0; |
106 | return((1600000 - (val - 2) * 6250 + 500) / 1000); | 106 | return (1600000 - (val - 2) * 6250 + 500) / 1000; |
107 | 107 | ||
108 | case 24: /* Athlon64 & Opteron */ | 108 | case 24: /* Athlon64 & Opteron */ |
109 | val &= 0x1f; | 109 | val &= 0x1f; |
@@ -118,38 +118,38 @@ int vid_from_reg(int val, u8 vrm) | |||
118 | case 91: /* VRM 9.1 */ | 118 | case 91: /* VRM 9.1 */ |
119 | case 90: /* VRM 9.0 */ | 119 | case 90: /* VRM 9.0 */ |
120 | val &= 0x1f; | 120 | val &= 0x1f; |
121 | return(val == 0x1f ? 0 : | 121 | return val == 0x1f ? 0 : |
122 | 1850 - val * 25); | 122 | 1850 - val * 25; |
123 | 123 | ||
124 | case 85: /* VRM 8.5 */ | 124 | case 85: /* VRM 8.5 */ |
125 | val &= 0x1f; | 125 | val &= 0x1f; |
126 | return((val & 0x10 ? 25 : 0) + | 126 | return (val & 0x10 ? 25 : 0) + |
127 | ((val & 0x0f) > 0x04 ? 2050 : 1250) - | 127 | ((val & 0x0f) > 0x04 ? 2050 : 1250) - |
128 | ((val & 0x0f) * 50)); | 128 | ((val & 0x0f) * 50); |
129 | 129 | ||
130 | case 84: /* VRM 8.4 */ | 130 | case 84: /* VRM 8.4 */ |
131 | val &= 0x0f; | 131 | val &= 0x0f; |
132 | /* fall through */ | 132 | /* fall through */ |
133 | case 82: /* VRM 8.2 */ | 133 | case 82: /* VRM 8.2 */ |
134 | val &= 0x1f; | 134 | val &= 0x1f; |
135 | return(val == 0x1f ? 0 : | 135 | return val == 0x1f ? 0 : |
136 | val & 0x10 ? 5100 - (val) * 100 : | 136 | val & 0x10 ? 5100 - (val) * 100 : |
137 | 2050 - (val) * 50); | 137 | 2050 - (val) * 50; |
138 | case 17: /* Intel IMVP-II */ | 138 | case 17: /* Intel IMVP-II */ |
139 | val &= 0x1f; | 139 | val &= 0x1f; |
140 | return(val & 0x10 ? 975 - (val & 0xF) * 25 : | 140 | return val & 0x10 ? 975 - (val & 0xF) * 25 : |
141 | 1750 - val * 50); | 141 | 1750 - val * 50; |
142 | case 13: | 142 | case 13: |
143 | case 131: | 143 | case 131: |
144 | val &= 0x3f; | 144 | val &= 0x3f; |
145 | /* Exception for Eden ULV 500 MHz */ | 145 | /* Exception for Eden ULV 500 MHz */ |
146 | if (vrm == 131 && val == 0x3f) | 146 | if (vrm == 131 && val == 0x3f) |
147 | val++; | 147 | val++; |
148 | return(1708 - val * 16); | 148 | return 1708 - val * 16; |
149 | case 14: /* Intel Core */ | 149 | case 14: /* Intel Core */ |
150 | /* compute in uV, round to mV */ | 150 | /* compute in uV, round to mV */ |
151 | val &= 0x7f; | 151 | val &= 0x7f; |
152 | return(val > 0x77 ? 0 : (1500000 - (val * 12500) + 500) / 1000); | 152 | return val > 0x77 ? 0 : (1500000 - (val * 12500) + 500) / 1000; |
153 | default: /* report 0 for unknown */ | 153 | default: /* report 0 for unknown */ |
154 | if (vrm) | 154 | if (vrm) |
155 | pr_warn("Requested unsupported VRM version (%u)\n", | 155 | pr_warn("Requested unsupported VRM version (%u)\n", |
diff --git a/drivers/hwmon/pcf8591.c b/drivers/hwmon/pcf8591.c index 731b09af76b9..2041155a9fa3 100644 --- a/drivers/hwmon/pcf8591.c +++ b/drivers/hwmon/pcf8591.c | |||
@@ -269,9 +269,9 @@ static int pcf8591_read_channel(struct device *dev, int channel) | |||
269 | 269 | ||
270 | if ((channel == 2 && input_mode == 2) || | 270 | if ((channel == 2 && input_mode == 2) || |
271 | (channel != 3 && (input_mode == 1 || input_mode == 3))) | 271 | (channel != 3 && (input_mode == 1 || input_mode == 3))) |
272 | return (10 * REG_TO_SIGNED(value)); | 272 | return 10 * REG_TO_SIGNED(value); |
273 | else | 273 | else |
274 | return (10 * value); | 274 | return 10 * value; |
275 | } | 275 | } |
276 | 276 | ||
277 | static const struct i2c_device_id pcf8591_id[] = { | 277 | static const struct i2c_device_id pcf8591_id[] = { |
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index 374118f2b9f9..ca4d378c7623 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c | |||
@@ -313,7 +313,7 @@ static inline unsigned long pwm_freq_from_reg(u8 reg) | |||
313 | /* This should not happen but anyway... */ | 313 | /* This should not happen but anyway... */ |
314 | if (reg == 0) | 314 | if (reg == 0) |
315 | reg++; | 315 | reg++; |
316 | return (clock / (reg << 8)); | 316 | return clock / (reg << 8); |
317 | } | 317 | } |
318 | static inline u8 pwm_freq_to_reg(unsigned long val) | 318 | static inline u8 pwm_freq_to_reg(unsigned long val) |
319 | { | 319 | { |
@@ -321,11 +321,11 @@ static inline u8 pwm_freq_to_reg(unsigned long val) | |||
321 | if (val >= 93750) /* The highest we can do */ | 321 | if (val >= 93750) /* The highest we can do */ |
322 | return 0x01; | 322 | return 0x01; |
323 | if (val >= 720) /* Use 24 MHz clock */ | 323 | if (val >= 720) /* Use 24 MHz clock */ |
324 | return (24000000UL / (val << 8)); | 324 | return 24000000UL / (val << 8); |
325 | if (val < 6) /* The lowest we can do */ | 325 | if (val < 6) /* The lowest we can do */ |
326 | return 0xFF; | 326 | return 0xFF; |
327 | else /* Use 180 kHz clock */ | 327 | else /* Use 180 kHz clock */ |
328 | return (0x80 | (180000UL / (val << 8))); | 328 | return 0x80 | (180000UL / (val << 8)); |
329 | } | 329 | } |
330 | 330 | ||
331 | #define BEEP_MASK_FROM_REG(val) ((val) & 0xff7fff) | 331 | #define BEEP_MASK_FROM_REG(val) ((val) & 0xff7fff) |
@@ -342,7 +342,7 @@ static inline u8 DIV_TO_REG(long val) | |||
342 | break; | 342 | break; |
343 | val >>= 1; | 343 | val >>= 1; |
344 | } | 344 | } |
345 | return ((u8) i); | 345 | return (u8)i; |
346 | } | 346 | } |
347 | 347 | ||
348 | /* For each registered chip, we need to keep some data in memory. | 348 | /* For each registered chip, we need to keep some data in memory. |
diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c index d3100eab6b2f..0952a2cc0545 100644 --- a/drivers/hwmon/w83792d.c +++ b/drivers/hwmon/w83792d.c | |||
@@ -265,7 +265,7 @@ DIV_TO_REG(long val) | |||
265 | break; | 265 | break; |
266 | val >>= 1; | 266 | val >>= 1; |
267 | } | 267 | } |
268 | return ((u8) i); | 268 | return (u8)i; |
269 | } | 269 | } |
270 | 270 | ||
271 | struct w83792d_data { | 271 | struct w83792d_data { |
@@ -333,7 +333,7 @@ static struct i2c_driver w83792d_driver = { | |||
333 | static inline long in_count_from_reg(int nr, struct w83792d_data *data) | 333 | static inline long in_count_from_reg(int nr, struct w83792d_data *data) |
334 | { | 334 | { |
335 | /* in7 and in8 do not have low bits, but the formula still works */ | 335 | /* in7 and in8 do not have low bits, but the formula still works */ |
336 | return ((data->in[nr] << 2) | ((data->low_bits >> (2 * nr)) & 0x03)); | 336 | return (data->in[nr] << 2) | ((data->low_bits >> (2 * nr)) & 0x03); |
337 | } | 337 | } |
338 | 338 | ||
339 | /* The SMBus locks itself. The Winbond W83792D chip has a bank register, | 339 | /* The SMBus locks itself. The Winbond W83792D chip has a bank register, |
diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index 45ec7e7c3c27..d10ae4da1587 100644 --- a/drivers/hwmon/w83793.c +++ b/drivers/hwmon/w83793.c | |||
@@ -181,7 +181,7 @@ static inline unsigned long FAN_FROM_REG(u16 val) | |||
181 | { | 181 | { |
182 | if ((val >= 0xfff) || (val == 0)) | 182 | if ((val >= 0xfff) || (val == 0)) |
183 | return 0; | 183 | return 0; |
184 | return (1350000UL / val); | 184 | return 1350000UL / val; |
185 | } | 185 | } |
186 | 186 | ||
187 | static inline u16 FAN_TO_REG(long rpm) | 187 | static inline u16 FAN_TO_REG(long rpm) |
@@ -193,7 +193,7 @@ static inline u16 FAN_TO_REG(long rpm) | |||
193 | 193 | ||
194 | static inline unsigned long TIME_FROM_REG(u8 reg) | 194 | static inline unsigned long TIME_FROM_REG(u8 reg) |
195 | { | 195 | { |
196 | return (reg * 100); | 196 | return reg * 100; |
197 | } | 197 | } |
198 | 198 | ||
199 | static inline u8 TIME_TO_REG(unsigned long val) | 199 | static inline u8 TIME_TO_REG(unsigned long val) |
@@ -203,7 +203,7 @@ static inline u8 TIME_TO_REG(unsigned long val) | |||
203 | 203 | ||
204 | static inline long TEMP_FROM_REG(s8 reg) | 204 | static inline long TEMP_FROM_REG(s8 reg) |
205 | { | 205 | { |
206 | return (reg * 1000); | 206 | return reg * 1000; |
207 | } | 207 | } |
208 | 208 | ||
209 | static inline s8 TEMP_TO_REG(long val, s8 min, s8 max) | 209 | static inline s8 TEMP_TO_REG(long val, s8 min, s8 max) |
diff --git a/drivers/hwmon/w83l786ng.c b/drivers/hwmon/w83l786ng.c index 063bd9508d8a..baa5f0b24f80 100644 --- a/drivers/hwmon/w83l786ng.c +++ b/drivers/hwmon/w83l786ng.c | |||
@@ -116,7 +116,7 @@ DIV_TO_REG(long val) | |||
116 | break; | 116 | break; |
117 | val >>= 1; | 117 | val >>= 1; |
118 | } | 118 | } |
119 | return ((u8) i); | 119 | return (u8)i; |
120 | } | 120 | } |
121 | 121 | ||
122 | struct w83l786ng_data { | 122 | struct w83l786ng_data { |