All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Outreachy kernel] [PATCH] Stagin: lustre: lustre: obdecho: Remove space after the name of that function
  2015-02-27 19:08 Hatice ERTÜRK
@ 2015-02-27 22:42 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2015-02-27 22:42 UTC (permalink / raw)
  To: Hatice ERTÜRK; +Cc: outreachy-kernel

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

On Fri, 27 Feb 2015, Hatice ERTÜRK wrote:

> Fix checkpatch.pl issues with "space prohibited between function name
> and open parenthesis" in echo_client.c

Try torewrite the commit message without using fix, to say what you
actually did.

julia

>
> Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
> ---
>  .../staging/lustre/lustre/obdecho/echo_client.c    | 46 +++++++++++-----------
>  1 file changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
> index 5f6d944..5441de9 100644
> --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
> +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
> @@ -195,22 +195,22 @@ static struct lu_kmem_descr echo_caches[] = {
>  	{
>  		.ckd_cache = &echo_lock_kmem,
>  		.ckd_name  = "echo_lock_kmem",
> -		.ckd_size  = sizeof (struct echo_lock)
> +		.ckd_size  = sizeof(struct echo_lock)
>  	},
>  	{
>  		.ckd_cache = &echo_object_kmem,
>  		.ckd_name  = "echo_object_kmem",
> -		.ckd_size  = sizeof (struct echo_object)
> +		.ckd_size  = sizeof(struct echo_object)
>  	},
>  	{
>  		.ckd_cache = &echo_thread_kmem,
>  		.ckd_name  = "echo_thread_kmem",
> -		.ckd_size  = sizeof (struct echo_thread_info)
> +		.ckd_size  = sizeof(struct echo_thread_info)
>  	},
>  	{
>  		.ckd_cache = &echo_session_kmem,
>  		.ckd_name  = "echo_session_kmem",
> -		.ckd_size  = sizeof (struct echo_session_info)
> +		.ckd_size  = sizeof(struct echo_session_info)
>  	},
>  	{
>  		.ckd_cache = NULL
> @@ -1106,8 +1106,8 @@ static int cl_echo_cancel0(struct lu_env *env, struct echo_device *ed,
>
>  	LASSERT(ec != NULL);
>  	spin_lock(&ec->ec_lock);
> -	list_for_each (el, &ec->ec_locks) {
> -		ecl = list_entry (el, struct echo_lock, el_chain);
> +	list_for_each(el, &ec->ec_locks) {
> +		ecl = list_entry(el, struct echo_lock, el_chain);
>  		CDEBUG(D_INFO, "ecl: %p, cookie: %#llx\n", ecl, ecl->el_cookie);
>  		found = (ecl->el_cookie == cookie);
>  		if (found) {
> @@ -1257,20 +1257,20 @@ out:
>  static u64 last_object_id;
>
>  static int
> -echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
> +echo_copyout_lsm(struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
>  {
>  	struct lov_stripe_md *ulsm = _ulsm;
>  	int nob, i;
>
> -	nob = offsetof (struct lov_stripe_md, lsm_oinfo[lsm->lsm_stripe_count]);
> +	nob = offsetof(struct lov_stripe_md, lsm_oinfo[lsm->lsm_stripe_count]);
>  	if (nob > ulsm_nob)
>  		return -EINVAL;
>
> -	if (copy_to_user (ulsm, lsm, sizeof(*ulsm)))
> +	if (copy_to_user(ulsm, lsm, sizeof(*ulsm)))
>  		return -EFAULT;
>
>  	for (i = 0; i < lsm->lsm_stripe_count; i++) {
> -		if (copy_to_user (ulsm->lsm_oinfo[i], lsm->lsm_oinfo[i],
> +		if (copy_to_user(ulsm->lsm_oinfo[i], lsm->lsm_oinfo[i],
>  				      sizeof(lsm->lsm_oinfo[0])))
>  			return -EFAULT;
>  	}
> @@ -1278,16 +1278,16 @@ echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
>  }
>
>  static int
> -echo_copyin_lsm (struct echo_device *ed, struct lov_stripe_md *lsm,
> +echo_copyin_lsm(struct echo_device *ed, struct lov_stripe_md *lsm,
>  		 void *ulsm, int ulsm_nob)
>  {
>  	struct echo_client_obd *ec = ed->ed_ec;
>  	int		     i;
>
> -	if (ulsm_nob < sizeof (*lsm))
> +	if (ulsm_nob < sizeof(*lsm))
>  		return -EINVAL;
>
> -	if (copy_from_user (lsm, ulsm, sizeof (*lsm)))
> +	if (copy_from_user(lsm, ulsm, sizeof(*lsm)))
>  		return -EFAULT;
>
>  	if (lsm->lsm_stripe_count > ec->ec_nstripes ||
> @@ -1320,7 +1320,7 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
>  	if ((oa->o_valid & OBD_MD_FLID) == 0 && /* no obj id */
>  	    (on_target ||		       /* set_stripe */
>  	     ec->ec_nstripes != 0)) {	   /* LOV */
> -		CERROR ("No valid oid\n");
> +		CERROR("No valid oid\n");
>  		return -EINVAL;
>  	}
>
> @@ -1333,7 +1333,7 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
>  	if (ulsm != NULL) {
>  		int i, idx;
>
> -		rc = echo_copyin_lsm (ed, lsm, ulsm, ulsm_nob);
> +		rc = echo_copyin_lsm(ed, lsm, ulsm, ulsm_nob);
>  		if (rc != 0)
>  			goto failed;
>
> @@ -1409,7 +1409,7 @@ static int echo_get_object(struct echo_object **ecop, struct echo_device *ed,
>
>  	if ((oa->o_valid & OBD_MD_FLID) == 0 || ostid_id(&oa->o_oi) == 0) {
>  		/* disallow use of object id 0 */
> -		CERROR ("No valid oid\n");
> +		CERROR("No valid oid\n");
>  		return -EINVAL;
>  	}
>
> @@ -1459,7 +1459,7 @@ echo_get_stripe_off_id(struct lov_stripe_md *lsm, u64 *offp, u64 *idp)
>  	width = stripe_size * stripe_count;
>
>  	/* woffset = offset within a width; offset = whole number of widths */
> -	woffset = do_div (offset, width);
> +	woffset = do_div(offset, width);
>
>  	stripe_index = woffset / stripe_size;
>
> @@ -1517,13 +1517,13 @@ static int echo_client_page_debug_check(struct lov_stripe_md *lsm,
>  	for (rc = delta = 0; delta < PAGE_CACHE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
>  		stripe_off = offset + delta;
>  		stripe_id = id;
> -		echo_get_stripe_off_id (lsm, &stripe_off, &stripe_id);
> +		echo_get_stripe_off_id(lsm, &stripe_off, &stripe_id);
>
>  		rc2 = block_debug_check("test_brw",
>  					addr + delta, OBD_ECHO_BLOCK_SIZE,
>  					stripe_off, stripe_id);
>  		if (rc2 != 0) {
> -			CERROR ("Error in echo object %#llx\n", id);
> +			CERROR("Error in echo object %#llx\n", id);
>  			rc = rc2;
>  		}
>  	}
> @@ -1583,7 +1583,7 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa,
>  	     i < npages;
>  	     i++, pgp++, off += PAGE_CACHE_SIZE) {
>
> -		LASSERT (pgp->pg == NULL);      /* for cleanup */
> +		LASSERT(pgp->pg == NULL);      /* for cleanup */
>
>  		rc = -ENOMEM;
>  		OBD_PAGE_ALLOC(pgp->pg, gfp_mask);
> @@ -1992,7 +1992,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
>  		goto out;
>
>  	default:
> -		CERROR ("echo_ioctl(): unrecognised ioctl %#x\n", cmd);
> +		CERROR("echo_ioctl(): unrecognised ioctl %#x\n", cmd);
>  		rc = -ENOTTY;
>  		goto out;
>  	}
> @@ -2034,8 +2034,8 @@ static int echo_client_setup(const struct lu_env *env,
>  	}
>
>  	spin_lock_init(&ec->ec_lock);
> -	INIT_LIST_HEAD (&ec->ec_objects);
> -	INIT_LIST_HEAD (&ec->ec_locks);
> +	INIT_LIST_HEAD(&ec->ec_objects);
> +	INIT_LIST_HEAD(&ec->ec_locks);
>  	ec->ec_unique = 0;
>  	ec->ec_nstripes = 0;
>
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425064120-14808-1-git-send-email-haticeerturk27%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

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

* [PATCH] Stagin: lustre: lustre: obdecho: Remove space after the name of that function
@ 2015-02-28 13:16 Hatice ERTÜRK
  2015-03-02  0:32 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Hatice ERTÜRK @ 2015-02-28 13:16 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Hatice ERTURK

Function names must be adjacent to the parenthesis opened after.That's why remove space after the name of that function.

This Warning found with checkpatch.pl

Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
---
v2:
 Changed commit message.
---
 .../staging/lustre/lustre/obdecho/echo_client.c    | 46 +++++++++++-----------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index 5f6d944..5441de9 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -195,22 +195,22 @@ static struct lu_kmem_descr echo_caches[] = {
 	{
 		.ckd_cache = &echo_lock_kmem,
 		.ckd_name  = "echo_lock_kmem",
-		.ckd_size  = sizeof (struct echo_lock)
+		.ckd_size  = sizeof(struct echo_lock)
 	},
 	{
 		.ckd_cache = &echo_object_kmem,
 		.ckd_name  = "echo_object_kmem",
-		.ckd_size  = sizeof (struct echo_object)
+		.ckd_size  = sizeof(struct echo_object)
 	},
 	{
 		.ckd_cache = &echo_thread_kmem,
 		.ckd_name  = "echo_thread_kmem",
-		.ckd_size  = sizeof (struct echo_thread_info)
+		.ckd_size  = sizeof(struct echo_thread_info)
 	},
 	{
 		.ckd_cache = &echo_session_kmem,
 		.ckd_name  = "echo_session_kmem",
-		.ckd_size  = sizeof (struct echo_session_info)
+		.ckd_size  = sizeof(struct echo_session_info)
 	},
 	{
 		.ckd_cache = NULL
@@ -1106,8 +1106,8 @@ static int cl_echo_cancel0(struct lu_env *env, struct echo_device *ed,
 
 	LASSERT(ec != NULL);
 	spin_lock(&ec->ec_lock);
-	list_for_each (el, &ec->ec_locks) {
-		ecl = list_entry (el, struct echo_lock, el_chain);
+	list_for_each(el, &ec->ec_locks) {
+		ecl = list_entry(el, struct echo_lock, el_chain);
 		CDEBUG(D_INFO, "ecl: %p, cookie: %#llx\n", ecl, ecl->el_cookie);
 		found = (ecl->el_cookie == cookie);
 		if (found) {
@@ -1257,20 +1257,20 @@ out:
 static u64 last_object_id;
 
 static int
-echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
+echo_copyout_lsm(struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
 {
 	struct lov_stripe_md *ulsm = _ulsm;
 	int nob, i;
 
-	nob = offsetof (struct lov_stripe_md, lsm_oinfo[lsm->lsm_stripe_count]);
+	nob = offsetof(struct lov_stripe_md, lsm_oinfo[lsm->lsm_stripe_count]);
 	if (nob > ulsm_nob)
 		return -EINVAL;
 
-	if (copy_to_user (ulsm, lsm, sizeof(*ulsm)))
+	if (copy_to_user(ulsm, lsm, sizeof(*ulsm)))
 		return -EFAULT;
 
 	for (i = 0; i < lsm->lsm_stripe_count; i++) {
-		if (copy_to_user (ulsm->lsm_oinfo[i], lsm->lsm_oinfo[i],
+		if (copy_to_user(ulsm->lsm_oinfo[i], lsm->lsm_oinfo[i],
 				      sizeof(lsm->lsm_oinfo[0])))
 			return -EFAULT;
 	}
@@ -1278,16 +1278,16 @@ echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
 }
 
 static int
-echo_copyin_lsm (struct echo_device *ed, struct lov_stripe_md *lsm,
+echo_copyin_lsm(struct echo_device *ed, struct lov_stripe_md *lsm,
 		 void *ulsm, int ulsm_nob)
 {
 	struct echo_client_obd *ec = ed->ed_ec;
 	int		     i;
 
-	if (ulsm_nob < sizeof (*lsm))
+	if (ulsm_nob < sizeof(*lsm))
 		return -EINVAL;
 
-	if (copy_from_user (lsm, ulsm, sizeof (*lsm)))
+	if (copy_from_user(lsm, ulsm, sizeof(*lsm)))
 		return -EFAULT;
 
 	if (lsm->lsm_stripe_count > ec->ec_nstripes ||
@@ -1320,7 +1320,7 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
 	if ((oa->o_valid & OBD_MD_FLID) == 0 && /* no obj id */
 	    (on_target ||		       /* set_stripe */
 	     ec->ec_nstripes != 0)) {	   /* LOV */
-		CERROR ("No valid oid\n");
+		CERROR("No valid oid\n");
 		return -EINVAL;
 	}
 
@@ -1333,7 +1333,7 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
 	if (ulsm != NULL) {
 		int i, idx;
 
-		rc = echo_copyin_lsm (ed, lsm, ulsm, ulsm_nob);
+		rc = echo_copyin_lsm(ed, lsm, ulsm, ulsm_nob);
 		if (rc != 0)
 			goto failed;
 
@@ -1409,7 +1409,7 @@ static int echo_get_object(struct echo_object **ecop, struct echo_device *ed,
 
 	if ((oa->o_valid & OBD_MD_FLID) == 0 || ostid_id(&oa->o_oi) == 0) {
 		/* disallow use of object id 0 */
-		CERROR ("No valid oid\n");
+		CERROR("No valid oid\n");
 		return -EINVAL;
 	}
 
@@ -1459,7 +1459,7 @@ echo_get_stripe_off_id(struct lov_stripe_md *lsm, u64 *offp, u64 *idp)
 	width = stripe_size * stripe_count;
 
 	/* woffset = offset within a width; offset = whole number of widths */
-	woffset = do_div (offset, width);
+	woffset = do_div(offset, width);
 
 	stripe_index = woffset / stripe_size;
 
@@ -1517,13 +1517,13 @@ static int echo_client_page_debug_check(struct lov_stripe_md *lsm,
 	for (rc = delta = 0; delta < PAGE_CACHE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
 		stripe_off = offset + delta;
 		stripe_id = id;
-		echo_get_stripe_off_id (lsm, &stripe_off, &stripe_id);
+		echo_get_stripe_off_id(lsm, &stripe_off, &stripe_id);
 
 		rc2 = block_debug_check("test_brw",
 					addr + delta, OBD_ECHO_BLOCK_SIZE,
 					stripe_off, stripe_id);
 		if (rc2 != 0) {
-			CERROR ("Error in echo object %#llx\n", id);
+			CERROR("Error in echo object %#llx\n", id);
 			rc = rc2;
 		}
 	}
@@ -1583,7 +1583,7 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa,
 	     i < npages;
 	     i++, pgp++, off += PAGE_CACHE_SIZE) {
 
-		LASSERT (pgp->pg == NULL);      /* for cleanup */
+		LASSERT(pgp->pg == NULL);      /* for cleanup */
 
 		rc = -ENOMEM;
 		OBD_PAGE_ALLOC(pgp->pg, gfp_mask);
@@ -1992,7 +1992,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 		goto out;
 
 	default:
-		CERROR ("echo_ioctl(): unrecognised ioctl %#x\n", cmd);
+		CERROR("echo_ioctl(): unrecognised ioctl %#x\n", cmd);
 		rc = -ENOTTY;
 		goto out;
 	}
@@ -2034,8 +2034,8 @@ static int echo_client_setup(const struct lu_env *env,
 	}
 
 	spin_lock_init(&ec->ec_lock);
-	INIT_LIST_HEAD (&ec->ec_objects);
-	INIT_LIST_HEAD (&ec->ec_locks);
+	INIT_LIST_HEAD(&ec->ec_objects);
+	INIT_LIST_HEAD(&ec->ec_locks);
 	ec->ec_unique = 0;
 	ec->ec_nstripes = 0;
 
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Stagin: lustre: lustre: obdecho: Remove space after the name of that function
  2015-02-28 13:16 [PATCH] Stagin: lustre: lustre: obdecho: Remove space after the name of that function Hatice ERTÜRK
@ 2015-03-02  0:32 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2015-03-02  0:32 UTC (permalink / raw)
  To: Hatice ERTÜRK; +Cc: outreachy-kernel

On Sat, Feb 28, 2015 at 03:16:04PM +0200, Hatice ERT�RK wrote:
> Function names must be adjacent to the parenthesis opened after.That's why remove space after the name of that function.

Please properly wrap changelog lines at 72 columns.

thanks,

greg k-h


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

end of thread, other threads:[~2015-03-02  0:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-28 13:16 [PATCH] Stagin: lustre: lustre: obdecho: Remove space after the name of that function Hatice ERTÜRK
2015-03-02  0:32 ` [Outreachy kernel] " Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2015-02-27 19:08 Hatice ERTÜRK
2015-02-27 22:42 ` [Outreachy kernel] " Julia Lawall

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.