diff mbox series

[9/9] btrfs: fix source code style in find_fsid

Message ID cf801647e5f9dde29711a97453ff73641adec787.1684826247.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs: metadata_uuid refactors part1 | expand

Commit Message

Anand Jain May 23, 2023, 10:03 a.m. UTC
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/volumes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Sterba May 23, 2023, 9:29 p.m. UTC | #1
On Tue, May 23, 2023 at 06:03:25PM +0800, Anand Jain wrote:
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  fs/btrfs/volumes.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 730fc723524e..db46df2f8fb2 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -443,8 +443,8 @@ static bool memcmp_fsid_fs_devices(struct btrfs_fs_devices *fs_devices,
>  	return true;
>  }
>  
> -static noinline struct btrfs_fs_devices *find_fsid(
> -		const u8 *fsid, const u8 *metadata_fsid)
> +static noinline struct btrfs_fs_devices *find_fsid(const u8 *fsid,
> +						   const u8 *metadata_fsid)

We have lots of mixed coding styles, patches that change just one place
are not so useful, it's better to fix coding style when the code is
changed. If there's some consistent anti-pattern it might be worth
fixing separately but function argument indentation is in the category
of harmless but unfortunately vastly inconsistent.
Anand Jain May 24, 2023, 5:57 a.m. UTC | #2
On 24/5/23 05:29, David Sterba wrote:
> On Tue, May 23, 2023 at 06:03:25PM +0800, Anand Jain wrote:
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>>   fs/btrfs/volumes.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
>> index 730fc723524e..db46df2f8fb2 100644
>> --- a/fs/btrfs/volumes.c
>> +++ b/fs/btrfs/volumes.c
>> @@ -443,8 +443,8 @@ static bool memcmp_fsid_fs_devices(struct btrfs_fs_devices *fs_devices,
>>   	return true;
>>   }
>>   
>> -static noinline struct btrfs_fs_devices *find_fsid(
>> -		const u8 *fsid, const u8 *metadata_fsid)
>> +static noinline struct btrfs_fs_devices *find_fsid(const u8 *fsid,
>> +						   const u8 *metadata_fsid)
> 
> We have lots of mixed coding styles, patches that change just one place
> are not so useful, it's better to fix coding style when the code is
> changed. If there's some consistent anti-pattern it might be worth
> fixing separately but function argument indentation is in the category
> of harmless but unfortunately vastly inconsistent.

Yeah, I agree. I'll drop this patch in v2.

Thanks, Anand
diff mbox series

Patch

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 730fc723524e..db46df2f8fb2 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -443,8 +443,8 @@  static bool memcmp_fsid_fs_devices(struct btrfs_fs_devices *fs_devices,
 	return true;
 }
 
-static noinline struct btrfs_fs_devices *find_fsid(
-		const u8 *fsid, const u8 *metadata_fsid)
+static noinline struct btrfs_fs_devices *find_fsid(const u8 *fsid,
+						   const u8 *metadata_fsid)
 {
 	struct btrfs_fs_devices *fs_devices;