* [PATCH] ext2: Adjust indentation in ext2_fill_super
@ 2019-12-18 3:15 Nathan Chancellor
2019-12-18 3:19 ` [PATCH v2] " Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2019-12-18 3:15 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-ext4, linux-kernel, clang-built-linux, Nathan Chancellor
Clang warns:
../fs/ext2/super.c:1076:3: warning: misleading indentation; statement is
not part of the previous 'if' [-Wmisleading-indentation]
sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
^
../fs/ext2/super.c:1074:2: note: previous statement is here
if (EXT2_BLOCKS_PER_GROUP(sb) == 0)
^
1 warning generated.
This warning occurs because there is a space before the tab on this
line. Remove it so that the indentation is consistent with the Linux
kernel coding style and clang no longer warns.
Fixes: 41f04d852e35 ("[PATCH] ext2: fix mounts at 16T")
Link: https://github.com/ClangBuiltLinux/linux/issues/826
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
fs/ext2/super.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 8643f98e9578..4a4ab683250d 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1073,9 +1073,9 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if (EXT2_BLOCKS_PER_GROUP(sb) == 0)
goto cantfind_ext2;
- sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
- le32_to_cpu(es->s_first_data_block) - 1)
- / EXT2_BLOCKS_PER_GROUP(sb)) + 1;
+ sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
+ le32_to_cpu(es->s_first_data_block) - 1)
+ / EXT2_BLOCKS_PER_GROUP(sb)) + 1;
db_count = (sbi->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
EXT2_DESC_PER_BLOCK(sb);
sbi->s_group_desc = kmalloc_array (db_count,
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] ext2: Adjust indentation in ext2_fill_super
2019-12-18 3:15 [PATCH] ext2: Adjust indentation in ext2_fill_super Nathan Chancellor
@ 2019-12-18 3:19 ` Nathan Chancellor
2019-12-18 8:38 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2019-12-18 3:19 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-ext4, linux-kernel, clang-built-linux, Nathan Chancellor
Clang warns:
../fs/ext2/super.c:1076:3: warning: misleading indentation; statement is
not part of the previous 'if' [-Wmisleading-indentation]
sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
^
../fs/ext2/super.c:1074:2: note: previous statement is here
if (EXT2_BLOCKS_PER_GROUP(sb) == 0)
^
1 warning generated.
This warning occurs because there is a space before the tab on this
line. Remove it so that the indentation is consistent with the Linux
kernel coding style and clang no longer warns.
Fixes: 41f04d852e35 ("[PATCH] ext2: fix mounts at 16T")
Link: https://github.com/ClangBuiltLinux/linux/issues/827
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
v1 -> v2:
* Adjust link to point to the right issue.
fs/ext2/super.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 8643f98e9578..4a4ab683250d 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1073,9 +1073,9 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if (EXT2_BLOCKS_PER_GROUP(sb) == 0)
goto cantfind_ext2;
- sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
- le32_to_cpu(es->s_first_data_block) - 1)
- / EXT2_BLOCKS_PER_GROUP(sb)) + 1;
+ sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
+ le32_to_cpu(es->s_first_data_block) - 1)
+ / EXT2_BLOCKS_PER_GROUP(sb)) + 1;
db_count = (sbi->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
EXT2_DESC_PER_BLOCK(sb);
sbi->s_group_desc = kmalloc_array (db_count,
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ext2: Adjust indentation in ext2_fill_super
2019-12-18 3:19 ` [PATCH v2] " Nathan Chancellor
@ 2019-12-18 8:38 ` Jan Kara
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kara @ 2019-12-18 8:38 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: Jan Kara, linux-ext4, linux-kernel, clang-built-linux
On Tue 17-12-19 20:19:31, Nathan Chancellor wrote:
> Clang warns:
>
> ../fs/ext2/super.c:1076:3: warning: misleading indentation; statement is
> not part of the previous 'if' [-Wmisleading-indentation]
> sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
> ^
> ../fs/ext2/super.c:1074:2: note: previous statement is here
> if (EXT2_BLOCKS_PER_GROUP(sb) == 0)
> ^
> 1 warning generated.
>
> This warning occurs because there is a space before the tab on this
> line. Remove it so that the indentation is consistent with the Linux
> kernel coding style and clang no longer warns.
>
> Fixes: 41f04d852e35 ("[PATCH] ext2: fix mounts at 16T")
> Link: https://github.com/ClangBuiltLinux/linux/issues/827
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Thanks! I've added the patch to my tree.
Honza
> ---
>
> v1 -> v2:
>
> * Adjust link to point to the right issue.
>
> fs/ext2/super.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index 8643f98e9578..4a4ab683250d 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -1073,9 +1073,9 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
>
> if (EXT2_BLOCKS_PER_GROUP(sb) == 0)
> goto cantfind_ext2;
> - sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
> - le32_to_cpu(es->s_first_data_block) - 1)
> - / EXT2_BLOCKS_PER_GROUP(sb)) + 1;
> + sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) -
> + le32_to_cpu(es->s_first_data_block) - 1)
> + / EXT2_BLOCKS_PER_GROUP(sb)) + 1;
> db_count = (sbi->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) /
> EXT2_DESC_PER_BLOCK(sb);
> sbi->s_group_desc = kmalloc_array (db_count,
> --
> 2.24.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-18 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 3:15 [PATCH] ext2: Adjust indentation in ext2_fill_super Nathan Chancellor
2019-12-18 3:19 ` [PATCH v2] " Nathan Chancellor
2019-12-18 8:38 ` Jan Kara
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).