From 4b11111aba6c80cc2969fd1806d2a869bfc9f357 Mon Sep 17 00:00:00 2001 From: Marcin Slusarz Date: Fri, 8 Feb 2008 04:20:36 -0800 Subject: udf: fix coding style fix coding style errors found by checkpatch: - assignments in if conditions - braces {} around single statement blocks - no spaces after commas - printks without KERN_* - lines longer than 80 characters - spaces between "type *" and variable name before: 192 errors, 561 warnings, 8987 lines checked after: 1 errors, 38 warnings, 9468 lines checked Signed-off-by: Marcin Slusarz Cc: Jan Kara Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/udf/file.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'fs/udf/file.c') diff --git a/fs/udf/file.c b/fs/udf/file.c index 3bd5068877fa..a984a8911167 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c @@ -59,7 +59,8 @@ static int udf_adinicb_readpage(struct file *file, struct page *page) return 0; } -static int udf_adinicb_writepage(struct page *page, struct writeback_control *wbc) +static int udf_adinicb_writepage(struct page *page, + struct writeback_control *wbc) { struct inode *inode = page->mapping->host; char *kaddr; @@ -116,7 +117,8 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov, else pos = ppos; - if (inode->i_sb->s_blocksize < (udf_file_entry_alloc_offset(inode) + + if (inode->i_sb->s_blocksize < + (udf_file_entry_alloc_offset(inode) + pos + count)) { udf_expand_file_adinicb(inode, pos + count, &err); if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB) { @@ -191,15 +193,19 @@ int udf_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, switch (cmd) { case UDF_GETVOLIDENT: - return copy_to_user((char __user *)arg, - UDF_SB(inode->i_sb)->s_volume_ident, 32) ? -EFAULT : 0; + if (copy_to_user((char __user *)arg, + UDF_SB(inode->i_sb)->s_volume_ident, 32)) + return -EFAULT; + else + return 0; case UDF_RELOCATE_BLOCKS: if (!capable(CAP_SYS_ADMIN)) return -EACCES; if (get_user(old_block, (long __user *)arg)) return -EFAULT; - if ((result = udf_relocate_blocks(inode->i_sb, - old_block, &new_block)) == 0) + result = udf_relocate_blocks(inode->i_sb, + old_block, &new_block); + if (result == 0) result = put_user(new_block, (long __user *)arg); return result; case UDF_GETEASIZE: -- cgit v1.2.3