linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c
@ 2015-08-11 13:32 Swee Hua Law
  2015-08-11 13:32 ` [PATCH 1/3] staging: lustre: Do not init global to NULL Swee Hua Law
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Swee Hua Law @ 2015-08-11 13:32 UTC (permalink / raw)
  To: andreas.dilger, gregkh
  Cc: Julia.Lawall, hamohammed.sa, asaf.vertz, sweehua81, viro,
	HPDD-discuss, devel, linux-kernel

Fix 3 checkpatch problems in drivers/staging/lustre/lustre/llite/lloop.c
[PATCH 1/3] staging: lustre: Do not init global to NULL
[PATCH 2/3] staging: lustre: Add blank line after variable declaration
[PATCH 3/3] staging: lustre: Remove the space before \n

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

* [PATCH 1/3] staging: lustre: Do not init global to NULL
  2015-08-11 13:32 [PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c Swee Hua Law
@ 2015-08-11 13:32 ` Swee Hua Law
  2015-08-11 13:32 ` [PATCH 2/3] staging: lustre: Add blank line after variable declaration Swee Hua Law
  2015-08-11 13:32 ` [PATCH 3/3] staging: lustre: Remove the space before \n Swee Hua Law
  2 siblings, 0 replies; 7+ messages in thread
From: Swee Hua Law @ 2015-08-11 13:32 UTC (permalink / raw)
  To: andreas.dilger, gregkh
  Cc: Julia.Lawall, hamohammed.sa, asaf.vertz, sweehua81, viro,
	HPDD-discuss, devel, linux-kernel

Remove "= NULL" in global variable

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
---
 drivers/staging/lustre/lustre/llite/lloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index d614234..b643f11 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -162,7 +162,7 @@ static int max_loop = MAX_LOOP_DEFAULT;
 static struct lloop_device *loop_dev;
 static struct gendisk **disks;
 static struct mutex lloop_mutex;
