]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
treewide-use-__printf-not-__attribute__formatprintf-checkpatch-fixes
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Oct 2011 00:43:29 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 14 Oct 2011 06:34:14 +0000 (17:34 +1100)
WARNING: externs should be avoided in .c files
#99: FILE: arch/alpha/boot/misc.c:28:
+extern __printf(1, 2) long srm_printk(const char *, ...);

ERROR: space required after that ';' (ctx:VxV)
#178: FILE: arch/powerpc/boot/ps3.c:39:
+static inline __printf(1, 2) int DBG(const char *fmt, ...) {return 0;}
                                                                     ^

ERROR: "foo* bar" should be "foo *bar"
#225: FILE: arch/s390/include/asm/debug.h:175:
+debug_sprintf_event(debug_info_t* id, int level, char *string, ...);

ERROR: space required after that ',' (ctx:VxV)
#237: FILE: arch/s390/include/asm/debug.h:216:
+debug_sprintf_exception(debug_info_t *id, int level, char *string,...);
                                                                  ^

WARNING: space prohibited between function name and open parenthesis '('
#494: FILE: fs/ext2/ext2.h:139:
+void ext2_error (struct super_block *, const char *, const char *, ...);

WARNING: printk() should include KERN_ facility level
#719: FILE: fs/partitions/ldm.c:63:
+ printk("%s%s(): %pV\n", level, function, &vaf);

WARNING: space prohibited between function name and open parenthesis '('
#721: FILE: fs/partitions/ldm.c:65:
+ va_end (args);

WARNING: space prohibited between function name and open parenthesis '('
#750: FILE: fs/ufs/ufs.h:121:
+void ufs_warning (struct super_block *, const char *, const char *, ...);

WARNING: space prohibited between function name and open parenthesis '('
#752: FILE: fs/ufs/ufs.h:123:
+void ufs_error (struct super_block *, const char *, const char *, ...);

WARNING: space prohibited between function name and open parenthesis '('
#754: FILE: fs/ufs/ufs.h:125:
+void ufs_panic (struct super_block *, const char *, const char *, ...);

WARNING: space prohibited between function name and open parenthesis '('
#1074: FILE: include/linux/ext3_fs.h:941:
+void ext3_error (struct super_block *, const char *, const char *, ...);

WARNING: space prohibited between function name and open parenthesis '('
#1083: FILE: include/linux/ext3_fs.h:944:
+void ext3_abort (struct super_block *, const char *, const char *, ...);

WARNING: space prohibited between function name and open parenthesis '('
#1085: FILE: include/linux/ext3_fs.h:946:
+void ext3_warning (struct super_block *, const char *, const char *, ...);

WARNING: do not add new typedefs
#1178: FILE: include/linux/kdb.h:119:
+typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...);

ERROR: "foo * bar" should be "foo *bar"
#1203: FILE: include/linux/kernel.h:299:
+extern __printf(2, 3) int sprintf(char * buf, const char * fmt, ...);

ERROR: "foo * bar" should be "foo *bar"
#1206: FILE: include/linux/kernel.h:302:
+int snprintf(char * buf, size_t size, const char * fmt, ...);

ERROR: "foo * bar" should be "foo *bar"
#1210: FILE: include/linux/kernel.h:306:
+int scnprintf(char * buf, size_t size, const char * fmt, ...);

total: 6 errors, 11 warnings, 1375 lines checked

./patches/treewide-use-__printf-not-__attribute__formatprintf.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/s390/include/asm/debug.h
fs/ext2/ext2.h
fs/partitions/ldm.c
fs/ufs/ufs.h
include/linux/ext3_fs.h
include/linux/kernel.h

index cea7114ce57dd6d1b77516811e67a116938ff39f..770f6f408bf0be49d6cb630b97a78a1b95c823e7 100644 (file)
@@ -172,7 +172,7 @@ debug_text_event(debug_info_t* id, int level, const char* txt)
  * stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details!
  */
 extern __printf(3, 4) debug_entry_t *
-debug_sprintf_event(debug_info_tid, int level, char *string, ...);
+debug_sprintf_event(debug_info_t *id, int level, char *string, ...);
 
 static inline debug_entry_t*
 debug_exception(debug_info_t* id, int level, void* data, int length)
