]> git.karo-electronics.de Git - karo-tx-linux.git/commit
treewide-use-__printf-not-__attribute__formatprintf-checkpatch-fixes
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 28 Sep 2011 00:50:40 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 4 Oct 2011 07:41:36 +0000 (18:41 +1100)
commit4bda6216bc4fba28e8446595d2555aff4a55f741
tree38803136701db884835716b70d74300b799baa59
parentd930b635a39c03ffb7181d66f0eacd200d787bc9
treewide-use-__printf-not-__attribute__formatprintf-checkpatch-fixes

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 <>
arch/powerpc/boot/ps3.c
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