linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fs/ext2: Fix code indentation
@ 2022-11-28 12:05 Rong Tao
  2022-11-28 14:03 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Rong Tao @ 2022-11-28 12:05 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4, linux-kernel, Rong Tao

From: Rong Tao <rongtao@cestc.cn>

ts=4 can cause misunderstanding in code reading. It is better to replace
8 spaces with one tab.

Signed-off-by: Rong Tao <rongtao@cestc.cn>
---
v2: Modify more indentation lines
v1: https://lore.kernel.org/all/tencent_EEC5C049082D4BF0724AC5E9956BD41E5105@qq.com/
---
 fs/ext2/balloc.c | 12 ++++++------
 fs/ext2/super.c  |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 5dc0a31f4a08..eca60b747c6b 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -667,7 +667,7 @@ ext2_try_to_allocate(struct super_block *sb, int group,
 {
 	ext2_fsblk_t group_first_block = ext2_group_first_block_no(sb, group);
 	ext2_fsblk_t group_last_block = ext2_group_last_block_no(sb, group);
-       	ext2_grpblk_t start, end;
+	ext2_grpblk_t start, end;
 	unsigned long num = 0;
 
 	start = 0;
@@ -1481,11 +1481,11 @@ unsigned long ext2_count_free_blocks (struct super_block * sb)
 		desc_count, bitmap_count);
 	return bitmap_count;
 #else
-        for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {
-                desc = ext2_get_group_desc (sb, i, NULL);
-                if (!desc)
-                        continue;
-                desc_count += le16_to_cpu(desc->bg_free_blocks_count);
+	for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {
+		desc = ext2_get_group_desc(sb, i, NULL);
+		if (!desc)
+			continue;
+		desc_count += le16_to_cpu(desc->bg_free_blocks_count);
 	}
 	return desc_count;
 #endif
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 03f2af98b1b4..69c88facfe90 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1648,7 +1648,7 @@ static int __init init_ext2_fs(void)
 	err = init_inodecache();
 	if (err)
 		return err;
-        err = register_filesystem(&ext2_fs_type);
+	err = register_filesystem(&ext2_fs_type);
 	if (err)
 		goto out;
 	return 0;
-- 
2.38.1


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

* Re: [PATCH v2] fs/ext2: Fix code indentation
  2022-11-28 12:05 [PATCH v2] fs/ext2: Fix code indentation Rong Tao
@ 2022-11-28 14:03 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2022-11-28 14:03 UTC (permalink / raw)
  To: Rong Tao; +Cc: jack, linux-ext4, linux-kernel, Rong Tao

On Mon 28-11-22 20:05:49, Rong Tao wrote:
> From: Rong Tao <rongtao@cestc.cn>
> 
> ts=4 can cause misunderstanding in code reading. It is better to replace
> 8 spaces with one tab.
> 
> Signed-off-by: Rong Tao <rongtao@cestc.cn>

Thanks! I've merged the patch to my tree.

								Honza

> ---
> v2: Modify more indentation lines
> v1: https://lore.kernel.org/all/tencent_EEC5C049082D4BF0724AC5E9956BD41E5105@qq.com/
> ---
>  fs/ext2/balloc.c | 12 ++++++------
>  fs/ext2/super.c  |  2 +-
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
> index 5dc0a31f4a08..eca60b747c6b 100644
> --- a/fs/ext2/balloc.c
> +++ b/fs/ext2/balloc.c
> @@ -667,7 +667,7 @@ ext2_try_to_allocate(struct super_block *sb, int group,
>  {
>  	ext2_fsblk_t group_first_block = ext2_group_first_block_no(sb, group);
>  	ext2_fsblk_t group_last_block = ext2_group_last_block_no(sb, group);
> -       	ext2_grpblk_t start, end;
> +	ext2_grpblk_t start, end;
>  	unsigned long num = 0;
>  
>  	start = 0;
> @@ -1481,11 +1481,11 @@ unsigned long ext2_count_free_blocks (struct super_block * sb)
>  		desc_count, bitmap_count);
>  	return bitmap_count;
>  #else
> -        for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {
> -                desc = ext2_get_group_desc (sb, i, NULL);
> -                if (!desc)
> -                        continue;
> -                desc_count += le16_to_cpu(desc->bg_free_blocks_count);
> +	for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) {
> +		desc = ext2_get_group_desc(sb, i, NULL);
> +		if (!desc)
> +			continue;
> +		desc_count += le16_to_cpu(desc->bg_free_blocks_count);
>  	}
>  	return desc_count;
>  #endif
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index 03f2af98b1b4..69c88facfe90 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -1648,7 +1648,7 @@ static int __init init_ext2_fs(void)
>  	err = init_inodecache();
>  	if (err)
>  		return err;
> -        err = register_filesystem(&ext2_fs_type);
> +	err = register_filesystem(&ext2_fs_type);
>  	if (err)
>  		goto out;
>  	return 0;
> -- 
> 2.38.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

end of thread, other threads:[~2022-11-28 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 12:05 [PATCH v2] fs/ext2: Fix code indentation Rong Tao
2022-11-28 14:03 ` 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).