linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6] staging: lustre: lclient: fixing coding style issues
@ 2014-06-17  5:43 Anil Belur
  2014-06-17  5:43 ` [PATCH v6 1/8] staging: lustre: lclient: glimpse.c " Anil Belur
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh; +Cc: linux-kernel, hpdd-discuss

Revised PATCH 7/8 and updated the comment, as suggested by "oleg.drokin@intel.com"


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

* [PATCH v6 1/8] staging: lustre: lclient: glimpse.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17  5:43 ` [PATCH v6 2/8] " Anil Belur
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

Fixed "ERROR: need consistent spacing around '+' (ctx:WxV)"

Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c
index 7bbca4b..f669645 100644
--- a/drivers/staging/lustre/lustre/lclient/glimpse.c
+++ b/drivers/staging/lustre/lustre/lclient/glimpse.c
@@ -177,7 +177,7 @@ static int cl_io_get(struct inode *inode, struct lu_env **envout,
 			io->ci_obj = clob;
 			*envout = env;
 			*ioout  = io;
-			result = +1;
+			result = 1;
 		} else
 			result = PTR_ERR(env);
 	} else
-- 
1.9.0


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

* [PATCH v6 2/8] staging: lustre: lclient: glimpse.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
  2014-06-17  5:43 ` [PATCH v6 1/8] staging: lustre: lclient: glimpse.c " Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17  5:43 ` [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c " Anil Belur
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

fixed "WARNING: labels should not be indented"

Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c
index f669645..a658116 100644
--- a/drivers/staging/lustre/lustre/lclient/glimpse.c
+++ b/drivers/staging/lustre/lustre/lclient/glimpse.c
@@ -204,7 +204,7 @@ int cl_glimpse_size0(struct inode *inode, int agl)
 
 	result = cl_io_get(inode, &env, &io, &refcheck);
 	if (result > 0) {
-	again:
+again:
 		io->ci_verify_layout = 1;
 		result = cl_io_init(env, io, CIT_MISC, io->ci_obj);
 		if (result > 0)
-- 
1.9.0


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

* [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
  2014-06-17  5:43 ` [PATCH v6 1/8] staging: lustre: lclient: glimpse.c " Anil Belur
  2014-06-17  5:43 ` [PATCH v6 2/8] " Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17 16:15   ` Dilger, Andreas
  2014-06-17  5:43 ` [PATCH v6 4/8] staging: lustre: lclient: lcommon_cl.c " Anil Belur
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

fixed warning:
* WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count,
LOV_MAX_STRIPE_COUNT)

Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/lcommon_misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c
index 21de1cd..0900bef 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c
@@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
 	if (rc)
 		return rc;
 
-	stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT);
+	stripes = min_t(__u32, desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT);
 	lsm.lsm_stripe_count = stripes;
 	easize = obd_size_diskmd(dt_exp, &lsm);
 
-- 
1.9.0


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

* [PATCH v6 4/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
                   ` (2 preceding siblings ...)
  2014-06-17  5:43 ` [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c " Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17  5:43 ` [PATCH v6 5/8] " Anil Belur
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

fixed: WARNING: Missing a blank line after declarations
Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index 1b0c216..1f39219 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -126,6 +126,7 @@ void ccc_key_fini(const struct lu_context *ctx,
 			 struct lu_context_key *key, void *data)
 {
 	struct ccc_thread_info *info = data;
+
 	OBD_SLAB_FREE_PTR(info, ccc_thread_kmem);
 }
 
@@ -144,6 +145,7 @@ void ccc_session_key_fini(const struct lu_context *ctx,
 				 struct lu_context_key *key, void *data)
 {
 	struct ccc_session *session = data;
+
 	OBD_SLAB_FREE_PTR(session, ccc_session_kmem);
 }
 
@@ -572,6 +574,7 @@ void ccc_lock_delete(const struct lu_env *env,
 void ccc_lock_fini(const struct lu_env *env, struct cl_lock_slice *slice)
 {
 	struct ccc_lock *clk = cl2ccc_lock(slice);
+
 	OBD_SLAB_FREE_PTR(clk, ccc_lock_kmem);
 }
 
@@ -733,6 +736,7 @@ int ccc_io_one_lock(const struct lu_env *env, struct cl_io *io,
 		    loff_t start, loff_t end)
 {
 	struct cl_object *obj = io->ci_obj;
+
 	return ccc_io_one_lock_index(env, io, enqflags, mode,
 				     cl_index(obj, start), cl_index(obj, end));
 }
-- 
1.9.0


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

* [PATCH v6 5/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
                   ` (3 preceding siblings ...)
  2014-06-17  5:43 ` [PATCH v6 4/8] staging: lustre: lclient: lcommon_cl.c " Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17  5:43 ` [PATCH v6 6/8] " Anil Belur
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

fixed:  ERROR: do not initialise statics to 0 or NULL
Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index 1f39219..de0ad37e 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -266,7 +266,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev,
  * fails. Access to this environment is serialized by ccc_inode_fini_guard
  * mutex.
  */
-static struct lu_env *ccc_inode_fini_env = NULL;
+static struct lu_env *ccc_inode_fini_env;
 
 /**
  * A mutex serializing calls to slp_inode_fini() under extreme memory
-- 
1.9.0


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

* [PATCH v6 6/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
                   ` (4 preceding siblings ...)
  2014-06-17  5:43 ` [PATCH v6 5/8] " Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17  5:43 ` [PATCH v6 7/8] " Anil Belur
  2014-06-17  5:43 ` [PATCH v6 8/8] " Anil Belur
  7 siblings, 0 replies; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

fixed: ERROR: inline keyword should sit between storage class and type
Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index de0ad37e..2f51b76 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -1273,7 +1273,7 @@ struct lov_stripe_md *ccc_inode_lsm_get(struct inode *inode)
 	return lov_lsm_get(cl_i2info(inode)->lli_clob);
 }
 
-void inline ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm)
+inline void ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm)
 {
 	lov_lsm_put(cl_i2info(inode)->lli_clob, lsm);
 }
-- 
1.9.0


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

* [PATCH v6 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
                   ` (5 preceding siblings ...)
  2014-06-17  5:43 ` [PATCH v6 6/8] " Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17 16:23   ` Dilger, Andreas
  2014-06-17  5:43 ` [PATCH v6 8/8] " Anil Belur
  7 siblings, 1 reply; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

fixed: WARNING: line over 80 characters, used a new variable 'size_index' to
store the offset. Replaceed "unsigned long" with  "loff_t" type for
'cur_index'

Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index 2f51b76..e2da397 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -821,10 +821,11 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj,
 				 * linux-2.6.18-128.1.1 miss to do that.
 				 * --bug 17336 */
 				loff_t size = cl_isize_read(inode);
-				unsigned long cur_index = start >> PAGE_CACHE_SHIFT;
+				loff_t cur_index = start >> PAGE_CACHE_SHIFT;
+				loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT);
 
 				if ((size == 0 && cur_index != 0) ||
-				    (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index))
+				    (size_index < cur_index))
 				*exceed = 1;
 			}
 			return result;
-- 
1.9.0


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

* [PATCH v6 8/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
                   ` (6 preceding siblings ...)
  2014-06-17  5:43 ` [PATCH v6 7/8] " Anil Belur
@ 2014-06-17  5:43 ` Anil Belur
  2014-06-17 16:25   ` Dilger, Andreas
  7 siblings, 1 reply; 14+ messages in thread
From: Anil Belur @ 2014-06-17  5:43 UTC (permalink / raw)
  To: andreas.dilger, oleg.drokin, gregkh
  Cc: linux-kernel, hpdd-discuss, Anil Belur

From: Anil Belur <askb23@gmail.com>

fixed: WARNING: suspect code indent for conditional statements (32, 32)
Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index e2da397..3b2b995 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -825,8 +825,8 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj,
 				loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT);
 
 				if ((size == 0 && cur_index != 0) ||
-				    (size_index < cur_index))
-				*exceed = 1;
+						(size_index < cur_index))
+					*exceed = 1;
 			}
 			return result;
 		} else {
-- 
1.9.0


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

* Re: [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
  2014-06-17  5:43 ` [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c " Anil Belur
@ 2014-06-17 16:15   ` Dilger, Andreas
  2014-06-18  2:54     ` Anil Shashikumar Belur
  0 siblings, 1 reply; 14+ messages in thread
From: Dilger, Andreas @ 2014-06-17 16:15 UTC (permalink / raw)
  To: Anil Belur, Drokin, Oleg, gregkh; +Cc: linux-kernel, hpdd-discuss@lists.01.org

On 2014/06/16, 11:43 PM, "Anil Belur" <askb23@gmail.com> wrote:

>From: Anil Belur <askb23@gmail.com>
>
>fixed warning:
>* WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count,
>LOV_MAX_STRIPE_COUNT)
>
>Signed-off-by: Anil Belur <askb23@gmail.com>
>---
> drivers/staging/lustre/lustre/lclient/lcommon_misc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c
>b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c
>index 21de1cd..0900bef 100644
>--- a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c
>+++ b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c
>@@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct
>obd_export *dt_exp)
> 	if (rc)
> 		return rc;
> 
>-	stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT);
>+	stripes = min_t(__u32, desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT);

If you are using min_t(__u32, ...) then there is no need for the (__u32)
cast of
LOV_MAX_STRIPE_COUNT, since that is the whole point of min_t() that the
cast is
done internally.

> 	lsm.lsm_stripe_count = stripes;
> 	easize = obd_size_diskmd(dt_exp, &lsm);
> 
>-- 
>1.9.0
>
>


Cheers, Andreas
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division



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

* Re: [PATCH v6 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17  5:43 ` [PATCH v6 7/8] " Anil Belur
@ 2014-06-17 16:23   ` Dilger, Andreas
  2014-06-18  2:54     ` Anil Shashikumar Belur
  0 siblings, 1 reply; 14+ messages in thread
From: Dilger, Andreas @ 2014-06-17 16:23 UTC (permalink / raw)
  To: Anil Belur, Drokin, Oleg, gregkh; +Cc: linux-kernel, hpdd-discuss@lists.01.org

On 2014/06/16, 11:43 PM, "Anil Belur" <askb23@gmail.com> wrote:

>From: Anil Belur <askb23@gmail.com>
>
>fixed: WARNING: line over 80 characters, used a new variable 'size_index'
>to
>store the offset. Replaceed "unsigned long" with  "loff_t" type for
>'cur_index'
>
>Signed-off-by: Anil Belur <askb23@gmail.com>
>---
> drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>index 2f51b76..e2da397 100644
>--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>@@ -821,10 +821,11 @@ int ccc_prep_size(const struct lu_env *env, struct
>cl_object *obj,
> 				 * linux-2.6.18-128.1.1 miss to do that.
> 				 * --bug 17336 */
> 				loff_t size = cl_isize_read(inode);
>-				unsigned long cur_index = start >> PAGE_CACHE_SHIFT;
>+				loff_t cur_index = start >> PAGE_CACHE_SHIFT;
>+				loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT);

Should be an empty line between variable declarations and code.

> 
> 				if ((size == 0 && cur_index != 0) ||
>-				    (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index))
>+				    (size_index < cur_index))
> 				*exceed = 1;
> 			}
> 			return result;
>-- 
>1.9.0
>
>


