All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RT-TESTS] cyclictest: whitespace cleanup
@ 2012-10-16 16:39 Bhavesh Davda
  2012-10-23  1:12 ` Frank Rowand
  2012-10-25 21:26 ` Frank Rowand
  0 siblings, 2 replies; 3+ messages in thread
From: Bhavesh Davda @ 2012-10-16 16:39 UTC (permalink / raw)
  To: linux-rt-users@vger.kernel.org; +Cc: John Kacur, Frank Rowand

From: Bhavesh Davda <bhavesh@vmware.com>

Cosmetic whitespace cleanup

Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
---
 src/cyclictest/cyclictest.c |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 11b6cea..418538f 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -200,12 +200,12 @@ static int32_t latency_target_value = 0;
 
 /* Latency trick
  * if the file /dev/cpu_dma_latency exists,
- * open it and write a zero into it. This will tell 
- * the power management system not to transition to 
+ * open it and write a zero into it. This will tell
+ * the power management system not to transition to
  * a high cstate (in fact, the system acts like idle=poll)
  * When the fd to /dev/cpu_dma_latency is closed, the behavior
  * goes back to the system default.
- * 
+ *
  * Documentation/power/pm_qos_interface.txt
  */
 static void set_latency_target(void)
@@ -380,7 +380,7 @@ void tracing(int on)
 		switch (kernelversion) {
 		case KV_26_LT18: gettimeofday(0,(struct timezone *)1); break;
 		case KV_26_LT24: prctl(0, 1); break;
-		case KV_26_33: 
+		case KV_26_33:
 		case KV_30:
 			write(trace_fd, "1", 1);
 			break;
@@ -390,7 +390,7 @@ void tracing(int on)
 		switch (kernelversion) {
 		case KV_26_LT18: gettimeofday(0,0); break;
 		case KV_26_LT24: prctl(0, 0); break;
-		case KV_26_33: 
+		case KV_26_33:
 		case KV_30:
 			write(trace_fd, "0", 1);
 			break;
@@ -720,7 +720,7 @@ void *timerthread(void *param)
 
 	memset(&schedp, 0, sizeof(schedp));
 	schedp.sched_priority = par->prio;
-	if (setscheduler(0, par->policy, &schedp)) 
+	if (setscheduler(0, par->policy, &schedp))
 		fatal("timerthread%d: failed to set priority to %d\n", par->cpu, par->prio);
 
 	/* Get current time */
@@ -907,7 +907,7 @@ static void display_help(int error)
 		if (kernvar(O_RDONLY, "available_tracers", tracers, sizeof(tracers)))
 			strcpy(tracers, "none");
 	}
-		
+
 	printf("cyclictest V %1.2f\n", VERSION_STRING);
 	printf("Usage:\n"
 	       "cyclictest <options>\n\n"
@@ -933,7 +933,7 @@ static void display_help(int error)
 	       "-I       --irqsoff         Irqsoff tracing (used with -b)\n"
 	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
 	       "-m       --mlockall        lock current and future memory allocations\n"
-	       "-M       --refresh_on_max  delay updating the screen until a new max latency is hit\n" 
+	       "-M       --refresh_on_max  delay updating the screen until a new max latency is hit\n"
 	       "-n       --nanosleep       use clock_nanosleep\n"
 	       "-N       --nsecs           print results in ns instead of us (default us)\n"
 	       "-o RED   --oscope=RED      oscilloscope mode, reduce verbose output by RED\n"
@@ -1043,7 +1043,7 @@ static void process_options (int argc, char *argv[])
 	int max_cpus = sysconf(_SC_NPROCESSORS_CONF);
 
 	for (;;) {
- 		int option_index = 0;
+		int option_index = 0;
 		/** Options for getopt */
 		static struct option long_options[] = {
 			{"affinity", optional_argument, NULL, 'a'},
@@ -1128,8 +1128,8 @@ static void process_options (int argc, char *argv[])
 		case 'N': use_nsecs = 1; break;
 		case 'o': oscope_reduction = atoi(optarg); break;
 		case 'O': traceopt(optarg); break;
-		case 'p': 
-			priority = atoi(optarg); 
+		case 'p':
+			priority = atoi(optarg);
 			if (policy != SCHED_FIFO && policy != SCHED_RR)
 				policy = SCHED_FIFO;
 			break;
@@ -1158,9 +1158,9 @@ static void process_options (int argc, char *argv[])
 			else
 				num_threads = max_cpus;
 			break;
-		case 'T': 
+		case 'T':
 			tracetype = CUSTOM;
-			strncpy(tracer, optarg, sizeof(tracer)); 
+			strncpy(tracer, optarg, sizeof(tracer));
 			break;
 		case 'u': setvbuf(stdout, NULL, _IONBF, 0); break;
 		case 'v': verbose = 1; break;
@@ -1250,7 +1250,7 @@ static void process_options (int argc, char *argv[])
 		error = 1;
 
 	if (priospread && priority == 0) {
-		fprintf(stderr, "defaulting realtime priority to %d\n", 
+		fprintf(stderr, "defaulting realtime priority to %d\n",
 			num_threads+1);
 		priority = num_threads+1;
 	}
@@ -1261,7 +1261,7 @@ static void process_options (int argc, char *argv[])
 	}
 
 	if ((policy == SCHED_FIFO || policy == SCHED_RR) && priority == 0) {
-		fprintf(stderr, "defaulting realtime priority to %d\n", 
+		fprintf(stderr, "defaulting realtime priority to %d\n",
 			num_threads+1);
 		priority = num_threads+1;
 	}
@@ -1303,7 +1303,7 @@ static int check_kernel(void)
 		kv = KV_30;
 		strcpy(functiontracer, "function");
 		strcpy(traceroptions, "trace_options");
-		
+
 	} else
 		kv = KV_NOT_SUPPORTED;
 
@@ -1385,7 +1385,7 @@ static void print_hist(struct thread_param *par[], int nthreads)
 	printf("# Max Latencies:");
 	maxmax = 0;
 	for (j = 0; j < nthreads; j++) {
- 		printf(" %05lu", par[j]->stats->max);
+		printf(" %05lu", par[j]->stats->max);
 		if (par[j]->stats->max > maxmax)
 			maxmax = par[j]->stats->max;
 	}
@@ -1395,7 +1395,7 @@ static void print_hist(struct thread_param *par[], int nthreads)
 	printf("# Histogram Overflows:");
 	alloverflows = 0;
 	for (j = 0; j < nthreads; j++) {
- 		printf(" %05lu", par[j]->stats->hist_overflow);
+		printf(" %05lu", par[j]->stats->hist_overflow);
 		alloverflows += par[j]->stats->hist_overflow;
 	}
 	if (histofall && nthreads > 1)
@@ -1416,7 +1416,7 @@ static void print_stat(struct thread_param *par, int index, int verbose)
 			else
                                 fmt = "T:%2d (%5d) P:%2d I:%ld C:%7lu "
 					"Min:%7ld Act:%5ld Avg:%5ld Max:%8ld\n";
-                        printf(fmt, index, stat->tid, par->prio, 
+                        printf(fmt, index, stat->tid, par->prio,
                                par->interval, stat->cycles, stat->min, stat->act,
 			       stat->cycles ?
 			       (long)(stat->avg/stat->cycles) : 0, stat->max);
@@ -1679,7 +1679,7 @@ int main(int argc, char **argv)
 			printf("# Break value: %llu\n", (unsigned long long)break_thread_value);
 		}
 	}
-	
+
 
 	for (i=0; i < num_threads; i++) {
 		if (!statistics[i])
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RT-TESTS] cyclictest: whitespace cleanup
  2012-10-16 16:39 [PATCH RT-TESTS] cyclictest: whitespace cleanup Bhavesh Davda
@ 2012-10-23  1:12 ` Frank Rowand
  2012-10-25 21:26 ` Frank Rowand
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Rowand @ 2012-10-23  1:12 UTC (permalink / raw)
  To: Bhavesh Davda; +Cc: linux-rt-users@vger.kernel.org, John Kacur, Rowand, Frank

On 10/16/12 09:39, Bhavesh Davda wrote:
> From: Bhavesh Davda <bhavesh@vmware.com>
> 
> Cosmetic whitespace cleanup
> 
> Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>

>From checkpatch:


ERROR: code indent should use tabs where possible
#161: FILE: src/cyclictest/cyclictest.c:1419:
+                        printf(fmt, index, stat->tid, par->prio,$

WARNING: please, no spaces at the start of a line
#161: FILE: src/cyclictest/cyclictest.c:1419:
+                        printf(fmt, index, stat->tid, par->prio,$

total: 1 errors, 1 warnings, 140 lines checked


You did not add leading white space - it was already there and your
noble effort to remove the trailing white space led to this line
getting caught by checkpatch.  Anyway, it is a good practice to
be checkpatch clean, even it rt-tests are not the linux kernel.

-Frank


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RT-TESTS] cyclictest: whitespace cleanup
  2012-10-16 16:39 [PATCH RT-TESTS] cyclictest: whitespace cleanup Bhavesh Davda
  2012-10-23  1:12 ` Frank Rowand
@ 2012-10-25 21:26 ` Frank Rowand
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Rowand @ 2012-10-25 21:26 UTC (permalink / raw)
  To: Bhavesh Davda; +Cc: linux-rt-users@vger.kernel.org, John Kacur, Rowand, Frank

On 10/16/12 09:39, Bhavesh Davda wrote:
> From: Bhavesh Davda <bhavesh@vmware.com>
> 
> Cosmetic whitespace cleanup
> 
> Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>

Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>

Tested-by: Frank Rowand <frank.rowand@am.sony.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-25 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 16:39 [PATCH RT-TESTS] cyclictest: whitespace cleanup Bhavesh Davda
2012-10-23  1:12 ` Frank Rowand
2012-10-25 21:26 ` Frank Rowand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.