@@ -213,7 +213,7 @@ debug_text_exception(debug_info_t* id, int level, const char* txt)
  * stored in the s390dbf. See Documentation/s390/s390dbf.txt for more details!
  */
 extern __printf(3, 4) debug_entry_t *
-debug_sprintf_exception(debug_info_t *id, int level, char *string,...);
+debug_sprintf_exception(debug_info_t *id, int level, char *string, ...);
 
 int debug_register_view(debug_info_t* id, struct debug_view* view);
 int debug_unregister_view(debug_info_t* id, struct debug_view* view);
index 4f4921c27ee2d087d2f3afd18394e491a98f301e..9a4e5e206d08cb11cef8470c4921bb6b9a2f1573 100644 (file)
@@ -136,7 +136,7 @@ struct dentry *ext2_get_parent(struct dentry *child);
 
 /* super.c */
 extern __printf(3, 4)
-void ext2_error (struct super_block *, const char *, const char *, ...);
+void ext2_error(struct super_block *, const char *, const char *, ...);
 extern __printf(3, 4)
 void ext2_msg(struct super_block *, const char *, const char *, ...);
 extern void ext2_update_dynamic_rev (struct super_block *sb);
index 8af67234aad38616449b58d09bfda2f51a025654..bd8ae788f689129a1ae6cc75c4687655031a868d 100644 (file)
@@ -62,7 +62,7 @@ void _ldm_printk(const char *level, const char *function, const char *fmt, ...)
 
        printk("%s%s(): %pV\n", level, function, &vaf);
 
-       va_end (args);
+       va_end(args);
 }
 
 /**
index 19d2d1cf6bc1f1223398d2ce43c473db853b8dbd..c26f2bcec264489849fcfa214969c4694a2d3bcf 100644 (file)
@@ -118,11 +118,11 @@ extern const struct file_operations ufs_dir_operations;
 
 /* super.c */
 extern __printf(3, 4)
-void ufs_warning (struct super_block *, const char *, const char *, ...);
+void ufs_warning(struct super_block *, const char *, const char *, ...);
 extern __printf(3, 4)
-void ufs_error (struct super_block *, const char *, const char *, ...);
+void ufs_error(struct super_block *, const char *, const char *, ...);
 extern __printf(3, 4)
-void ufs_panic (struct super_block *, const char *, const char *, ...);
+void ufs_panic(struct super_block *, const char *, const char *, ...);
 
 /* symlink.c */
 extern const struct inode_operations ufs_fast_symlink_inode_operations;
index 430349d7fca674fecaa9fdd220dcee384a82ff9c..dec99116a0e441dd2becf054a65206d02587553a 100644 (file)
@@ -938,12 +938,12 @@ extern int ext3_group_extend(struct super_block *sb,
 
 /* super.c */
 extern __printf(3, 4)
-void ext3_error (struct super_block *, const char *, const char *, ...);
+void ext3_error(struct super_block *, const char *, const char *, ...);
 extern void __ext3_std_error (struct super_block *, const char *, int);
 extern __printf(3, 4)
-void ext3_abort (struct super_block *, const char *, const char *, ...);
+void ext3_abort(struct super_block *, const char *, const char *, ...);
 extern __printf(3, 4)
-void ext3_warning (struct super_block *, const char *, const char *, ...);
+void ext3_warning(struct super_block *, const char *, const char *, ...);
 extern __printf(3, 4)
 void ext3_msg(struct super_block *, const char *, const char *, ...);
 extern void ext3_update_dynamic_rev (struct super_block *sb);
index 3f8a419ccfe651dd32cfdf3d0b19d184aefde94f..e40c950e1d62154e936af89e84bba215cefada91 100644 (file)
@@ -296,14 +296,14 @@ extern long long simple_strtoll(const char *,char **,unsigned int);
 #define strict_strtoull        kstrtoull
 #define strict_strtoll kstrtoll
 
-extern __printf(2, 3) int sprintf(char * buf, const char * fmt, ...);
+extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...);
 extern __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
 extern __printf(3, 4)
-int snprintf(char * buf, size_t size, const char * fmt, ...);
+int snprintf(char *buf, size_t size, const char *fmt, ...);
 extern __printf(3, 0)
 int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
 extern __printf(3, 4)
-int scnprintf(char * buf, size_t size, const char * fmt, ...);
+int scnprintf(char *buf, size_t size, const char *fmt, ...);
 extern __printf(3, 0)
 int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
 extern __printf(2, 3)