Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205140 > unrolled thread

[PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c

Started bySwee Hua Law <sweehua81@gmail.com>
First post2015-08-11 15:40 +0200
Last post2015-08-11 15:40 +0200
Articles 7 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c   Swee Hua Law <sweehua81@gmail.com> - 2015-08-11 15:40 +0200
    [PATCH 3/3] staging: lustre: Remove the space before \n Swee Hua Law <sweehua81@gmail.com> - 2015-08-11 15:40 +0200
      Re: [PATCH 3/3] staging: lustre: Remove the space before \n Joe Perches <joe@perches.com> - 2015-08-11 16:10 +0200
    [PATCH 2/3] staging: lustre: Add blank line after variable declaration Swee Hua Law <sweehua81@gmail.com> - 2015-08-11 15:40 +0200
      Re: [PATCH 2/3] staging: lustre: Add blank line after variable  declaration Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-12 07:10 +0200
        Re: [PATCH 2/3] staging: lustre: Add blank line after variable  declaration Joe Perches <joe@perches.com> - 2015-08-12 08:40 +0200
    [PATCH 1/3] staging: lustre: Do not init global to NULL Swee Hua Law <sweehua81@gmail.com> - 2015-08-11 15:40 +0200

#1205140 — [PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c

FromSwee Hua Law <sweehua81@gmail.com>
Date2015-08-11 15:40 +0200
Subject[PATCH 0/3] staging: lustre: fix checkpatch problems in llite/lloop.c
Message-ID<pWhWz-6y2-19@gated-at.bofh.it>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1205142 — [PATCH 3/3] staging: lustre: Remove the space before \n

FromSwee Hua Law <sweehua81@gmail.com>
Date2015-08-11 15:40 +0200
Subject[PATCH 3/3] staging: lustre: Remove the space before \n
Message-ID<pWhWA-6y2-21@gated-at.bofh.it>
In reply to#1205140
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1205164 — Re: [PATCH 3/3] staging: lustre: Remove the space before \n

FromJoe Perches <joe@perches.com>
Date2015-08-11 16:10 +0200
SubjectRe: [PATCH 3/3] staging: lustre: Remove the space before \n
Message-ID<pWipA-7l6-23@gated-at.bofh.it>
In reply to#1205142
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"

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1205143 — [PATCH 2/3] staging: lustre: Add blank line after variable declaration

FromSwee Hua Law <sweehua81@gmail.com>
Date2015-08-11 15:40 +0200
Subject[PATCH 2/3] staging: lustre: Add blank line after variable declaration
Message-ID<pWhWA-6y2-23@gated-at.bofh.it>
In reply to#1205140
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1205587 — Re: [PATCH 2/3] staging: lustre: Add blank line after variable declaration

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-08-12 07:10 +0200
SubjectRe: [PATCH 2/3] staging: lustre: Add blank line after variable declaration
Message-ID<pWwsx-2Cs-5@gated-at.bofh.it>
In reply to#1205143
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	
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1205612 — Re: [PATCH 2/3] staging: lustre: Add blank line after variable declaration

FromJoe Perches <joe@perches.com>
Date2015-08-12 08:40 +0200
SubjectRe: [PATCH 2/3] staging: lustre: Add blank line after variable declaration
Message-ID<pWxRD-4MB-1@gated-at.bofh.it>
In reply to#1205587
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(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1205145 — [PATCH 1/3] staging: lustre: Do not init global to NULL

FromSwee Hua Law <sweehua81@gmail.com>
Date2015-08-11 15:40 +0200
Subject[PATCH 1/3] staging: lustre: Do not init global to NULL
Message-ID<pWhWA-6y2-25@gated-at.bofh.it>
In reply to#1205140
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web