diff mbox

[3/3] helper: linux: checkpatch cleaning for helper/linux.c

Message ID 1446210967-23576-4-git-send-email-carl.wallen@nokia.com
State Accepted
Commit d4a62b3192d8dae95585a70cc0a3a5f64ed3a472
Headers show

Commit Message

Wallen, Carl (Nokia - FI/Espoo) Oct. 30, 2015, 1:16 p.m. UTC
Cleaned helper/linux.c from any further old checkpatch errors.

Signed-off-by: Carl Wallen <carl.wallen@nokia.com>
---
 helper/linux.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/helper/linux.c b/helper/linux.c
index 6e70206..4a8e8b3 100644
--- a/helper/linux.c
+++ b/helper/linux.c
@@ -35,6 +35,7 @@  static void *odp_run_start_routine(void *arg)
 
 	void *ret_ptr = start_args->start_routine(start_args->arg);
 	int ret = odp_term_local();
+
 	if (ret < 0)
 		ODPH_ERR("Local term failed\n");
 	else if (ret == 0 && odp_term_global())
@@ -43,10 +44,9 @@  static void *odp_run_start_routine(void *arg)
 	return ret_ptr;
 }
 
-
 int odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl,
-			       const odp_cpumask_t *mask_in,
-			       void *(*start_routine) (void *), void *arg)
+			      const odp_cpumask_t *mask_in,
+			      void *(*start_routine)(void *), void *arg)
 {
 	int i;
 	int num;
@@ -63,7 +63,7 @@  int odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl,
 	cpu_count = odp_cpu_count();
 
 	if (num < 1 || num > cpu_count) {
-		ODPH_ERR("Invalid number of threads: %d (%d cores available)\n",
+		ODPH_ERR("Invalid number of threads:%d (%d cores available)\n",
 			 num, cpu_count);
 		return 0;
 	}
@@ -89,8 +89,10 @@  int odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl,
 		thread_tbl[i].start_args->start_routine = start_routine;
 		thread_tbl[i].start_args->arg           = arg;
 
-		ret = pthread_create(&thread_tbl[i].thread, &thread_tbl[i].attr,
-			       odp_run_start_routine, thread_tbl[i].start_args);
+		ret = pthread_create(&thread_tbl[i].thread,
+				     &thread_tbl[i].attr,
+				     odp_run_start_routine,
+				     thread_tbl[i].start_args);
 		if (ret != 0) {
 			ODPH_ERR("Failed to start thread on cpu #%d\n", cpu);
 			free(thread_tbl[i].start_args);
@@ -103,7 +105,6 @@  int odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl,
 	return i;
 }
 
-
 void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num)
 {
 	int i;
@@ -114,14 +115,13 @@  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num)
 		ret = pthread_join(thread_tbl[i].thread, NULL);
 		if (ret != 0) {
 			ODPH_ERR("Failed to join thread from cpu #%d\n",
-				thread_tbl[i].cpu);
+				 thread_tbl[i].cpu);
 		}
 		pthread_attr_destroy(&thread_tbl[i].attr);
 		free(thread_tbl[i].start_args);
 	}
 }
 
-
 int odph_linux_process_fork_n(odph_linux_process_t *proc_tbl,
 			      const odp_cpumask_t *mask_in)
 {
@@ -191,7 +191,6 @@  int odph_linux_process_fork_n(odph_linux_process_t *proc_tbl,
 	return 1;
 }
 
-
 int odph_linux_process_fork(odph_linux_process_t *proc, int cpu)
 {
 	odp_cpumask_t mask;
@@ -201,7 +200,6 @@  int odph_linux_process_fork(odph_linux_process_t *proc, int cpu)
 	return odph_linux_process_fork_n(proc, &mask);
 }
 
-
 int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)
 {
 	pid_t pid;