Skip to contentSkip to conversation

Staging: vt6655: Fix camel case of variable

PATCH In review Petr Sedlák 3 participants 3 messages Dec 29, 2018 – Jan 2, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: vt6655: Fix camel case of variable

Replace variable uDelayUnit with u_delay_unit. Issue found by checkpatch.

---
 drivers/staging/vt6655/upc.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6655/upc.h +4 -4
index 61b3e568ff9a..384af225336a 100644
@@ -42,15 +42,15 @@
 #define VNSvOutPortD(dwIOAddress, dwData) \
 	iowrite32((u32)(dwData), dwIOAddress)
 
-#define PCAvDelayByIO(uDelayUnit)				\
+#define PCAvDelayByIO(u_delay_unit)				\
 do {								\
 	unsigned char byData;					\
 	unsigned long ii;					\
 								\
-	if (uDelayUnit <= 50) {					\
-		udelay(uDelayUnit);				\
+	if (u_delay_unit <= 50) {					\
+		udelay(u_delay_unit);				\
 	} else {						\
-		for (ii = 0; ii < (uDelayUnit); ii++)		\
+		for (ii = 0; ii < (u_delay_unit); ii++)		\
 			byData = inb(0x61);			\
 	}							\
 } while (0)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 2 lines · Petr Sedlák

Replace variable uDelayUnit with u_delay_unit. Issue found by checkpatch.

probably better as a static inline too.

drivers/staging/vt6655/upc.h

Quoted 1 line
drivers/staging/vt6655/upc.h +0 -0

[]

Quoted 10 lines
drivers/staging/vt6655/upc.h +1 -1
@@ -42,15 +42,15 @@
 #define VNSvOutPortD(dwIOAddress, dwData) \
 	iowrite32((u32)(dwData), dwIOAddress)
 
-#define PCAvDelayByIO(uDelayUnit)				\
+#define PCAvDelayByIO(u_delay_unit)				\
 do {								\
 	unsigned char byData;					\
 	unsigned long ii;					\
 								\

drivers/staging/vt6655/upc.h line 56

Quoted 10 lines
drivers/staging/vt6655/upc.h +3 -3
-	if (uDelayUnit <= 50) {					\
-		udelay(uDelayUnit);				\
+	if (u_delay_unit <= 50) {					\
+		udelay(u_delay_unit);				\
 	} else {						\
-		for (ii = 0; ii < (uDelayUnit); ii++)		\
+		for (ii = 0; ii < (u_delay_unit); ii++)		\
 			byData = inb(0x61);			\
 	}							\
 } while (0)

And as the thing is used only once with a #define
with a value less than 50, maybe just

	udelay(CB_DELAY_LOOP_WAIT);

in that one place.

#2 lore raw
In reply to Petr Sedlák
Quoted 22 lines · Petr Sedlák

Replace variable uDelayUnit with u_delay_unit. Issue found by checkpatch.

---
 drivers/staging/vt6655/upc.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6655/upc.h +1 -1
index 61b3e568ff9a..384af225336a 100644
@@ -42,15 +42,15 @@
 #define VNSvOutPortD(dwIOAddress, dwData) \
 	iowrite32((u32)(dwData), dwIOAddress)
 
-#define PCAvDelayByIO(uDelayUnit)				\
+#define PCAvDelayByIO(u_delay_unit)				\
 do {								\
 	unsigned char byData;					\
 	unsigned long ii;					\
 								\

drivers/staging/vt6655/upc.h line 56

Quoted 10 lines
drivers/staging/vt6655/upc.h +3 -3
-	if (uDelayUnit <= 50) {					\
-		udelay(uDelayUnit);				\
+	if (u_delay_unit <= 50) {					\
+		udelay(u_delay_unit);				\
 	} else {						\
-		for (ii = 0; ii < (uDelayUnit); ii++)		\
+		for (ii = 0; ii < (u_delay_unit); ii++)		\
 			byData = inb(0x61);			\
 	}							\
 } while (0)

This is a hilariously awful macro. It reads from a register usec number of times to introduce a delay. :P

Just delete it and fix the callers to use normal delay functions.

regards,
dan carpenter