Cheers, Andreas
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division



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

* Re: [PATCH v6 8/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17  5:43 ` [PATCH v6 8/8] " Anil Belur
@ 2014-06-17 16:25   ` Dilger, Andreas
  0 siblings, 0 replies; 14+ messages in thread
From: Dilger, Andreas @ 2014-06-17 16:25 UTC (permalink / raw)
  To: Anil Belur, Drokin, Oleg, gregkh; +Cc: linux-kernel, hpdd-discuss@lists.01.org

On 2014/06/16, 11:43 PM, "Anil Belur" <askb23@gmail.com> wrote:

>From: Anil Belur <askb23@gmail.com>
>
>fixed: WARNING: suspect code indent for conditional statements (32, 32)
>Signed-off-by: Anil Belur <askb23@gmail.com>
>---
> drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>index e2da397..3b2b995 100644
>--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
>@@ -825,8 +825,8 @@ int ccc_prep_size(const struct lu_env *env, struct
>cl_object *obj,
> 				loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT);
> 
> 				if ((size == 0 && cur_index != 0) ||
>-				    (size_index < cur_index))
>-				*exceed = 1;
>+						(size_index < cur_index))

The old indentation of this line (aligned after '(' on the previous line)
was better.  Note also that there is no need for parenthesis around this
statement.

