btrfs: backref: Fixed checkpatch warning of over 80 characters
PATCH 1/1 btrfs: backref: Fixed checkpatch warning of over 80 characters
checkpatch.pl reported a warning of over 80 characters on line 1833
Fixed by splitting up into multiple lines, no build errors afterwards
--- fs/btrfs/backref.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/btrfs/backref.c +5 -1
@@ -1830,7 +1830,11 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root,unsigned long ptr;while (1 ) { - ret =btrfs_find_one_extref (fs_root, inum, offset, path, &extref, + ret =btrfs_find_one_extref (fs_root, + inum, + offset, + path, + &extref, &offset);if (ret <0 )break ;
Signature · 1 line
2.7.0
Quoted 1 line · Simon Quigley
checkpatch.pl reported a warning of over 80 characters on line 1833
[]
fs/btrfs/backref.c
Quoted 1 line
fs/btrfs/backref.c +0
-0
[]
Quoted 11 lines
fs/btrfs/backref.c +0
-0@@ -1830,7 +1830,11 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root, unsigned long ptr;
while (1) {fs/btrfs/backref.c +5
-1- ret = btrfs_find_one_extref(fs_root, inum, offset, path, &extref, + ret = btrfs_find_one_extref(fs_root, + inum, + offset, + path, + &extref,&offset);
I think this is poor because all the arguments aren't aligned.
It'd be nicer like:
ret = btrfs_find_one_extref(fs_root, inum, offset, path, &extref, &offset);
PATCH 1/1 btrfs: backref: Fixed checkpatch warning of over 80
In reply to Simon Quigleycheckpatch.pl reported a warning of over 80 characters on line 1833
Adjusted to put &extref and &offset on a different line
--- fs/btrfs/backref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/backref.c +2 -2
@@ -1830,8 +1830,8 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root,unsigned long ptr;while (1 ) { - ret =btrfs_find_one_extref (fs_root, inum, offset, path, &extref, - &offset); + ret =btrfs_find_one_extref (fs_root, inum, offset, path, + &extref, &offset);if (ret <0 )break ;if (ret) {
Signature · 1 line
2.7.0
Re: [PATCH] btrfs: backref: Fixed checkpatch warning of over 80
Better?
Quoted 25 lines · Simon Quigley
checkpatch.pl reported a warning of over 80 characters on line 1833
Adjusted to put &extref and &offset on a different line
Signed-off-by Simon Quigley <[email protected]>--- fs/btrfs/backref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/btrfs/backref.c +2
-2@@ -1830,8 +1830,8 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root,unsigned long ptr;while (1 ) { - ret =btrfs_find_one_extref (fs_root, inum, offset, path, &extref, - &offset); + ret =btrfs_find_one_extref (fs_root, inum, offset, path, + &extref, &offset);if (ret <0 )break ;if (ret) {
Re: [PATCH] btrfs: backref: Fixed checkpatch warning of over 80
Quoted 1 line · Simon Quigley
Better?
No, not really.
The alignment should be to the open parenthesis
as I wrote in the first reply.
Quoted 30 lines · Simon Quigley
Quoted 29 lines
checkpatch.pl reported a warning of over 80 characters on line 1833
Adjusted to put &extref and &offset on a different line
Signed-off-by Simon Quigley <[email protected]>---
fs/btrfs/backref.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)fs/btrfs/backref.c +2
-2@@ -1830,8 +1830,8 @@ static int iterate_inode_extrefs(u64 inum,struct btrfs_root *fs_root, unsigned long ptr; while (1) { - ret =btrfs_find_one_extref (fs_root, inum, offset, path, &extref, - &offset); + ret = btrfs_find_one_extref(fs_root, inum, offset, path, + &extref,&offset);
if (ret < 0)
break;
if (ret) {
PATCH 1/1 btrfs: backref: Fixed checkpatch warning of over 80 characters
In reply to Simon Quigleycheckpatch.pl reported a warning of over 80 characters on line 1833
Adjusted to put &extref and &offset on a different line
--- fs/btrfs/backref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/backref.c +2 -2
@@ -1830,8 +1830,8 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root,unsigned long ptr;while (1 ) { - ret =btrfs_find_one_extref (fs_root, inum, offset, path, &extref, - &offset); + ret =btrfs_find_one_extref (fs_root, inum, offset, path, + &extref, &offset);if (ret <0 )break ;if (ret) {
Signature · 1 line
2.7.0
I apologize, I had my text editor set to a 4 space tab instead of 8 so I couldn't see this clearly. That's fixed now, and it won't happen again. Is this what you wanted? It seems to line up exactly like you proposed.
Quoted 25 lines · Simon Quigley
checkpatch.pl reported a warning of over 80 characters on line 1833
Adjusted to put &extref and &offset on a different line
Signed-off-by Simon Quigley <[email protected]>--- fs/btrfs/backref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/btrfs/backref.c +2
-2@@ -1830,8 +1830,8 @@ static int iterate_inode_extrefs(u64 inum, struct btrfs_root *fs_root,unsigned long ptr;while (1 ) { - ret =btrfs_find_one_extref (fs_root, inum, offset, path, &extref, - &offset); + ret =btrfs_find_one_extref (fs_root, inum, offset, path, + &extref, &offset);if (ret <0 )break ;if (ret) {
Quoted 1 line · Simon Quigley
checkpatch.pl reported a warning of over 80 characters on line 1833
Please read the answers from Filipe or me
http://article.gmane.org/gmane.comp.file-systems.btrfs/53421
http://article.gmane.org/gmane.comp.file-systems.btrfs/53422
in short, whitespace-only changes do not help too much.
Quoted 1 line
in short, whitespace-only changes do not help too much.
But they are encouraged for people who would like to get started with kernel programming, Linus himself says so. In the future I plan on giving more, but I wanted to get familiarized with the process. So I still think this should be accepted although it's just a whitespace change.
Quoted 5 lines · Simon Quigley
Quoted 1 line
in short, whitespace-only changes do not help too much.
But they are encouraged for people who would like to get started with kernel programming, Linus himself says so. In the future I plan on giving more, but I wanted to get familiarized with the process. So I still think this should be accepted although it's just a whitespace change.
But you are getting familiarized, you sent a patch, got feedback, defend your patches. That's a great start, but it does not mean that the patches end up merged. The decision is up to the maintainer(s) of the subsystem.
Nobody will bite your head off if you do some trivial formal mistakes in your first patch submissions. The mistakes will be pointed out, you will be asked to resend. Sometimes, when the mistakes or formalities are not worth the email roundtrip, the maintainers fix it at commit time.
Quoted 9 lines
But you are getting familiarized, you sent a patch, got feedback, defend your patches. That's a great start, but it does not mean that the patches end up merged. The decision is up to the maintainer(s) of the subsystem.
Nobody will bite your head off if you do some trivial formal mistakes in your first patch submissions. The mistakes will be pointed out, you will be asked to resend. Sometimes, when the mistakes or formalities are not worth the email roundtrip, the maintainers fix it at commit time.
So let's wait for a response from Chris. :)