mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
To: trivial@kernel.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, tigran@aivazian.fsnet.co.uk
Subject: [PATCH 2/9] bfs: coding style cleanup in fs/bfs/inode.c
Date: Fri, 25 Jan 2008 01:32:01 +0300	[thread overview]
Message-ID: <1201213928-18183-3-git-send-email-dmitri.vorobiev@gmail.com> (raw)
In-Reply-To: <1201213928-18183-1-git-send-email-dmitri.vorobiev@gmail.com>

This patch cleans up errors found by checkpatch.pl.

Before the patch:

$ ./scripts/checkpatch.pl --file fs/bfs/inode.c  | grep total
total: 11 errors, 0 warnings, 445 lines checked

After the patch:

$ ./scripts/checkpatch.pl --file fs/bfs/inode.c  | grep total
total: 0 errors, 0 warnings, 446 lines checked

No functional changes introduced.

This patch was compile-tested by building the BFS driver both
as a module and as a part of the kernel proper.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
 fs/bfs/inode.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 2284657..5191990 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -90,12 +90,12 @@ static void bfs_read_inode(struct inode *inode)
 static int bfs_write_inode(struct inode *inode, int unused)
 {
 	unsigned int ino = (u16)inode->i_ino;
-        unsigned long i_sblock;
+	unsigned long i_sblock;
 	struct bfs_inode *di;
 	struct buffer_head *bh;
 	int block, off;
 
-        dprintf("ino=%08x\n", ino);
+	dprintf("ino=%08x\n", ino);
 
 	if ((ino < BFS_ROOT_INO) || (ino > BFS_SB(inode->i_sb)->si_lasti)) {
 		printf("Bad inode number %s:%08x\n", inode->i_sb->s_id, ino);
@@ -128,7 +128,7 @@ static int bfs_write_inode(struct inode *inode, int unused)
 	di->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
 	di->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
 	di->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
-        i_sblock = BFS_I(inode)->i_sblock;
+	i_sblock = BFS_I(inode)->i_sblock;
 	di->i_sblock = cpu_to_le32(i_sblock);
 	di->i_eblock = cpu_to_le32(BFS_I(inode)->i_eblock);
 	di->i_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode->i_size - 1);
@@ -157,7 +157,7 @@ static void bfs_delete_inode(struct inode *inode)
 		printf("invalid ino=%08lx\n", ino);
 		return;
 	}
-	
+
 	inode->i_size = 0;
 	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
 	lock_kernel();
@@ -177,13 +177,13 @@ static void bfs_delete_inode(struct inode *inode)
 	mark_buffer_dirty(bh);
 	brelse(bh);
 
-        if (bi->i_dsk_ino) {
+	if (bi->i_dsk_ino) {
 		if (bi->i_sblock)
 			info->si_freeb += bi->i_eblock + 1 - bi->i_sblock;
 		info->si_freei++;
 		clear_bit(ino, info->si_imap);
 		dump_imap("delete_inode", s);
-        }
+	}
 
 	/*
 	 * If this was the last file, make the previous block
@@ -293,7 +293,8 @@ void dump_imap(const char *prefix, struct super_block *s)
 	if (!tmpbuf)
 		return;
 	for (i = BFS_SB(s)->si_lasti; i >= 0; i--) {
-		if (i > PAGE_SIZE - 100) break;
+		if (i > PAGE_SIZE - 100)
+			break;
 		if (test_bit(i, BFS_SB(s)->si_imap))
 			strcat(tmpbuf, "1");
 		else
@@ -321,12 +322,12 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
 	sb_set_blocksize(s, BFS_BSIZE);
 
 	bh = sb_bread(s, 0);
-	if(!bh)
+	if (!bh)
 		goto out;
 	bfs_sb = (struct bfs_super_block *)bh->b_data;
 	if (le32_to_cpu(bfs_sb->s_magic) != BFS_MAGIC) {
 		if (!silent)
-			printf("No BFS filesystem on %s (magic=%08x)\n", 
+			printf("No BFS filesystem on %s (magic=%08x)\n",
 				s->s_id,  le32_to_cpu(bfs_sb->s_magic));
 		goto out;
 	}
@@ -395,7 +396,7 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)
 	if (!(s->s_flags & MS_RDONLY)) {
 		mark_buffer_dirty(info->si_sbh);
 		s->s_dirt = 1;
-	} 
+	}
 	dump_imap("read_super", s);
 	return 0;
 
@@ -425,7 +426,7 @@ static int __init init_bfs_fs(void)
 	int err = init_inodecache();
 	if (err)
 		goto out1;
-        err = register_filesystem(&bfs_fs_type);
+	err = register_filesystem(&bfs_fs_type);
 	if (err)
 		goto out;
 	return 0;
-- 
1.5.3


  parent reply	other threads:[~2008-01-24 22:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24 22:31 [PATCH 0/9] bfs: assorted cleanups Dmitri Vorobiev
2008-01-24 22:32 ` [PATCH 1/9] bfs: remove a useless variable Dmitri Vorobiev
2008-01-24 22:32 ` Dmitri Vorobiev [this message]
2008-01-24 22:32 ` [PATCH 3/9] bfs: coding style cleanup in fs/bfs/bfs.h Dmitri Vorobiev
2008-01-24 22:32 ` [PATCH 4/9] bfs: coding style cleanup in fs/bfs/dir.c Dmitri Vorobiev
2008-01-24 22:32 ` [PATCH 5/9] bfs: move function prototype to the proper header file Dmitri Vorobiev
2008-01-24 22:50   ` Heikki Orsila
2008-01-24 23:08     ` Tigran Aivazian
2008-01-24 23:17       ` Tigran Aivazian
2008-01-24 23:13     ` Dmitri Vorobiev
2008-01-24 23:22       ` Tigran Aivazian
2008-01-24 23:30         ` Dmitri Vorobiev
2008-01-25 10:42         ` Adrian Bunk
2008-01-25 11:12           ` Dmitri Vorobiev
2008-01-24 23:33       ` Heikki Orsila
2008-01-24 23:47         ` Dmitri Vorobiev
2008-01-25  1:55       ` Kyle Moffett
2008-01-24 22:32 ` [PATCH 6/9] bfs: coding style cleanup in fs/bfs/file.c Dmitri Vorobiev
2008-01-24 22:32 ` [PATCH 7/9] bfs: coding style cleanup in include/linux/bfs_fs.h Dmitri Vorobiev
2008-01-24 22:32 ` [PATCH 8/9] bfs: remove multiple assignments Dmitri Vorobiev
2008-01-24 22:32 ` [PATCH 9/9] bfs: use the proper header file for inclusion Dmitri Vorobiev
2008-01-25 10:25 ` [PATCH 0/9] bfs: assorted cleanups Dmitri Vorobiev

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=1201213928-18183-3-git-send-email-dmitri.vorobiev@gmail.com \
    --to=dmitri.vorobiev@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tigran@aivazian.fsnet.co.uk \
    --cc=trivial@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

Powered by JetHome