lkml.org 
[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/3] fs/efs: Use correct brace styling for statements
From
Date
On Thu, 2021-02-04 at 21:14 -0800, Amy Parker wrote:
> Many single-line statements have unnecessary braces, and some statement
> pairs have mismatched braces. This is a clear violation of the kernel
> style guide, which mandates that single line statements have no braces
> and that pairs with at least one multi-line block maintain their braces.
>
> This patch fixes these style violations. Single-line statements that
> have braces have had their braces stripped. Pair single-line statements
> have been formatted per the style guide. Pair mixed-line statements have
> had their braces updated to conform.
>
> Signed-off-by: Amy Parker <enbyamy@gmail.com>
> ---
>  fs/efs/inode.c | 10 ++++++----
>  fs/efs/super.c | 15 ++++++---------
>  2 files changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/fs/efs/inode.c b/fs/efs/inode.c
> @@ -120,8 +120,10 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
>   device = 0;
>   else
>   device = MKDEV(sysv_major(rdev), sysv_minor(rdev));
> - } else
> + }
> + else {

Not the kernel specified style.

} else {

Try using checkpatch on your proposed patches.


\
 
 \ /
  Last update: 2021-02-05 07:02    [W:0.056 / U:3.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site