linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: lustre: fix style issues in dt_object.c
@ 2015-05-30 15:28 Zoltán Lajos Kis
  2015-05-30 15:35 ` Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Zoltán Lajos Kis @ 2015-05-30 15:28 UTC (permalink / raw)
  To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall, kumari.radha3,
	mahfouz.saif.elyazal, gdonald
  Cc: HPDD-discuss, devel, linux-kernel

Fixes coding style issues for lustre/lustre/odbclass/dt_object.c that
were found by the checkpatch.pl tool.

Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@gmail.com>

---
---
 drivers/staging/lustre/lustre/obdclass/dt_object.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/dt_object.c b/drivers/staging/lustre/lustre/obdclass/dt_object.c
index b1eee0a..91fd7b9 100644
--- a/drivers/staging/lustre/lustre/obdclass/dt_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/dt_object.c
@@ -237,7 +237,8 @@ EXPORT_SYMBOL(dt_locate_at);
 /**
  * find a object named \a entry in given \a dfh->dfh_o directory.
  */
-static int dt_find_entry(const struct lu_env *env, const char *entry, void *data)
+static int dt_find_entry(const struct lu_env *env,
+			 const char *entry, void *data)
 {
 	struct dt_find_hint  *dfh = data;
 	struct dt_device     *dt = dfh->dfh_dt;
@@ -330,9 +331,9 @@ static struct dt_object *dt_reg_open(const struct lu_env *env,
 	int result;
 
 	result = dt_lookup_dir(env, p, name, fid);
-	if (result == 0){
+	if (result == 0)
 		o = dt_locate(env, dt, fid);
-	} else
+	else
 		o = ERR_PTR(result);
 
 	return o;
@@ -528,7 +529,6 @@ void dt_version_set(const struct lu_env *env, struct dt_object *o,
 	rc = dt_xattr_set(env, o, &vbuf, xname, 0, th, BYPASS_CAPA);
 	if (rc < 0)
 		CDEBUG(D_INODE, "Can't set version, rc %d\n", rc);
-	return;
 }
 EXPORT_SYMBOL(dt_version_set);
 
@@ -923,7 +923,7 @@ int dt_index_read(const struct lu_env *env, struct dt_device *dev,
 	ii->ii_version = dt_version_get(env, obj);
 
 	/* walk the index and fill lu_idxpages with key/record pairs */
-	rc = dt_index_walk(env, obj, rdpg, dt_index_page_build ,ii);
+	rc = dt_index_walk(env, obj, rdpg, dt_index_page_build, ii);
 	dt_read_unlock(env, obj);
 
 	if (rc == 0) {
@@ -939,7 +939,7 @@ out:
 }
 EXPORT_SYMBOL(dt_index_read);
 
-#if defined (CONFIG_PROC_FS)
+#if defined(CONFIG_PROC_FS)
 
 int lprocfs_dt_rd_blksize(char *page, char **start, off_t off,
 			  int count, int *eof, void *data)
-- 
1.9.1


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

* Re: [PATCH] Staging: lustre: fix style issues in dt_object.c
  2015-05-30 15:28 [PATCH] Staging: lustre: fix style issues in dt_object.c Zoltán Lajos Kis
@ 2015-05-30 15:35 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-05-30 15:35 UTC (permalink / raw)
  To: Zoltán Lajos Kis
  Cc: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall, kumari.radha3,
	mahfouz.saif.elyazal, gdonald, HPDD-discuss, devel, linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2405 bytes --]

On Sat, 30 May 2015, Zoltán Lajos Kis wrote:

> Fixes coding style issues for lustre/lustre/odbclass/dt_object.c that
> were found by the checkpatch.pl tool.
>
> Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@gmail.com>
>
> ---
> ---

Only one --- is needed.

It is better for a patch to do only one thing.  This one does a bunch of
unrelated things (except for the checkpatch connection).

julia

>  drivers/staging/lustre/lustre/obdclass/dt_object.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/obdclass/dt_object.c b/drivers/staging/lustre/lustre/obdclass/dt_object.c
> index b1eee0a..91fd7b9 100644
> --- a/drivers/staging/lustre/lustre/obdclass/dt_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/dt_object.c
> @@ -237,7 +237,8 @@ EXPORT_SYMBOL(dt_locate_at);
>  /**
>   * find a object named \a entry in given \a dfh->dfh_o directory.
>   */
> -static int dt_find_entry(const struct lu_env *env, const char *entry, void *data)
> +static int dt_find_entry(const struct lu_env *env,
> +			 const char *entry, void *data)
>  {
>  	struct dt_find_hint  *dfh = data;
>  	struct dt_device     *dt = dfh->dfh_dt;
> @@ -330,9 +331,9 @@ static struct dt_object *dt_reg_open(const struct lu_env *env,
>  	int result;
>
>  	result = dt_lookup_dir(env, p, name, fid);
> -	if (result == 0){
> +	if (result == 0)
>  		o = dt_locate(env, dt, fid);
> -	} else
> +	else
>  		o = ERR_PTR(result);
>
>  	return o;
> @@ -528,7 +529,6 @@ void dt_version_set(const struct lu_env *env, struct dt_object *o,
>  	rc = dt_xattr_set(env, o, &vbuf, xname, 0, th, BYPASS_CAPA);
>  	if (rc < 0)
>  		CDEBUG(D_INODE, "Can't set version, rc %d\n", rc);
> -	return;
>  }
>  EXPORT_SYMBOL(dt_version_set);
>
> @@ -923,7 +923,7 @@ int dt_index_read(const struct lu_env *env, struct dt_device *dev,
>  	ii->ii_version = dt_version_get(env, obj);
>
>  	/* walk the index and fill lu_idxpages with key/record pairs */
> -	rc = dt_index_walk(env, obj, rdpg, dt_index_page_build ,ii);
> +	rc = dt_index_walk(env, obj, rdpg, dt_index_page_build, ii);
>  	dt_read_unlock(env, obj);
>
>  	if (rc == 0) {
> @@ -939,7 +939,7 @@ out:
>  }
>  EXPORT_SYMBOL(dt_index_read);
>
> -#if defined (CONFIG_PROC_FS)
> +#if defined(CONFIG_PROC_FS)
>
>  int lprocfs_dt_rd_blksize(char *page, char **start, off_t off,
>  			  int count, int *eof, void *data)
> --
> 1.9.1
>
>

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

end of thread, other threads:[~2015-05-30 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-30 15:28 [PATCH] Staging: lustre: fix style issues in dt_object.c Zoltán Lajos Kis
2015-05-30 15:35 ` Julia Lawall

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).