>+					*exceed = 1;
> 			}
> 			return result;
> 		} else {
>-- 
>1.9.0
>
>


Cheers, Andreas
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division



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

* Re: [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
  2014-06-17 16:15   ` Dilger, Andreas
@ 2014-06-18  2:54     ` Anil Shashikumar Belur
  0 siblings, 0 replies; 14+ messages in thread
From: Anil Shashikumar Belur @ 2014-06-18  2:54 UTC (permalink / raw)
  To: Dilger, Andreas, Drokin, Oleg, gregkh
  Cc: linux-kernel, hpdd-discuss@lists.01.org

> If you are using min_t(__u32, ...) then there is no need for the
(__u32) cast of LOV_MAX_STRIPE_COUNT, since that is the whole point of
min_t() that the cast is done internally.

Agreed, it makes sense not to cast twice when using min_t().

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

* Re: [PATCH v6 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
  2014-06-17 16:23   ` Dilger, Andreas
@ 2014-06-18  2:54     ` Anil Shashikumar Belur
  0 siblings, 0 replies; 14+ messages in thread
From: Anil Shashikumar Belur @ 2014-06-18  2:54 UTC (permalink / raw)
  To: Dilger, Andreas, Drokin, Oleg, gregkh
  Cc: linux-kernel, hpdd-discuss@lists.01.org

> Should be an empty line between variable declarations and code.

Hi Andreas, not sure if you are referring to the same patch as there is
already an empty line present.

 823                                 loff_t size = cl_isize_read(inode);
 824                                 loff_t cur_index = start >>
PAGE_CACHE_SHIFT;
 825                                 loff_t size_index = ((size - 1) >>
PAGE_CACHE_SHIFT);
 826
 827                                 if ((size == 0 && cur_index != 0) ||

Cheers,
Anil

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

end of thread, other threads:[~2014-06-18  2:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-17  5:43 [PATCH v6] staging: lustre: lclient: fixing coding style issues Anil Belur
2014-06-17  5:43 ` [PATCH v6 1/8] staging: lustre: lclient: glimpse.c " Anil Belur
2014-06-17  5:43 ` [PATCH v6 2/8] " Anil Belur
2014-06-17  5:43 ` [PATCH v6 3/8] staging: lustre: lclient: lcommon_misc.c " Anil Belur
2014-06-17 16:15   ` Dilger, Andreas
2014-06-18  2:54     ` Anil Shashikumar Belur
2014-06-17  5:43 ` [PATCH v6 4/8] staging: lustre: lclient: lcommon_cl.c " Anil Belur
2014-06-17  5:43 ` [PATCH v6 5/8] " Anil Belur
2014-06-17  5:43 ` [PATCH v6 6/8] " Anil Belur
2014-06-17  5:43 ` [PATCH v6 7/8] " Anil Belur
2014-06-17 16:23   ` Dilger, Andreas
2014-06-18  2:54     ` Anil Shashikumar Belur
2014-06-17  5:43 ` [PATCH v6 8/8] " Anil Belur
2014-06-17 16:25   ` Dilger, Andreas

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