diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-08-08 17:22:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:25 -0400 |
commit | 31d92e55198d4ec32862aea9441de46a13b33ed8 (patch) | |
tree | 54cdebd2f1ea6b67910fe09abf791c308534e673 /fs/cramfs | |
parent | 4f21e1ea09e1e337604f235a22ec2493ae1bd1db (diff) |
fs/cramfs: code clean-up
Fixes some checkpatch errors/warnings:
WARNING: Missing a blank line after declarations
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: "foo * bar" should be "foo *bar"
ERROR: space prohibited after that open parenthesis '('
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/cramfs')
-rw-r--r-- | fs/cramfs/inode.c | 25 | ||||
-rw-r--r-- | fs/cramfs/uncompress.c | 2 |
2 files changed, 15 insertions, 12 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index fa5c75978df3..4d37c354646d 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c | |||
@@ -155,7 +155,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb, | |||
155 | 155 | ||
156 | static unsigned char read_buffers[READ_BUFFERS][BUFFER_SIZE]; | 156 | static unsigned char read_buffers[READ_BUFFERS][BUFFER_SIZE]; |
157 | static unsigned buffer_blocknr[READ_BUFFERS]; | 157 | static unsigned buffer_blocknr[READ_BUFFERS]; |
158 | static struct super_block * buffer_dev[READ_BUFFERS]; | 158 | static struct super_block *buffer_dev[READ_BUFFERS]; |
159 | static int next_buffer; | 159 | static int next_buffer; |
160 | 160 | ||
161 | /* | 161 | /* |
@@ -207,6 +207,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i | |||
207 | 207 | ||
208 | for (i = 0; i < BLKS_PER_BUF; i++) { | 208 | for (i = 0; i < BLKS_PER_BUF; i++) { |
209 | struct page *page = pages[i]; | 209 | struct page *page = pages[i]; |
210 | |||
210 | if (page) { | 211 | if (page) { |
211 | wait_on_page_locked(page); | 212 | wait_on_page_locked(page); |
212 | if (!PageUptodate(page)) { | 213 | if (!PageUptodate(page)) { |
@@ -225,6 +226,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i | |||
225 | data = read_buffers[buffer]; | 226 | data = read_buffers[buffer]; |
226 | for (i = 0; i < BLKS_PER_BUF; i++) { | 227 | for (i = 0; i < BLKS_PER_BUF; i++) { |
227 | struct page *page = pages[i]; | 228 | struct page *page = pages[i]; |
229 | |||
228 | if (page) { | 230 | if (page) { |
229 | memcpy(data, kmap(page), PAGE_CACHE_SIZE); | 231 | memcpy(data, kmap(page), PAGE_CACHE_SIZE); |
230 | kunmap(page); | 232 | kunmap(page); |
@@ -239,6 +241,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i | |||
239 | static void cramfs_kill_sb(struct super_block *sb) | 241 | static void cramfs_kill_sb(struct super_block *sb) |
240 | { | 242 | { |
241 | struct cramfs_sb_info *sbi = CRAMFS_SB(sb); | 243 | struct cramfs_sb_info *sbi = CRAMFS_SB(sb); |
244 | |||
242 | kill_block_super(sb); | 245 | kill_block_super(sb); |
243 | kfree(sbi); | 246 | kfree(sbi); |
244 | } | 247 | } |
@@ -312,16 +315,16 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent) | |||
312 | 315 | ||
313 | root_offset = super.root.offset << 2; | 316 | root_offset = super.root.offset << 2; |
314 | if (super.flags & CRAMFS_FLAG_FSID_VERSION_2) { | 317 | if (super.flags & CRAMFS_FLAG_FSID_VERSION_2) { |
315 | sbi->size=super.size; | 318 | sbi->size = super.size; |
316 | sbi->blocks=super.fsid.blocks; | 319 | sbi->blocks = super.fsid.blocks; |
317 | sbi->files=super.fsid.files; | 320 | sbi->files = super.fsid.files; |
318 | } else { | 321 | } else { |
319 | sbi->size=1<<28; | 322 | sbi->size = 1<<28; |
320 | sbi->blocks=0; | 323 | sbi->blocks = 0; |
321 | sbi->files=0; | 324 | sbi->files = 0; |
322 | } | 325 | } |
323 | sbi->magic=super.magic; | 326 | sbi->magic = super.magic; |
324 | sbi->flags=super.flags; | 327 | sbi->flags = super.flags; |
325 | if (root_offset == 0) | 328 | if (root_offset == 0) |
326 | pr_info("empty filesystem"); | 329 | pr_info("empty filesystem"); |
327 | else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && | 330 | else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && |
@@ -427,7 +430,7 @@ static int cramfs_readdir(struct file *file, struct dir_context *ctx) | |||
427 | /* | 430 | /* |
428 | * Lookup and fill in the inode data.. | 431 | * Lookup and fill in the inode data.. |
429 | */ | 432 | */ |
430 | static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) | 433 | static struct dentry *cramfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) |
431 | { | 434 | { |
432 | unsigned int offset = 0; | 435 | unsigned int offset = 0; |
433 | struct inode *inode = NULL; | 436 | struct inode *inode = NULL; |
@@ -485,7 +488,7 @@ out: | |||
485 | return NULL; | 488 | return NULL; |
486 | } | 489 | } |
487 | 490 | ||
488 | static int cramfs_readpage(struct file *file, struct page * page) | 491 | static int cramfs_readpage(struct file *file, struct page *page) |
489 | { | 492 | { |
490 | struct inode *inode = page->mapping->host; | 493 | struct inode *inode = page->mapping->host; |
491 | u32 maxblock; | 494 | u32 maxblock; |
diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index b7f030ba316d..ec4f1d4fdad0 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c | |||
@@ -59,7 +59,7 @@ int cramfs_uncompress_init(void) | |||
59 | { | 59 | { |
60 | if (!initialized++) { | 60 | if (!initialized++) { |
61 | stream.workspace = vmalloc(zlib_inflate_workspacesize()); | 61 | stream.workspace = vmalloc(zlib_inflate_workspacesize()); |
62 | if ( !stream.workspace ) { | 62 | if (!stream.workspace) { |
63 | initialized = 0; | 63 | initialized = 0; |
64 | return -ENOMEM; | 64 | return -ENOMEM; |
65 | } | 65 | } |