Re: [PATCH 01/24] udf: fix coding style of super.c

2008-01-07 Thread Jan Kara
On Sun 23-12-07 02:50:51, [EMAIL PROTECTED] wrote:
> 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
> before: total: 50 errors, 207 warnings, 1835 lines checked
> after:  total: 0 errors, 164 warnings, 1872 lines checked
> 
> all 164 warnings left are lines longer than 80 characters;
> this file has too much indentation with really long expressions
> to break all those lines
> 
> Signed-off-by: Marcin Slusarz <[EMAIL PROTECTED]>
> CC: Ben Fennema <[EMAIL PROTECTED]>
> CC: Jan Kara <[EMAIL PROTECTED]>
  Thanks for doing the cleanup.  I've reviewed the changes and all look
fine. You can add: Acked-by: Jan Kara <[EMAIL PROTECTED]>

Honza

> ---
>  fs/udf/super.c |  295 +++
>  1 files changed, 166 insertions(+), 129 deletions(-)
> 
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index 4360c7a..57788f1 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -33,8 +33,8 @@
>   *  10/17/98  added freespace count for "df"
>   *  11/11/98 gr   added novrs option
>   *  11/26/98 dgb  added fileset,anchor mount options
> - *  12/06/98 blf  really hosed things royally. vat/sparing support. 
> sequenced vol descs
> - *rewrote option handling based on isofs
> + *  12/06/98 blf  really hosed things royally. vat/sparing support. sequenced
> + *vol descs. rewrote option handling based on isofs
>   *  12/20/98  find the free space bitmap (if it exists)
>   */
>  
> @@ -116,7 +116,7 @@ static struct kmem_cache *udf_inode_cachep;
>  static struct inode *udf_alloc_inode(struct super_block *sb)
>  {
>   struct udf_inode_info *ei;
> - ei = (struct udf_inode_info *)kmem_cache_alloc(udf_inode_cachep, 
> GFP_KERNEL);
> + ei = kmem_cache_alloc(udf_inode_cachep, GFP_KERNEL);
>   if (!ei)
>   return NULL;
>  
> @@ -561,47 +561,52 @@ static int udf_vrs(struct super_block *sb, int silent)
>  
>   /* Look for ISO  descriptors */
>   vsd = (struct volStructDesc *)(bh->b_data +
> -(sector & (sb->s_blocksize - 
> 1)));
> +   (sector & (sb->s_blocksize - 1)));
>  
>   if (vsd->stdIdent[0] == 0) {
>   brelse(bh);
>   break;
> - } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_CD001, 
> VSD_STD_ID_LEN)) {
> + } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_CD001,
> + VSD_STD_ID_LEN)) {
>   iso9660 = sector;
>   switch (vsd->structType) {
>   case 0:
>   udf_debug("ISO9660 Boot Record found\n");
>   break;
>   case 1:
> - udf_debug
> - ("ISO9660 Primary Volume Descriptor 
> found\n");
> + udf_debug("ISO9660 Primary Volume Descriptor "
> +   "found\n");
>   break;
>   case 2:
> - udf_debug
> - ("ISO9660 Supplementary Volume Descriptor 
> found\n");
> + udf_debug("ISO9660 Supplementary Volume "
> +   "Descriptor found\n");
>   break;
>   case 3:
> - udf_debug
> - ("ISO9660 Volume Partition Descriptor 
> found\n");
> + udf_debug("ISO9660 Volume Partition Descriptor "
> +   "found\n");
>   break;
>   case 255:
> - udf_debug
> - ("ISO9660 Volume Descriptor Set Terminator 
> found\n");
> + udf_debug("ISO9660 Volume Descriptor Set "
> +   "Terminator found\n");
>   break;
>   default:
>   udf_debug("ISO9660 VRS (%u) found\n",
> vsd->structType);
>   break;
>   }
> - } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_BEA01, 
> VSD_STD_ID_LEN)) {
> - } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_TEA01, 
> VSD_STD_ID_LEN)) {
> + } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_BEA01,
> + VSD_STD_ID_LEN))
> + ; /* nothing */
> + else if (!strncmp(vsd->stdIdent, VSD_STD_ID_TEA01,
> 

[PATCH 01/24] udf: fix coding style of super.c

2007-12-22 Thread marcin . slusarz
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
before: total: 50 errors, 207 warnings, 1835 lines checked
after:  total: 0 errors, 164 warnings, 1872 lines checked

all 164 warnings left are lines longer than 80 characters;
this file has too much indentation with really long expressions
to break all those lines

Signed-off-by: Marcin Slusarz <[EMAIL PROTECTED]>
CC: Ben Fennema <[EMAIL PROTECTED]>
CC: Jan Kara <[EMAIL PROTECTED]>
---
 fs/udf/super.c |  295 +++
 1 files changed, 166 insertions(+), 129 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 4360c7a..57788f1 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -33,8 +33,8 @@
  *  10/17/98  added freespace count for "df"
  *  11/11/98 gr   added novrs option
  *  11/26/98 dgb  added fileset,anchor mount options
- *  12/06/98 blf  really hosed things royally. vat/sparing support. sequenced 
vol descs
- *rewrote option handling based on isofs
+ *  12/06/98 blf  really hosed things royally. vat/sparing support. sequenced
+ *vol descs. rewrote option handling based on isofs
  *  12/20/98  find the free space bitmap (if it exists)
  */
 
@@ -116,7 +116,7 @@ static struct kmem_cache *udf_inode_cachep;
 static struct inode *udf_alloc_inode(struct super_block *sb)
 {
struct udf_inode_info *ei;
-   ei = (struct udf_inode_info *)kmem_cache_alloc(udf_inode_cachep, 
GFP_KERNEL);
+   ei = kmem_cache_alloc(udf_inode_cachep, GFP_KERNEL);
if (!ei)
return NULL;
 
@@ -561,47 +561,52 @@ static int udf_vrs(struct super_block *sb, int silent)
 
/* Look for ISO  descriptors */
vsd = (struct volStructDesc *)(bh->b_data +
-  (sector & (sb->s_blocksize - 
1)));
+ (sector & (sb->s_blocksize - 1)));
 
if (vsd->stdIdent[0] == 0) {
brelse(bh);
break;
-   } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_CD001, 
VSD_STD_ID_LEN)) {
+   } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_CD001,
+   VSD_STD_ID_LEN)) {
iso9660 = sector;
switch (vsd->structType) {
case 0:
udf_debug("ISO9660 Boot Record found\n");
break;
case 1:
-   udf_debug
-   ("ISO9660 Primary Volume Descriptor 
found\n");
+   udf_debug("ISO9660 Primary Volume Descriptor "
+ "found\n");
break;
case 2:
-   udf_debug
-   ("ISO9660 Supplementary Volume Descriptor 
found\n");
+   udf_debug("ISO9660 Supplementary Volume "
+ "Descriptor found\n");
break;
case 3:
-   udf_debug
-   ("ISO9660 Volume Partition Descriptor 
found\n");
+   udf_debug("ISO9660 Volume Partition Descriptor "
+ "found\n");
break;
case 255:
-   udf_debug
-   ("ISO9660 Volume Descriptor Set Terminator 
found\n");
+   udf_debug("ISO9660 Volume Descriptor Set "
+ "Terminator found\n");
break;
default:
udf_debug("ISO9660 VRS (%u) found\n",
  vsd->structType);
break;
}
-   } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_BEA01, 
VSD_STD_ID_LEN)) {
-   } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_TEA01, 
VSD_STD_ID_LEN)) {
+   } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_BEA01,
+   VSD_STD_ID_LEN))
+   ; /* nothing */
+   else if (!strncmp(vsd->stdIdent, VSD_STD_ID_TEA01,
+   VSD_STD_ID_LEN)) {
brelse(bh);
break;
-   } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_NSR02, 
VSD_STD_ID_LEN)) {
+   } else if (!strncmp(vsd->stdIdent, VSD_STD_ID_NSR02,
+   VSD_STD_ID_LEN))
nsr02 = 

