Skip to contentSkip to conversation

selftests: timers: rtcpie: Fix checkpatch reported errors

PATCH New Thushara.M.S 1 participant 1 message May 24, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: timers: rtcpie: Fix checkpatch reported errors

Errors reported:
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '*=' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: space required after that ',' (ctx:VxV)

total: 6 errors, 0 warnings, 141 lines checked

---
 tools/testing/selftests/timers/rtcpie.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/timers/rtcpie.c +3 -3
index 7c07edd0d450..aa5a20fd8df2 100644
@@ -75,7 +75,7 @@ int main(int argc, char **argv)
 	fflush(stderr);
 
 	/* The frequencies 128Hz, 256Hz, ... 8192Hz are only allowed for root. */
-	for (tmp=2; tmp<=64; tmp*=2) {
+	for (tmp = 2; tmp <= 64; tmp *= 2) {
 
 		retval = ioctl(fd, RTC_IRQP_SET, tmp);
 		if (retval == -1) {
@@ -99,7 +99,7 @@ int main(int argc, char **argv)
 			exit(errno);
 		}
 
-		for (i=1; i<21; i++) {
+		for (i = 1; i < 21; i++) {
 			gettimeofday(&start, NULL);
 			/* This blocks */
 			retval = read(fd, &data, sizeof(unsigned long));
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
 				exit(-1);
 			}
 
-			fprintf(stderr, " %d",i);
+			fprintf(stderr, " %d", i);
 			fflush(stderr);
 		}
 
Signature · 1 line
2.43.0