linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues
@ 2021-05-20 12:55 Lee Jones
  2021-05-27  3:11 ` riteshh
  2021-07-22 11:35 ` Lee Jones
  0 siblings, 2 replies; 6+ messages in thread
From: Lee Jones @ 2021-05-20 12:55 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Theodore Ts'o, Andreas Dilger, Remy Card,
	David S. Miller, linux-ext4

Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Remy Card <card@masi.ibp.fr>
Cc: "David S. Miller" <davem@caip.rutgers.edu>
Cc: linux-ext4@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 fs/ext4/namei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index afb9d05a99bae..7e780cf311c5a 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1899,7 +1899,7 @@ static struct ext4_dir_entry_2 *dx_pack_dirents(struct inode *dir, char *base,
  * Returns pointer to de in block into which the new entry will be inserted.
  */
 static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
-			struct buffer_head **bh,struct dx_frame *frame,
+			struct buffer_head **bh, struct dx_frame *frame,
 			struct dx_hash_info *hinfo)
 {
 	unsigned blocksize = dir->i_sb->s_blocksize;
@@ -2246,7 +2246,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
 	if (retval)
 		goto out_frames;
 
-	de = do_split(handle,dir, &bh2, frame, &fname->hinfo);
+	de = do_split(handle, dir, &bh2, frame, &fname->hinfo);
 	if (IS_ERR(de)) {
 		retval = PTR_ERR(de);
 		goto out_frames;
-- 
2.31.1


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

* Re: [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues
  2021-05-20 12:55 [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues Lee Jones
@ 2021-05-27  3:11 ` riteshh
  2021-05-27  8:23   ` Lee Jones
  2021-07-22 11:35 ` Lee Jones
  1 sibling, 1 reply; 6+ messages in thread
From: riteshh @ 2021-05-27  3:11 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Theodore Ts'o, Andreas Dilger, Remy Card,
	David S. Miller, linux-ext4

On 21/05/20 01:55PM, Lee Jones wrote:

Hi Lee,

Thanks for your patch. I see we could a little better here.
There are several other checkpatch ERROR msgs in this file.
Care to fix all of those ERRORS within the same patch itself?

./scripts/checkpatch.pl -f fs/ext4/namei.c | sed -n '/ERROR/,/^$/p'

e.g. to list a few of them -
ERROR: do not use assignment in if condition
#1605: FILE: fs/ext4/namei.c:1605:
+               if ((bh = bh_use[ra_ptr++]) == NULL)

ERROR: space required after that ',' (ctx:VxV)
#1902: FILE: fs/ext4/namei.c:1902:
+                       struct buffer_head **bh,struct dx_frame *frame,
                                               ^

ERROR: space required after that ',' (ctx:VxV)
#2249: FILE: fs/ext4/namei.c:2249:
+       de = do_split(handle,dir, &bh2, frame, &fname->hinfo);
                            ^

ERROR: spaces required around that '=' (ctx:VxV)
#2288: FILE: fs/ext4/namei.c:2288:
+       int     dx_fallback=0;

-ritesh

> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> Cc: Remy Card <card@masi.ibp.fr>
> Cc: "David S. Miller" <davem@caip.rutgers.edu>
> Cc: linux-ext4@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  fs/ext4/namei.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index afb9d05a99bae..7e780cf311c5a 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -1899,7 +1899,7 @@ static struct ext4_dir_entry_2 *dx_pack_dirents(struct inode *dir, char *base,
>   * Returns pointer to de in block into which the new entry will be inserted.
>   */
>  static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
> -			struct buffer_head **bh,struct dx_frame *frame,
> +			struct buffer_head **bh, struct dx_frame *frame,
>  			struct dx_hash_info *hinfo)
>  {
>  	unsigned blocksize = dir->i_sb->s_blocksize;
> @@ -2246,7 +2246,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
>  	if (retval)
>  		goto out_frames;
>
> -	de = do_split(handle,dir, &bh2, frame, &fname->hinfo);
> +	de = do_split(handle, dir, &bh2, frame, &fname->hinfo);
>  	if (IS_ERR(de)) {
>  		retval = PTR_ERR(de);
>  		goto out_frames;
> --
> 2.31.1
>

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

* Re: [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues
  2021-05-27  3:11 ` riteshh
@ 2021-05-27  8:23   ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-05-27  8:23 UTC (permalink / raw)
  To: riteshh
  Cc: linux-kernel, Theodore Ts'o, Andreas Dilger, Remy Card,
	David S. Miller, linux-ext4

On Thu, 27 May 2021, riteshh wrote:

> On 21/05/20 01:55PM, Lee Jones wrote:
> 
> Hi Lee,
> 
> Thanks for your patch. I see we could a little better here.
> There are several other checkpatch ERROR msgs in this file.
> Care to fix all of those ERRORS within the same patch itself?

I don't think it's a good idea to mix functionality within a single
patch.  However, I would be happy to provide a follow-up solving these
issues for you.

> ./scripts/checkpatch.pl -f fs/ext4/namei.c | sed -n '/ERROR/,/^$/p'
> 
> e.g. to list a few of them -
> ERROR: do not use assignment in if condition
> #1605: FILE: fs/ext4/namei.c:1605:
> +               if ((bh = bh_use[ra_ptr++]) == NULL)
> 
> ERROR: space required after that ',' (ctx:VxV)
> #1902: FILE: fs/ext4/namei.c:1902:
> +                       struct buffer_head **bh,struct dx_frame *frame,
>                                                ^
> 
> ERROR: space required after that ',' (ctx:VxV)
> #2249: FILE: fs/ext4/namei.c:2249:
> +       de = do_split(handle,dir, &bh2, frame, &fname->hinfo);
>                             ^
> 
> ERROR: spaces required around that '=' (ctx:VxV)
> #2288: FILE: fs/ext4/namei.c:2288:
> +       int     dx_fallback=0;
> 
> -ritesh
> 
> > Cc: "Theodore Ts'o" <tytso@mit.edu>
> > Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> > Cc: Remy Card <card@masi.ibp.fr>
> > Cc: "David S. Miller" <davem@caip.rutgers.edu>
> > Cc: linux-ext4@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  fs/ext4/namei.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> > index afb9d05a99bae..7e780cf311c5a 100644
> > --- a/fs/ext4/namei.c
> > +++ b/fs/ext4/namei.c
> > @@ -1899,7 +1899,7 @@ static struct ext4_dir_entry_2 *dx_pack_dirents(struct inode *dir, char *base,
> >   * Returns pointer to de in block into which the new entry will be inserted.
> >   */
> >  static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
> > -			struct buffer_head **bh,struct dx_frame *frame,
> > +			struct buffer_head **bh, struct dx_frame *frame,
> >  			struct dx_hash_info *hinfo)
> >  {
> >  	unsigned blocksize = dir->i_sb->s_blocksize;
> > @@ -2246,7 +2246,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
> >  	if (retval)
> >  		goto out_frames;
> >
> > -	de = do_split(handle,dir, &bh2, frame, &fname->hinfo);
> > +	de = do_split(handle, dir, &bh2, frame, &fname->hinfo);
> >  	if (IS_ERR(de)) {
> >  		retval = PTR_ERR(de);
> >  		goto out_frames;
> >

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues
  2021-05-20 12:55 [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues Lee Jones
  2021-05-27  3:11 ` riteshh
@ 2021-07-22 11:35 ` Lee Jones
  2021-07-22 22:17   ` Theodore Ts'o
  1 sibling, 1 reply; 6+ messages in thread
From: Lee Jones @ 2021-07-22 11:35 UTC (permalink / raw)
  To: linux-kernel, Theodore Ts'o, Andreas Dilger, Remy Card,
	David S. Miller, linux-ext4

On Thu, 20 May 2021, Lee Jones wrote:

> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> Cc: Remy Card <card@masi.ibp.fr>
> Cc: "David S. Miller" <davem@caip.rutgers.edu>
> Cc: linux-ext4@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  fs/ext4/namei.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Any news on this please?

Would you like me to submit a [RESEND]?

> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index afb9d05a99bae..7e780cf311c5a 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -1899,7 +1899,7 @@ static struct ext4_dir_entry_2 *dx_pack_dirents(struct inode *dir, char *base,
>   * Returns pointer to de in block into which the new entry will be inserted.
>   */
>  static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
> -			struct buffer_head **bh,struct dx_frame *frame,
> +			struct buffer_head **bh, struct dx_frame *frame,
>  			struct dx_hash_info *hinfo)
>  {
>  	unsigned blocksize = dir->i_sb->s_blocksize;
> @@ -2246,7 +2246,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
>  	if (retval)
>  		goto out_frames;
>  
> -	de = do_split(handle,dir, &bh2, frame, &fname->hinfo);
> +	de = do_split(handle, dir, &bh2, frame, &fname->hinfo);
>  	if (IS_ERR(de)) {
>  		retval = PTR_ERR(de);
>  		goto out_frames;

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues
  2021-07-22 11:35 ` Lee Jones
@ 2021-07-22 22:17   ` Theodore Ts'o
  2021-07-23  7:25     ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Theodore Ts'o @ 2021-07-22 22:17 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Andreas Dilger, Remy Card, David S. Miller, linux-ext4

On Thu, Jul 22, 2021 at 12:35:43PM +0100, Lee Jones wrote:
> On Thu, 20 May 2021, Lee Jones wrote:
> 
> > Cc: "Theodore Ts'o" <tytso@mit.edu>
> > Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> > Cc: Remy Card <card@masi.ibp.fr>
> > Cc: "David S. Miller" <davem@caip.rutgers.edu>
> > Cc: linux-ext4@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  fs/ext4/namei.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Any news on this please?
> 
> Would you like me to submit a [RESEND]?

Please don't send "checkpatch.pl --file" patches for the ext4 file
system; if you must, please focus on files in the drivers directory,
where they are more welcome.  If developers are making changes to a
file, fixing some checkpatch.pl whines is fine, but white-sapace only
changes just obfuscates "git blame" code archology, and so the costs
far outwieghs the costs.  "Fix" is also not the right verb to use.
For more information please see [1].

[1] https://gist.github.com/17twenty/8154928

If you are looking for subtantive ways of contributing to the ext4
file system, feel free to look at various syzbot warnings[2] and try
to figure out what is going on there.

[2] https://syzkaller.appspot.com/upstream

(In some cases, the syzbot complaint has already been fixed, and it's
just a matter of letting syzbot knoww that it has since been fixed by
a particular commit.  See [3] for more details.)

[3] https://github.com/google/syzkaller/blob/master/docs/syzbot.md

Cheers,

						- Ted

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

* Re: [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues
  2021-07-22 22:17   ` Theodore Ts'o
@ 2021-07-23  7:25     ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-07-23  7:25 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: linux-kernel, Andreas Dilger, Remy Card, David S. Miller, linux-ext4

On Thu, 22 Jul 2021, Theodore Ts'o wrote:

> On Thu, Jul 22, 2021 at 12:35:43PM +0100, Lee Jones wrote:
> > On Thu, 20 May 2021, Lee Jones wrote:
> > 
> > > Cc: "Theodore Ts'o" <tytso@mit.edu>
> > > Cc: Andreas Dilger <adilger.kernel@dilger.ca>
> > > Cc: Remy Card <card@masi.ibp.fr>
> > > Cc: "David S. Miller" <davem@caip.rutgers.edu>
> > > Cc: linux-ext4@vger.kernel.org
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >  fs/ext4/namei.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > Any news on this please?
> > 
> > Would you like me to submit a [RESEND]?
> 
> Please don't send "checkpatch.pl --file" patches for the ext4 file
> system; if you must, please focus on files in the drivers directory,
> where they are more welcome.  If developers are making changes to a
> file, fixing some checkpatch.pl whines is fine, but white-sapace only
> changes just obfuscates "git blame" code archology, and so the costs
> far outwieghs the costs.  "Fix" is also not the right verb to use.
> For more information please see [1].
> 
> [1] https://gist.github.com/17twenty/8154928
> 
> If you are looking for subtantive ways of contributing to the ext4
> file system, feel free to look at various syzbot warnings[2] and try
> to figure out what is going on there.
> 
> [2] https://syzkaller.appspot.com/upstream
> 
> (In some cases, the syzbot complaint has already been fixed, and it's
> just a matter of letting syzbot knoww that it has since been fixed by
> a particular commit.  See [3] for more details.)
> 
> [3] https://github.com/google/syzkaller/blob/master/docs/syzbot.md

This patch doesn't have anything to do with checkpatch.

Daniel, who was making more 'substantive' changes to ext4, fixed these
whitespace issues in his first submission [0], but were dropped from
the second revision for some reason and thus didn't make it into
Mainline [1].

This is an attempt to realign his development repo (Android) with
Mainline.  I had the choice of either backporting the issues back into
the Android kernel or upstreaming the original whitespace cleanup.

It made more sense to me to draft a patch making one codebase better
than another one worse.

[0] https://lore.kernel.org/linux-fsdevel/20210203090745.4103054-2-drosen@google.com/
[1] 471fbbea7ff70 ext4: handle casefolding with encryption

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2021-07-23  7:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 12:55 [PATCH 1/1] fs: ext4: namei: trivial: Fix a couple of small whitespace issues Lee Jones
2021-05-27  3:11 ` riteshh
2021-05-27  8:23   ` Lee Jones
2021-07-22 11:35 ` Lee Jones
2021-07-22 22:17   ` Theodore Ts'o
2021-07-23  7:25     ` Lee Jones

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