From: Amy Parker <enbyamy@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Amy Parker <enbyamy@gmail.com>
Subject: [PATCH 3/3] fs/efs: Fix line breakage for C keywords
Date: Thu, 4 Feb 2021 20:52:17 -0800 [thread overview]
Message-ID: <20210205045217.552927-4-enbyamy@gmail.com> (raw)
In-Reply-To: <20210205045217.552927-1-enbyamy@gmail.com>
Some statements - such as if statements - are not broken into their lines correctly. For example, some are expressed on a single line. Single line if statements are expressely prohibited by the style guide. This patch corrects these violations.
Signed-off-by: Amy Parker <enbyamy@gmail.com>
---
fs/efs/inode.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index 2cc55d514421..0099e6ad529a 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -193,7 +193,8 @@ efs_extent_check(efs_extent *ptr, efs_block_t block, struct efs_sb_info *sb) {
if ((block >= offset) && (block < offset+length)) {
return(sb->fs_start + start + block - offset);
- } else {
+ }
+ else {
return 0;
}
}
@@ -264,7 +265,8 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
/* should never happen */
pr_err("couldn't find direct extent for indirect extent %d (block %u)\n",
cur, block);
- if (bh) brelse(bh);
+ if (bh)
+ brelse(bh);
return 0;
}
@@ -276,7 +278,8 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
(EFS_BLOCKSIZE / sizeof(efs_extent));
if (first || lastblock != iblock) {
- if (bh) brelse(bh);
+ if (bh)
+ brelse(bh);
bh = sb_bread(inode->i_sb, iblock);
if (!bh) {
@@ -297,17 +300,20 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
if (ext.cooked.ex_magic != 0) {
pr_err("extent %d has bad magic number in block %d\n",
cur, iblock);
- if (bh) brelse(bh);
+ if (bh)
+ brelse(bh);
return 0;
}
if ((result = efs_extent_check(&ext, block, sb))) {
- if (bh) brelse(bh);
+ if (bh)
+ brelse(bh);
in->lastextent = cur;
return result;
}
}
- if (bh) brelse(bh);
+ if (bh)
+ brelse(bh);
pr_err("%s() failed to map block %u (indir)\n", __func__, block);
return 0;
}
--
2.29.2
next prev parent reply other threads:[~2021-02-05 4:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 4:52 [PATCH 0/3] fs/efs: Follow kernel style guide Amy Parker
2021-02-05 4:52 ` [PATCH 1/3] fs/efs: Use correct brace styling for statements Amy Parker
2021-02-05 4:57 ` Chaitanya Kulkarni
2021-02-05 5:00 ` Amy Parker
2021-02-05 5:09 ` Chaitanya Kulkarni
2021-02-05 5:12 ` Amy Parker
2021-02-05 4:52 ` [PATCH 2/3] fs/efs: Correct spacing after C keywords Amy Parker
2021-02-05 4:52 ` Amy Parker [this message]
2021-02-05 13:19 ` [PATCH 0/3] fs/efs: Follow kernel style guide David Sterba
2021-02-05 15:36 ` Amy Parker
2021-02-05 22:37 ` Richard Weinberger
2021-02-05 22:49 ` Amy Parker
2021-02-08 0:15 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210205045217.552927-4-enbyamy@gmail.com \
--to=enbyamy@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox