linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]ipc:fixed spacing issues in coding style.
@ 2012-05-20 11:01 Jeffrin Jose
  2012-05-20 15:44 ` Paul E. McKenney
  2012-05-20 19:04 ` Josh Triplett
  0 siblings, 2 replies; 3+ messages in thread
From: Jeffrin Jose @ 2012-05-20 11:01 UTC (permalink / raw)
  To: akpm, manfred, a.p.zijlstra, paulmck, josh; +Cc: linux-kernel, ahiliation

Fixed spacing issues related to different operators
like * and : found by checkpatch.pl tool in ipc/sem.c

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
---
 ipc/sem.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index 10386b8..9301595 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -964,7 +964,7 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
 		up_read(&sem_ids(ns).rw_mutex);
 		if (copy_to_user (arg.__buf, &seminfo, sizeof(struct seminfo))) 
 			return -EFAULT;
-		return (max_id < 0) ? 0: max_id;
+		return (max_id < 0) ? 0 : max_id;
 	}
 	case IPC_STAT:
 	case SEM_STAT:
@@ -1372,7 +1372,7 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
 	spin_lock(&ulp->lock);
 	un = lookup_undo(ulp, semid);
 	spin_unlock(&ulp->lock);
-	if (likely(un!=NULL))
+	if (likely(un != NULL))
 		goto out;
 	rcu_read_unlock();
 
@@ -1732,7 +1732,7 @@ void exit_sem(struct task_struct *tsk)
 
 		/* perform adjustments registered in un */
 		for (i = 0; i < sma->sem_nsems; i++) {
-			struct sem * semaphore = &sma->sem_base[i];
+			struct sem *semaphore = &sma->sem_base[i];
 			if (un->semadj[i]) {
 				semaphore->semval += un->semadj[i];
 				/*
-- 
1.7.10


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

* Re: [PATCH]ipc:fixed spacing issues in coding style.
  2012-05-20 11:01 [PATCH]ipc:fixed spacing issues in coding style Jeffrin Jose
@ 2012-05-20 15:44 ` Paul E. McKenney
  2012-05-20 19:04 ` Josh Triplett
  1 sibling, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2012-05-20 15:44 UTC (permalink / raw)
  To: Jeffrin Jose; +Cc: akpm, manfred, a.p.zijlstra, josh, linux-kernel

On Sun, May 20, 2012 at 04:31:13PM +0530, Jeffrin Jose wrote:
> Fixed spacing issues related to different operators
> like * and : found by checkpatch.pl tool in ipc/sem.c
> 
> Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>

Looks good to me!

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> ---
>  ipc/sem.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ipc/sem.c b/ipc/sem.c
> index 10386b8..9301595 100644
> --- a/ipc/sem.c
> +++ b/ipc/sem.c
> @@ -964,7 +964,7 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
>  		up_read(&sem_ids(ns).rw_mutex);
>  		if (copy_to_user (arg.__buf, &seminfo, sizeof(struct seminfo))) 
>  			return -EFAULT;
> -		return (max_id < 0) ? 0: max_id;
> +		return (max_id < 0) ? 0 : max_id;
>  	}
>  	case IPC_STAT:
>  	case SEM_STAT:
> @@ -1372,7 +1372,7 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
>  	spin_lock(&ulp->lock);
>  	un = lookup_undo(ulp, semid);
>  	spin_unlock(&ulp->lock);
> -	if (likely(un!=NULL))
> +	if (likely(un != NULL))
>  		goto out;
>  	rcu_read_unlock();
> 
> @@ -1732,7 +1732,7 @@ void exit_sem(struct task_struct *tsk)
> 
>  		/* perform adjustments registered in un */
>  		for (i = 0; i < sma->sem_nsems; i++) {
> -			struct sem * semaphore = &sma->sem_base[i];
> +			struct sem *semaphore = &sma->sem_base[i];
>  			if (un->semadj[i]) {
>  				semaphore->semval += un->semadj[i];
>  				/*
> -- 
> 1.7.10
> 


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

* Re: [PATCH]ipc:fixed spacing issues in coding style.
  2012-05-20 11:01 [PATCH]ipc:fixed spacing issues in coding style Jeffrin Jose
  2012-05-20 15:44 ` Paul E. McKenney
@ 2012-05-20 19:04 ` Josh Triplett
  1 sibling, 0 replies; 3+ messages in thread
From: Josh Triplett @ 2012-05-20 19:04 UTC (permalink / raw)
  To: Jeffrin Jose; +Cc: akpm, manfred, a.p.zijlstra, paulmck, linux-kernel

On Sun, May 20, 2012 at 04:31:13PM +0530, Jeffrin Jose wrote:
> Fixed spacing issues related to different operators
> like * and : found by checkpatch.pl tool in ipc/sem.c
> 
> Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>

All three of the spacing fixes in this patch look correct.
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

However, I see one instance of another type of spacing issue in the
patch context:

> --- a/ipc/sem.c
> +++ b/ipc/sem.c
> @@ -964,7 +964,7 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
>  		up_read(&sem_ids(ns).rw_mutex);
>  		if (copy_to_user (arg.__buf, &seminfo, sizeof(struct seminfo))) 

copy_to_user should not have a space before its open parenthesis.

- Josh Triplett

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

end of thread, other threads:[~2012-05-20 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-20 11:01 [PATCH]ipc:fixed spacing issues in coding style Jeffrin Jose
2012-05-20 15:44 ` Paul E. McKenney
2012-05-20 19:04 ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).