[PATCH 01/24] udf: fix coding style of super.c

2007-12-22 Thread marcin . slusarz
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
before: total: 50 errors, 207 warnings, 1835 lines checked
after:  total: 0 errors, 164 warnings, 1872 lines checked

all 164 warnings left are lines longer than 80 characters;
this file has too much indentation with really long expressions
to break all those lines

Signed-off-by: Marcin Slusarz [EMAIL PROTECTED]
CC: Ben Fennema [EMAIL PROTECTED]
CC: Jan Kara [EMAIL PROTECTED]
---
 fs/udf/super.c |  295 +++
 1 files changed, 166 insertions(+), 129 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 4360c7a..57788f1 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -33,8 +33,8 @@
  *  10/17/98  added freespace count for df
  *  11/11/98 gr   added novrs option
  *  11/26/98 dgb  added fileset,anchor mount options
- *  12/06/98 blf  really hosed things royally. vat/sparing support. sequenced 
vol descs
- *rewrote option handling based on isofs
+ *  12/06/98 blf  really hosed things royally. vat/sparing support. sequenced
+ *vol descs. rewrote option handling based on isofs
  *  12/20/98  find the free space bitmap (if it exists)
  */
 
@@ -116,7 +116,7 @@ static struct kmem_cache *udf_inode_cachep;
 static struct inode *udf_alloc_inode(struct super_block *sb)
 {
struct udf_inode_info *ei;
-   ei = (struct udf_inode_info *)kmem_cache_alloc(udf_inode_cachep, 
GFP_KERNEL);
+   ei = kmem_cache_alloc(udf_inode_cachep, GFP_KERNEL);
if (!ei)
return NULL;
 
@@ -561,47 +561,52 @@ static int udf_vrs(struct super_block *sb, int silent)
 
/* Look for ISO  descriptors */
vsd = (struct volStructDesc *)(bh-b_data +
-  (sector  (sb-s_blocksize - 
1)));
+ (sector  (sb-s_blocksize - 1)));
 