-static void *ll_iocontrol_magic = NULL;
+static void *ll_iocontrol_magic;
 
 static loff_t get_loop_size(struct lloop_device *lo, struct file *file)
 {
-- 
2.1.4


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

* [PATCH 2/3] staging: lustre: Add blank line after variable declaration
  2015-08-11 13:32 [PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c Swee Hua Law
  2015-08-11 13:32 ` [PATCH 1/3] staging: lustre: Do not init global to NULL Swee Hua Law
@ 2015-08-11 13:32 ` Swee Hua Law
  2015-08-12  5:00   ` Sudip Mukherjee
  2015-08-11 13:32 ` [PATCH 3/3] staging: lustre: Remove the space before \n Swee Hua Law
  2 siblings, 1 reply; 7+ messages in thread
From: Swee Hua Law @ 2015-08-11 13:32 UTC (permalink / raw)
  To: andreas.dilger, gregkh
  Cc: Julia.Lawall, hamohammed.sa, asaf.vertz, sweehua81, viro,
	HPDD-discuss, devel, linux-kernel

Add blank line after variable declaration

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
---
 drivers/staging/lustre/lustre/llite/lloop.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index b643f11..de5eaa0 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -372,9 +372,11 @@ err:
 static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
 {
 	int ret;
+
 	ret = do_bio_lustrebacked(lo, bio);
 	while (bio) {
 		struct bio *tmp = bio->bi_next;
+
 		bio->bi_next = NULL;
 		bio_endio(bio);
 		bio = tmp;
@@ -427,6 +429,7 @@ static int loop_thread(void *data)
 		wait_event(lo->lo_bh_wait, loop_active(lo));
 		if (!atomic_read(&lo->lo_pending)) {
 			int exiting = 0;
+
 			spin_lock_irq(&lo->lo_lock);
 			exiting = (lo->lo_state == LLOOP_RUNDOWN);
 			spin_unlock_irq(&lo->lo_lock);
-- 
2.1.4


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

* [PATCH 3/3] staging: lustre: Remove the space before \n
  2015-08-11 13:32 [PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c Swee Hua Law
  2015-08-11 13:32 ` [PATCH 1/3] staging: lustre: Do not init global to NULL Swee Hua Law
  2015-08-11 13:32 ` [PATCH 2/3] staging: lustre: Add blank line after variable declaration Swee Hua Law
@ 2015-08-11 13:32 ` Swee Hua Law
  2015-08-11 14:00   ` Joe Perches
  2 siblings, 1 reply; 7+ messages in thread
From: Swee Hua Law @ 2015-08-11 13:32 UTC (permalink / raw)
  To: andreas.dilger, gregkh
  Cc: Julia.Lawall, hamohammed.sa, asaf.vertz, sweehua81, viro,
	HPDD-discuss, devel, linux-kernel

Remove the extra space character right before \n in the string

Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
---
 drivers/staging/lustre/lustre/llite/lloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index de5eaa0..ee28457 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -308,7 +308,7 @@ static unsigned int loop_get_bio(struct lloop_device *lo, struct bio **req)
 	rw = first->bi_rw;
 	bio = &lo->lo_bio;
 	while (*bio && (*bio)->bi_rw == rw) {
-		CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u \n",
+		CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u\n",
 		       (unsigned long long)(*bio)->bi_iter.bi_sector,
 		       (*bio)->bi_iter.bi_size,
 		       page_count, (*bio)->bi_vcnt);
-- 
2.1.4


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

* Re: [PATCH 3/3] staging: lustre: Remove the space before \n
  2015-08-11 13:32 ` [PATCH 3/3] staging: lustre: Remove the space before \n Swee Hua Law
@ 2015-08-11 14:00   ` Joe Perches
  0 siblings, 0 replies; 7+ messages in thread
From: Joe Perches @ 2015-08-11 14:00 UTC (permalink / raw)
  To: Swee Hua Law
  Cc: andreas.dilger, gregkh, Julia.Lawall, hamohammed.sa, asaf.vertz,
	viro, HPDD-discuss, devel, linux-kernel

On Tue, 2015-08-11 at 21:32 +0800, Swee Hua Law wrote:
> Remove the extra space character right before \n in the string
[]
> diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
[]
> @@ -308,7 +308,7 @@ static unsigned int loop_get_bio(struct lloop_device *lo, struct bio **req)
>  	rw = first->bi_rw;
>  	bio = &lo->lo_bio;
>  	while (*bio && (*bio)->bi_rw == rw) {
> -		CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u \n",
> +		CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u\n",

More likely the space is misplaced and it should be:
		CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt %u\n"


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

* Re: [PATCH 2/3] staging: lustre: Add blank line after variable declaration
  2015-08-11 13:32 ` [PATCH 2/3] staging: lustre: Add blank line after variable declaration Swee Hua Law
@ 2015-08-12  5:00   ` Sudip Mukherjee
  2015-08-12  6:31     ` Joe Perches
  0 siblings, 1 reply; 7+ messages in thread
From: Sudip Mukherjee @ 2015-08-12  5:00 UTC (permalink / raw)
  To: Swee Hua Law
  Cc: andreas.dilger, gregkh, devel, hamohammed.sa, linux-kernel,
	HPDD-discuss, Julia.Lawall, viro

On Tue, Aug 11, 2015 at 09:32:30PM +0800, Swee Hua Law wrote:
> Add blank line after variable declaration
> 
> Signed-off-by: Swee Hua Law <sweehua81@gmail.com>
> ---
>  drivers/staging/lustre/lustre/llite/lloop.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
> index b643f11..de5eaa0 100644
> --- a/drivers/staging/lustre/lustre/llite/lloop.c
> +++ b/drivers/staging/lustre/lustre/llite/lloop.c
> @@ -372,9 +372,11 @@ err:
>  static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
>  {
>  	int ret;
> +
>  	ret = do_bio_lustrebacked(lo, bio);
>  	while (bio) {
>  		struct bio *tmp = bio->bi_next;
> +
>  		bio->bi_next = NULL;
>  		bio_endio(bio);
This patch will not apply. I am not sure how your tree got
bio_endio(bio) but in the staging tree this line is bio_endio(bio, ret);

regards
sudip	

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

* Re: [PATCH 2/3] staging: lustre: Add blank line after variable declaration
  2015-08-12  5:00   ` Sudip Mukherjee
@ 2015-08-12  6:31     ` Joe Perches
  0 siblings, 0 replies; 7+ messages in thread
From: Joe Perches @ 2015-08-12  6:31 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Swee Hua Law, andreas.dilger, gregkh, devel, hamohammed.sa,
	linux-kernel, HPDD-discuss, Julia.Lawall, viro

On Wed, 2015-08-12 at 10:30 +0530, Sudip Mukherjee wrote:
> On Tue, Aug 11, 2015 at 09:32:30PM +0800, Swee Hua Law wrote:
> > Add blank line after variable declaration
[]
> > diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
[]
> > @@ -372,9 +372,11 @@ err:
> >  static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
> >  {
> >  	int ret;
> > +
> >  	ret = do_bio_lustrebacked(lo, bio);
> >  	while (bio) {
> >  		struct bio *tmp = bio->bi_next;
> > +
> >  		bio->bi_next = NULL;
> >  		bio_endio(bio);
> This patch will not apply. I am not sure how your tree got
> bio_endio(bio) but in the staging tree this line is bio_endio(bio, ret);

And besides that, why do only this file/location?

There are several hundred possible in lustre.

Using:

$ git ls-files -- "drivers/staging/lustre/*.[ch]" | \
  xargs ./scripts/checkpatch.pl -f --fix-inplace --types=line_spacing

would fix just about all of them.

$ git diff --shortstat drivers/staging/lustre/
 172 files changed, 267 insertions(+), 316 deletions(-)



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

end of thread, other threads:[~2015-08-12  6:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11 13:32 [PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c Swee Hua Law
2015-08-11 13:32 ` [PATCH 1/3] staging: lustre: Do not init global to NULL Swee Hua Law
2015-08-11 13:32 ` [PATCH 2/3] staging: lustre: Add blank line after variable declaration Swee Hua Law
2015-08-12  5:00   ` Sudip Mukherjee
2015-08-12  6:31     ` Joe Perches
2015-08-11 13:32 ` [PATCH 3/3] staging: lustre: Remove the space before \n Swee Hua Law
2015-08-11 14:00   ` Joe Perches

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