Skip to contentSkip to conversation

hwmon: (hwmon-vid) Fix checkpatch issues

RFC PATCH Applied Guenter Roeck 3 participants 4 messages Jan 25, 2012 – Feb 1, 2012 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

RFC PATCH 2/3 hwmon: (hwmon-vid) Fix checkpatch issues

Fixed:
ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Not fixed (url):
WARNING: line over 80 characters

Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis

---
 drivers/hwmon/hwmon-vid.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
drivers/hwmon/hwmon-vid.c +8 -10
index 5ec5e37..40b50b4 100644
@@ -83,18 +83,18 @@ int vid_from_reg(int val, u8 vrm)
 {
 	int vid;
 
-	switch(vrm) {
+	switch (vrm) {
 
-	case 100:               /* VRD 10.0 */
+	case 100:		/* VRD 10.0 */
 		/* compute in uV, round to mV */
 		val &= 0x3f;
-		if((val & 0x1f) = 0x1f)
+		if ((val & 0x1f) = 0x1f)
 			return 0;
-		if((val & 0x1f) <= 0x09 || val = 0x0a)
+		if ((val & 0x1f) <= 0x09 || val = 0x0a)
 			vid = 1087500 - (val & 0x1f) * 25000;
 		else
 			vid = 1862500 - (val & 0x1f) * 25000;
-		if(val & 0x20)
+		if (val & 0x20)
 			vid -= 12500;
 		return (vid + 500) / 1000;
 
@@ -119,7 +119,7 @@ int vid_from_reg(int val, u8 vrm)
 	case 90:		/* VRM 9.0 */
 		val &= 0x1f;
 		return val = 0x1f ? 0 :
-		                       1850 - val * 25;
+				     1850 - val * 25;
 
 	case 85:		/* VRM 8.5 */
 		val &= 0x1f;
@@ -134,7 +134,7 @@ int vid_from_reg(int val, u8 vrm)
 		val &= 0x1f;
 		return val = 0x1f ? 0 :
 		       val & 0x10  ? 5100 - (val) * 100 :
-		                     2050 - (val) * 50;
+				     2050 - (val) * 50;
 	case 17:		/* Intel IMVP-II */
 		val &= 0x1f;
 		return val & 0x10 ? 975 - (val & 0xF) * 25 :
@@ -157,7 +157,7 @@ int vid_from_reg(int val, u8 vrm)
 		return 0;
 	}
 }
-
+EXPORT_SYMBOL(vid_from_reg);
 
 /*
  * After this point is the code to automatically determine which
@@ -299,8 +299,6 @@ u8 vid_which_vrm(void)
 	return 0;
 }
 #endif
-
-EXPORT_SYMBOL(vid_from_reg);
 EXPORT_SYMBOL(vid_which_vrm);
 
 MODULE_AUTHOR("Rudolf Marek <[email protected]>");
Signature · 7 lines
1.7.5.4


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 2/3
#1 lore raw
Quoted 8 lines · Guenter Roeck

Fixed:
ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Not fixed (url):
WARNING: line over 80 characters
(...)

Looks alright, but for some reason this patch won't apply here. Nevertheless:

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Guenter Roeck
Quoted 11 lines · Jean Delvare
Quoted 8 lines · Guenter Roeck

Fixed:
ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Not fixed (url):
WARNING: line over 80 characters
(...)

Looks alright, but for some reason this patch won't apply here.

Probably because it is based on the top of my -next branch, and I have a couple of other cleanup patches pending for it.

Quoted 4 lines

Nevertheless:

Thanks, applied.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Guenter Roeck
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Jean Delvare
Quoted 5 lines · Guenter Roeck

Fixed:
ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Not fixed (url):
WARNING: line over 80 characters
(...)

Looks alright, but for some reason this patch won't apply here.

Probably because it is based on the top of my -next branch, and I have a couple of other cleanup patches pending for it.

The only one I was aware of was
http://git.kernel.org/?p=linux/kernel/git/groeck/linux-staging.git;a=commit;h"ec808b7571199e4a390f59ad5d8e907fb3888c
and I did have it applied to my tree.

Turns out I was missing...
http://git.kernel.org/?p=linux/kernel/git/groeck/linux-staging.git;a=commit;h�66e74b5a958fc5a96d57992bbd861f2584e50c
And now everything applies fine. Sorry for the noise.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors