From: Sohaib Mohamed <sohaib.amhmd@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Sohaib Mohamed <sohaib.amhmd@gmail.com>,
David Sterba <dsterba@suse.com>,
Christian Brauner <christian.brauner@ubuntu.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fs/affs: fix minor indentation and codestyle
Date: Fri, 1 Oct 2021 02:27:01 +0200 [thread overview]
Message-ID: <20211001002702.151056-1-sohaib.amhmd@gmail.com> (raw)
Errors found by checkpatch.pl
Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
---
fs/affs/inode.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 2352a75bd9d6..69dc98d07e41 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -41,7 +41,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino)
goto bad_inode;
}
if (affs_checksum_block(sb, bh) || be32_to_cpu(AFFS_HEAD(bh)->ptype) != T_SHORT) {
- affs_warning(sb,"read_inode",
+ affs_warning(sb, "read_inode",
"Checksum or type (ptype=%d) error on inode %d",
AFFS_HEAD(bh)->ptype, block);
goto bad_inode;
@@ -151,7 +151,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino)
inode->i_mtime.tv_sec = inode->i_atime.tv_sec = inode->i_ctime.tv_sec
= (be32_to_cpu(tail->change.days) * 86400LL +
- be32_to_cpu(tail->change.mins) * 60 +
+ be32_to_cpu(tail->change.mins) * 60 +
be32_to_cpu(tail->change.ticks) / 50 +
AFFS_EPOCH_DELTA) +
sys_tz.tz_minuteswest * 60;
@@ -182,7 +182,7 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc)
return 0;
bh = affs_bread(sb, inode->i_ino);
if (!bh) {
- affs_error(sb,"write_inode","Cannot read block %lu",inode->i_ino);
+ affs_error(sb, "write_inode", "Cannot read block %lu", inode->i_ino);
return -EIO;
}
tail = AFFS_TAIL(sb, bh);
@@ -263,6 +263,7 @@ void
affs_evict_inode(struct inode *inode)
{
unsigned long cache_page;
+
pr_debug("evict_inode(ino=%lu, nlink=%u)\n",
inode->i_ino, inode->i_nlink);
truncate_inode_pages_final(&inode->i_data);
@@ -298,10 +299,12 @@ affs_new_inode(struct inode *dir)
u32 block;
struct buffer_head *bh;
- if (!(inode = new_inode(sb)))
+ inode = new_inode(sb);
+ if (!inode)
goto err_inode;
- if (!(block = affs_alloc_block(dir, dir->i_ino)))
+ block = affs_alloc_block(dir, dir->i_ino);
+ if (!block)
goto err_block;
bh = affs_getzeroblk(sb, block);
@@ -390,7 +393,8 @@ affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s3
if (inode_bh) {
__be32 chain;
- chain = AFFS_TAIL(sb, inode_bh)->link_chain;
+
+ chain = AFFS_TAIL(sb, inode_bh)->link_chain;
AFFS_TAIL(sb, bh)->original = cpu_to_be32(inode->i_ino);
AFFS_TAIL(sb, bh)->link_chain = chain;
AFFS_TAIL(sb, inode_bh)->link_chain = cpu_to_be32(block);
--
2.25.1
next reply other threads:[~2021-10-01 0:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 0:27 Sohaib Mohamed [this message]
2021-10-01 11:50 ` 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=20211001002702.151056-1-sohaib.amhmd@gmail.com \
--to=sohaib.amhmd@gmail.com \
--cc=christian.brauner@ubuntu.com \
--cc=dsterba@suse.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
all inboxes | Powered by JetHome®