if (vsd-stdIdent[0] == 0) {
brelse(bh);
break;
-   } else if (!strncmp(vsd-stdIdent, VSD_STD_ID_CD001, 
VSD_STD_ID_LEN)) {
+   } else if (!strncmp(vsd-stdIdent, VSD_STD_ID_CD001,
+   VSD_STD_ID_LEN)) {
iso9660 = sector;
switch (vsd-structType) {
case 0:
udf_debug(ISO9660 Boot Record found\n);
break;
case 1:
-   udf_debug
-   (ISO9660 Primary Volume Descriptor 
found\n);
+   udf_debug(ISO9660 Primary Volume Descriptor 
+ found\n);
break;
case 2:
-   udf_debug
-   (ISO9660 Supplementary Volume Descriptor 
found\n);
+   udf_debug(ISO9660 Supplementary Volume 
+ Descriptor found\n);
break;
case 3:
-   udf_debug
-   (ISO9660 Volume Partition Descriptor 
found\n);
+   udf_debug(ISO9660 Volume Partition Descriptor 
+ found\n);
break;
case 255:
-   udf_debug
-   (ISO9660 Volume Descriptor Set Terminator 
found\n);
+   udf_debug(ISO9660 Volume Descriptor Set 
+ Terminator found\n);
break;
default:
udf_debug(ISO9660 VRS (%u) found\n,
  vsd-structType);
break;
}
-   } else if (!strncmp(vsd-stdIdent, VSD_STD_ID_BEA01, 
VSD_STD_ID_LEN)) {
-   } else if (!strncmp(vsd-stdIdent, VSD_STD_ID_TEA01, 
VSD_STD_ID_LEN)) {
+   } else if (!strncmp(vsd-stdIdent, VSD_STD_ID_BEA01,
+   VSD_STD_ID_LEN))
+   ; /* nothing */
+   else if (!strncmp(vsd-stdIdent, VSD_STD_ID_TEA01,
+   VSD_STD_ID_LEN)) {
brelse(bh);
break;
-   } else if (!strncmp(vsd-stdIdent, VSD_STD_ID_NSR02, 
VSD_STD_ID_LEN)) {
+   } else if (!strncmp(vsd-stdIdent, VSD_STD_ID_NSR02,
+   VSD_STD_ID_LEN))
nsr02 = sector;
-   } else if