All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: staging: lustre: Fix "space prohibited after that open parenthesis '('" errors
@ 2014-09-02 21:14 Greg Donald
  2014-09-08 19:35 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Donald @ 2014-09-02 21:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Andreas Dilger, Oleg Drokin, linux-kernel; +Cc: Greg Donald

Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
---
 drivers/staging/lustre/lustre/lmv/lmv_internal.h   |  2 +-
 .../lustre/lustre/obdclass/linux/linux-module.c    |  4 ++--
 drivers/staging/lustre/lustre/obdclass/obdo.c      | 28 +++++++++++-----------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lmv/lmv_internal.h b/drivers/staging/lustre/lustre/lmv/lmv_internal.h
index 80e6604..96d35bf 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_internal.h
+++ b/drivers/staging/lustre/lustre/lmv/lmv_internal.h
@@ -93,7 +93,7 @@ static inline struct lmv_stripe_md *lmv_get_mea(struct ptlrpc_request *req)
 
 	if (mea->mea_count == 0)
 		return NULL;
-	if( mea->mea_magic != MEA_MAGIC_LAST_CHAR &&
+	if (mea->mea_magic != MEA_MAGIC_LAST_CHAR &&
 		mea->mea_magic != MEA_MAGIC_ALL_CHARS &&
 		mea->mea_magic != MEA_MAGIC_HASH_SEGMENT)
 		return NULL;
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 9ce3d36..50256a9 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -84,7 +84,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg)
 	int offset = 0;
 
 	err = copy_from_user(&hdr, (void *)arg, sizeof(hdr));
-	if ( err )
+	if (err)
 		return err;
 
 	if (hdr.ioc_version != OBD_IOCTL_VERSION) {
@@ -118,7 +118,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg)
 	data = (struct obd_ioctl_data *)*buf;
 
 	err = copy_from_user(*buf, (void *)arg, hdr.ioc_len);
-	if ( err ) {
+	if (err) {
 		OBD_FREE_LARGE(*buf, hdr.ioc_len);
 		return err;
 	}
diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c
index bdc00ea..d170b14 100644
--- a/drivers/staging/lustre/lustre/obdclass/obdo.c
+++ b/drivers/staging/lustre/lustre/obdclass/obdo.c
@@ -161,35 +161,35 @@ int obdo_cmp_md(struct obdo *dst, struct obdo *src, u32 compare)
 {
 	int res = 0;
 
-	if ( compare & OBD_MD_FLATIME )
+	if (compare & OBD_MD_FLATIME)
 		res = (res || (dst->o_atime != src->o_atime));
-	if ( compare & OBD_MD_FLMTIME )
+	if (compare & OBD_MD_FLMTIME)
 		res = (res || (dst->o_mtime != src->o_mtime));
-	if ( compare & OBD_MD_FLCTIME )
+	if (compare & OBD_MD_FLCTIME)
 		res = (res || (dst->o_ctime != src->o_ctime));
-	if ( compare & OBD_MD_FLSIZE )
+	if (compare & OBD_MD_FLSIZE)
 		res = (res || (dst->o_size != src->o_size));
-	if ( compare & OBD_MD_FLBLOCKS ) /* allocation of space */
+	if (compare & OBD_MD_FLBLOCKS) /* allocation of space */
 		res = (res || (dst->o_blocks != src->o_blocks));
-	if ( compare & OBD_MD_FLBLKSZ )
+	if (compare & OBD_MD_FLBLKSZ)
 		res = (res || (dst->o_blksize != src->o_blksize));
-	if ( compare & OBD_MD_FLTYPE )
+	if (compare & OBD_MD_FLTYPE)
 		res = (res || (((dst->o_mode ^ src->o_mode) & S_IFMT) != 0));
-	if ( compare & OBD_MD_FLMODE )
+	if (compare & OBD_MD_FLMODE)
 		res = (res || (((dst->o_mode ^ src->o_mode) & ~S_IFMT) != 0));
-	if ( compare & OBD_MD_FLUID )
+	if (compare & OBD_MD_FLUID)
 		res = (res || (dst->o_uid != src->o_uid));
-	if ( compare & OBD_MD_FLGID )
+	if (compare & OBD_MD_FLGID)
 		res = (res || (dst->o_gid != src->o_gid));
-	if ( compare & OBD_MD_FLFLAGS )
+	if (compare & OBD_MD_FLFLAGS)
 		res = (res || (dst->o_flags != src->o_flags));
-	if ( compare & OBD_MD_FLNLINK )
+	if (compare & OBD_MD_FLNLINK)
 		res = (res || (dst->o_nlink != src->o_nlink));
-	if ( compare & OBD_MD_FLFID ) {
+	if (compare & OBD_MD_FLFID) {
 		res = (res || (dst->o_parent_seq != src->o_parent_seq));
 		res = (res || (dst->o_parent_ver != src->o_parent_ver));
 	}
-	if ( compare & OBD_MD_FLGENER )
+	if (compare & OBD_MD_FLGENER)
 		res = (res || (dst->o_parent_oid != src->o_parent_oid));
 	/* XXX Don't know if these should be included here - wasn't previously
 	if ( compare & OBD_MD_FLINLINE )
-- 
1.9.1


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

* Re: [PATCH] drivers: staging: lustre: Fix "space prohibited after that open parenthesis '('" errors
  2014-09-02 21:14 [PATCH] drivers: staging: lustre: Fix "space prohibited after that open parenthesis '('" errors Greg Donald
@ 2014-09-08 19:35 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-09-08 19:35 UTC (permalink / raw)
  To: Greg Donald; +Cc: Andreas Dilger, Oleg Drokin, linux-kernel

On Tue, Sep 02, 2014 at 04:14:20PM -0500, Greg Donald wrote:
> Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors
> 
> Signed-off-by: Greg Donald <gdonald@gmail.com>
> ---
>  drivers/staging/lustre/lustre/lmv/lmv_internal.h   |  2 +-
>  .../lustre/lustre/obdclass/linux/linux-module.c    |  4 ++--
>  drivers/staging/lustre/lustre/obdclass/obdo.c      | 28 +++++++++++-----------
>  3 files changed, 17 insertions(+), 17 deletions(-)

I've already applied part of this patch from someone else, can you
refresh and resend?

thanks,

greg k-h

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

* Re: [PATCH] drivers: staging: lustre: Fix "space prohibited after that open parenthesis '('" errors
  2014-09-08 22:32 Greg Donald
@ 2014-09-08 22:38 ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2014-09-08 22:38 UTC (permalink / raw)
  To: Greg Donald; +Cc: Greg Kroah-Hartman, Andreas Dilger, Oleg Drokin, linux-kernel

On Mon, 2014-09-08 at 17:32 -0500, Greg Donald wrote:
> Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors
[]
> diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c
[]
> @@ -161,35 +161,35 @@ int obdo_cmp_md(struct obdo *dst, struct obdo *src, u32 compare)
>  {
>  	int res = 0;
>  
> -	if ( compare & OBD_MD_FLATIME )
> +	if (compare & OBD_MD_FLATIME)
>  		res = (res || (dst->o_atime != src->o_atime));

These would be nicer as

		res |= dst->o_atime != src->o_atime;

> -	if ( compare & OBD_MD_FLMTIME )
> +	if (compare & OBD_MD_FLMTIME)
>  		res = (res || (dst->o_mtime != src->o_mtime));

etc...



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

* [PATCH] drivers: staging: lustre: Fix "space prohibited after that open parenthesis '('" errors
@ 2014-09-08 22:32 Greg Donald
  2014-09-08 22:38 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Donald @ 2014-09-08 22:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Andreas Dilger, Oleg Drokin, linux-kernel; +Cc: Greg Donald

Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
---
 .../lustre/lustre/obdclass/linux/linux-module.c    |  4 ++--
 drivers/staging/lustre/lustre/obdclass/obdo.c      | 28 +++++++++++-----------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 9ce3d36..50256a9 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -84,7 +84,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg)
 	int offset = 0;
 
 	err = copy_from_user(&hdr, (void *)arg, sizeof(hdr));
-	if ( err )
+	if (err)
 		return err;
 
 	if (hdr.ioc_version != OBD_IOCTL_VERSION) {
@@ -118,7 +118,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg)
 	data = (struct obd_ioctl_data *)*buf;
 
 	err = copy_from_user(*buf, (void *)arg, hdr.ioc_len);
-	if ( err ) {
+	if (err) {
 		OBD_FREE_LARGE(*buf, hdr.ioc_len);
 		return err;
 	}
diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c
index bdc00ea..d170b14 100644
--- a/drivers/staging/lustre/lustre/obdclass/obdo.c
+++ b/drivers/staging/lustre/lustre/obdclass/obdo.c
@@ -161,35 +161,35 @@ int obdo_cmp_md(struct obdo *dst, struct obdo *src, u32 compare)
 {
 	int res = 0;
 
-	if ( compare & OBD_MD_FLATIME )
+	if (compare & OBD_MD_FLATIME)
 		res = (res || (dst->o_atime != src->o_atime));
-	if ( compare & OBD_MD_FLMTIME )
+	if (compare & OBD_MD_FLMTIME)
 		res = (res || (dst->o_mtime != src->o_mtime));
-	if ( compare & OBD_MD_FLCTIME )
+	if (compare & OBD_MD_FLCTIME)
 		res = (res || (dst->o_ctime != src->o_ctime));
-	if ( compare & OBD_MD_FLSIZE )
+	if (compare & OBD_MD_FLSIZE)
 		res = (res || (dst->o_size != src->o_size));
-	if ( compare & OBD_MD_FLBLOCKS ) /* allocation of space */
+	if (compare & OBD_MD_FLBLOCKS) /* allocation of space */
 		res = (res || (dst->o_blocks != src->o_blocks));
-	if ( compare & OBD_MD_FLBLKSZ )
+	if (compare & OBD_MD_FLBLKSZ)
 		res = (res || (dst->o_blksize != src->o_blksize));
-	if ( compare & OBD_MD_FLTYPE )
+	if (compare & OBD_MD_FLTYPE)
 		res = (res || (((dst->o_mode ^ src->o_mode) & S_IFMT) != 0));
-	if ( compare & OBD_MD_FLMODE )
+	if (compare & OBD_MD_FLMODE)
 		res = (res || (((dst->o_mode ^ src->o_mode) & ~S_IFMT) != 0));
-	if ( compare & OBD_MD_FLUID )
+	if (compare & OBD_MD_FLUID)
 		res = (res || (dst->o_uid != src->o_uid));
-	if ( compare & OBD_MD_FLGID )
+	if (compare & OBD_MD_FLGID)
 		res = (res || (dst->o_gid != src->o_gid));
-	if ( compare & OBD_MD_FLFLAGS )
+	if (compare & OBD_MD_FLFLAGS)
 		res = (res || (dst->o_flags != src->o_flags));
-	if ( compare & OBD_MD_FLNLINK )
+	if (compare & OBD_MD_FLNLINK)
 		res = (res || (dst->o_nlink != src->o_nlink));
-	if ( compare & OBD_MD_FLFID ) {
+	if (compare & OBD_MD_FLFID) {
 		res = (res || (dst->o_parent_seq != src->o_parent_seq));
 		res = (res || (dst->o_parent_ver != src->o_parent_ver));
 	}
-	if ( compare & OBD_MD_FLGENER )
+	if (compare & OBD_MD_FLGENER)
 		res = (res || (dst->o_parent_oid != src->o_parent_oid));
 	/* XXX Don't know if these should be included here - wasn't previously
 	if ( compare & OBD_MD_FLINLINE )
-- 
1.9.1


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

end of thread, other threads:[~2014-09-08 22:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-02 21:14 [PATCH] drivers: staging: lustre: Fix "space prohibited after that open parenthesis '('" errors Greg Donald
2014-09-08 19:35 ` Greg Kroah-Hartman
2014-09-08 22:32 Greg Donald
2014-09-08 22:38 ` Joe Perches

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.