diff options
| author | Joe Perches <joe@perches.com> | 2011-10-31 20:11:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:54 -0400 |
| commit | b9075fa968a0a4347aef35e235e2995c0e57dddd (patch) | |
| tree | cf9f9716784e790d8a43339653256d9cf9178ff3 /include/linux | |
| parent | ae29bc92da01a2e9d278a9a58c3b307d41cc0254 (diff) | |
treewide: use __printf not __attribute__((format(printf,...)))
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.
Done via script and a little typing.
$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'
[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/audit.h | 11 | ||||
| -rw-r--r-- | include/linux/blktrace_api.h | 2 | ||||
| -rw-r--r-- | include/linux/device.h | 110 | ||||
| -rw-r--r-- | include/linux/dynamic_debug.h | 19 | ||||
| -rw-r--r-- | include/linux/ext3_fs.h | 16 | ||||
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/fscache-cache.h | 8 | ||||
| -rw-r--r-- | include/linux/gameport.h | 8 | ||||
| -rw-r--r-- | include/linux/kallsyms.h | 5 | ||||
| -rw-r--r-- | include/linux/kdb.h | 9 | ||||
| -rw-r--r-- | include/linux/kernel.h | 44 | ||||
| -rw-r--r-- | include/linux/kexec.h | 4 | ||||
| -rw-r--r-- | include/linux/kmod.h | 4 | ||||
| -rw-r--r-- | include/linux/kobject.h | 26 | ||||
| -rw-r--r-- | include/linux/kthread.h | 4 | ||||
| -rw-r--r-- | include/linux/libata.h | 18 | ||||
| -rw-r--r-- | include/linux/mmiotrace.h | 8 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 34 | ||||
| -rw-r--r-- | include/linux/printk.h | 12 | ||||
| -rw-r--r-- | include/linux/quotaops.h | 2 | ||||
| -rw-r--r-- | include/linux/seq_file.h | 3 | ||||
| -rw-r--r-- | include/linux/trace_seq.h | 8 |
22 files changed, 167 insertions, 192 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 0c8006129fb2..2f81c6f3b630 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -584,14 +584,13 @@ extern int audit_signals; | |||
| 584 | #ifdef CONFIG_AUDIT | 584 | #ifdef CONFIG_AUDIT |
| 585 | /* These are defined in audit.c */ | 585 | /* These are defined in audit.c */ |
| 586 | /* Public API */ | 586 | /* Public API */ |
| 587 | extern void audit_log(struct audit_context *ctx, gfp_t gfp_mask, | 587 | extern __printf(4, 5) |
| 588 | int type, const char *fmt, ...) | 588 | void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, |
| 589 | __attribute__((format(printf,4,5))); | 589 | const char *fmt, ...); |
| 590 | 590 | ||
| 591 | extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type); | 591 | extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type); |
| 592 | extern void audit_log_format(struct audit_buffer *ab, | 592 | extern __printf(2, 3) |
| 593 | const char *fmt, ...) | 593 | void audit_log_format(struct audit_buffer *ab, const char *fmt, ...); |
| 594 | __attribute__((format(printf,2,3))); | ||
| 595 | extern void audit_log_end(struct audit_buffer *ab); | 594 | extern void audit_log_end(struct audit_buffer *ab); |
| 596 | extern int audit_string_contains_control(const char *string, | 595 | extern int audit_string_contains_control(const char *string, |
| 597 | size_t len); | 596 | size_t len); |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 8e9e4bc6d73b..4d1a0748eaf8 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
| @@ -170,7 +170,7 @@ extern void blk_trace_shutdown(struct request_queue *); | |||
| 170 | extern int do_blk_trace_setup(struct request_queue *q, char *name, | 170 | extern int do_blk_trace_setup(struct request_queue *q, char *name, |
| 171 | dev_t dev, struct block_device *bdev, | 171 | dev_t dev, struct block_device *bdev, |
| 172 | struct blk_user_trace_setup *buts); | 172 | struct blk_user_trace_setup *buts); |
| 173 | extern __attribute__((format(printf, 2, 3))) | 173 | extern __printf(2, 3) |
| 174 | void __trace_note_message(struct blk_trace *, const char *fmt, ...); | 174 | void __trace_note_message(struct blk_trace *, const char *fmt, ...); |
| 175 | 175 | ||
| 176 | /** | 176 | /** |
diff --git a/include/linux/device.h b/include/linux/device.h index 85e78fc7d7fd..e88abeecfadf 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -622,8 +622,8 @@ static inline const char *dev_name(const struct device *dev) | |||
| 622 | return kobject_name(&dev->kobj); | 622 | return kobject_name(&dev->kobj); |
| 623 | } | 623 | } |
| 624 | 624 | ||
| 625 | extern int dev_set_name(struct device *dev, const char *name, ...) | 625 | extern __printf(2, 3) |
| 626 | __attribute__((format(printf, 2, 3))); | 626 | int dev_set_name(struct device *dev, const char *name, ...); |
| 627 | 627 | ||
| 628 | #ifdef CONFIG_NUMA | 628 | #ifdef CONFIG_NUMA |
| 629 | static inline int dev_to_node(struct device *dev) | 629 | static inline int dev_to_node(struct device *dev) |
| @@ -753,10 +753,10 @@ extern struct device *device_create_vargs(struct class *cls, | |||
| 753 | void *drvdata, | 753 | void *drvdata, |
| 754 | const char *fmt, | 754 | const char *fmt, |
| 755 | va_list vargs); | 755 | va_list vargs); |
| 756 | extern struct device *device_create(struct class *cls, struct device *parent, | 756 | extern __printf(5, 6) |
| 757 | dev_t devt, void *drvdata, | 757 | struct device *device_create(struct class *cls, struct device *parent, |
| 758 | const char *fmt, ...) | 758 | dev_t devt, void *drvdata, |
| 759 | __attribute__((format(printf, 5, 6))); | 759 | const char *fmt, ...); |
| 760 | extern void device_destroy(struct class *cls, dev_t devt); | 760 | extern void device_destroy(struct class *cls, dev_t devt); |
| 761 | 761 | ||
| 762 | /* | 762 | /* |
| @@ -800,64 +800,56 @@ extern const char *dev_driver_string(const struct device *dev); | |||
| 800 | 800 | ||
| 801 | extern int __dev_printk(const char *level, const struct device *dev, | 801 | extern int __dev_printk(const char *level, const struct device *dev, |
| 802 | struct va_format *vaf); | 802 | struct va_format *vaf); |
| 803 | extern int dev_printk(const char *level, const struct device *dev, | 803 | extern __printf(3, 4) |
| 804 | const char *fmt, ...) | 804 | int dev_printk(const char *level, const struct device *dev, |
| 805 | __attribute__ ((format (printf, 3, 4))); | 805 | const char *fmt, ...) |
| 806 | extern int dev_emerg(const struct device *dev, const char *fmt, ...) | 806 | ; |
| 807 | __attribute__ ((format (printf, 2, 3))); | 807 | extern __printf(2, 3) |
| 808 | extern int dev_alert(const struct device *dev, const char *fmt, ...) | 808 | int dev_emerg(const struct device *dev, const char *fmt, ...); |
| 809 | __attribute__ ((format (printf, 2, 3))); | 809 | extern __printf(2, 3) |
| 810 | extern int dev_crit(const struct device *dev, const char *fmt, ...) | 810 | int dev_alert(const struct device *dev, const char *fmt, ...); |
| 811 | __attribute__ ((format (printf, 2, 3))); | 811 | extern __printf(2, 3) |
| 812 | extern int dev_err(const struct device *dev, const char *fmt, ...) | 812 | int dev_crit(const struct device *dev, const char *fmt, ...); |
| 813 | __attribute__ ((format (printf, 2, 3))); | 813 | extern __printf(2, 3) |
| 814 | extern int dev_warn(const struct device *dev, const char *fmt, ...) | 814 | int dev_err(const struct device *dev, const char *fmt, ...); |
| 815 | __attribute__ ((format (printf, 2, 3))); | 815 | extern __printf(2, 3) |
| 816 | extern int dev_notice(const struct device *dev, const char *fmt, ...) | 816 | int dev_warn(const struct device *dev, const char *fmt, ...); |
| 817 | __attribute__ ((format (printf, 2, 3))); | 817 | extern __printf(2, 3) |
| 818 | extern int _dev_info(const struct device *dev, const char *fmt, ...) | 818 | int dev_notice(const struct device *dev, const char *fmt, ...); |
| 819 | __attribute__ ((format (printf, 2, 3))); | 819 | extern __printf(2, 3) |
| 820 | int _dev_info(const struct device *dev, const char *fmt, ...); | ||
| 820 | 821 | ||
| 821 | #else | 822 | #else |
| 822 | 823 | ||
| 823 | static inline int __dev_printk(const char *level, const struct device *dev, | 824 | static inline int __dev_printk(const char *level, const struct device *dev, |
| 824 | struct va_format *vaf) | 825 | struct va_format *vaf) |
| 825 | { return 0; } | 826 | { return 0; } |
| 826 | static inline int dev_printk(const char *level, const struct device *dev, | 827 | static inline __printf(3, 4) |
| 827 | const char *fmt, ...) | 828 | int dev_printk(const char *level, const struct device *dev, |
| 828 | __attribute__ ((format (printf, 3, 4))); | 829 | const char *fmt, ...) |
| 829 | static inline int dev_printk(const char *level, const struct device *dev, | 830 | { return 0; } |
| 830 | const char *fmt, ...) | 831 | |
| 831 | { return 0; } | 832 | static inline __printf(2, 3) |
| 832 | 833 | int dev_emerg(const struct device *dev, const char *fmt, ...) | |
| 833 | static inline int dev_emerg(const struct device *dev, const char *fmt, ...) | 834 | { return 0; } |
| 834 | __attribute__ ((format (printf, 2, 3))); | 835 | static inline __printf(2, 3) |
| 835 | static inline int dev_emerg(const struct device *dev, const char *fmt, ...) | 836 | int dev_crit(const struct device *dev, const char *fmt, ...) |
| 836 | { return 0; } | 837 | { return 0; } |
| 837 | static inline int dev_crit(const struct device *dev, const char *fmt, ...) | 838 | static inline __printf(2, 3) |
| 838 | __attribute__ ((format (printf, 2, 3))); | 839 | int dev_alert(const struct device *dev, const char *fmt, ...) |
| 839 | static inline int dev_crit(const struct device *dev, const char *fmt, ...) | 840 | { return 0; } |
| 840 | { return 0; } | 841 | static inline __printf(2, 3) |
| 841 | static inline int dev_alert(const struct device *dev, const char *fmt, ...) | 842 | int dev_err(const struct device *dev, const char *fmt, ...) |
| 842 | __attribute__ ((format (printf, 2, 3))); | 843 | { return 0; } |
| 843 | static inline int dev_alert(const struct device *dev, const char *fmt, ...) | 844 | static inline __printf(2, 3) |
| 844 | { return 0; } | 845 | int dev_warn(const struct device *dev, const char *fmt, ...) |
| 845 | static inline int dev_err(const struct device *dev, const char *fmt, ...) | 846 | { return 0; } |
| 846 | __attribute__ ((format (printf, 2, 3))); | 847 | static inline __printf(2, 3) |
| 847 | static inline int dev_err(const struct device *dev, const char *fmt, ...) | 848 | int dev_notice(const struct device *dev, const char *fmt, ...) |
| 848 | { return 0; } | 849 | { return 0; } |
| 849 | static inline int dev_warn(const struct device *dev, const char *fmt, ...) | 850 | static inline __printf(2, 3) |
| 850 | __attribute__ ((format (printf, 2, 3))); | 851 | int _dev_info(const struct device *dev, const char *fmt, ...) |
| 851 | static inline int dev_warn(const struct device *dev, const char *fmt, ...) | 852 | { return 0; } |
| 852 | { return 0; } | ||
| 853 | static inline int dev_notice(const struct device *dev, const char *fmt, ...) | ||
| 854 | __attribute__ ((format (printf, 2, 3))); | ||
| 855 | static inline int dev_notice(const struct device *dev, const char *fmt, ...) | ||
| 856 | { return 0; } | ||
| 857 | static inline int _dev_info(const struct device *dev, const char *fmt, ...) | ||
| 858 | __attribute__ ((format (printf, 2, 3))); | ||
| 859 | static inline int _dev_info(const struct device *dev, const char *fmt, ...) | ||
| 860 | { return 0; } | ||
| 861 | 853 | ||
| 862 | #endif | 854 | #endif |
| 863 | 855 | ||
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 13aae8087b56..0564e3c39882 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
| @@ -37,22 +37,21 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, | |||
| 37 | 37 | ||
| 38 | #if defined(CONFIG_DYNAMIC_DEBUG) | 38 | #if defined(CONFIG_DYNAMIC_DEBUG) |
| 39 | extern int ddebug_remove_module(const char *mod_name); | 39 | extern int ddebug_remove_module(const char *mod_name); |
| 40 | extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...) | 40 | extern __printf(2, 3) |
| 41 | __attribute__ ((format (printf, 2, 3))); | 41 | int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); |
| 42 | 42 | ||
| 43 | struct device; | 43 | struct device; |
| 44 | 44 | ||
| 45 | extern int __dynamic_dev_dbg(struct _ddebug *descriptor, | 45 | extern __printf(3, 4) |
| 46 | const struct device *dev, | 46 | int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev, |
| 47 | const char *fmt, ...) | 47 | const char *fmt, ...); |
| 48 | __attribute__ ((format (printf, 3, 4))); | ||
| 49 | 48 | ||
| 50 | struct net_device; | 49 | struct net_device; |
| 51 | 50 | ||
| 52 | extern int __dynamic_netdev_dbg(struct _ddebug *descriptor, | 51 | extern __printf(3, 4) |
| 53 | const struct net_device *dev, | 52 | int __dynamic_netdev_dbg(struct _ddebug *descriptor, |
| 54 | const char *fmt, ...) | 53 | const struct net_device *dev, |
| 55 | __attribute__ ((format (printf, 3, 4))); | 54 | const char *fmt, ...); |
| 56 | 55 | ||
| 57 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ | 56 | #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \ |
| 58 | static struct _ddebug __used __aligned(8) \ | 57 | static struct _ddebug __used __aligned(8) \ |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 67a803aee619..81965cce6bfa 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -937,15 +937,15 @@ extern int ext3_group_extend(struct super_block *sb, | |||
| 937 | ext3_fsblk_t n_blocks_count); | 937 | ext3_fsblk_t n_blocks_count); |
| 938 | 938 | ||
| 939 | /* super.c */ | 939 | /* super.c */ |
| 940 | extern void ext3_error (struct super_block *, const char *, const char *, ...) | 940 | extern __printf(3, 4) |
| 941 | __attribute__ ((format (printf, 3, 4))); | 941 | void ext3_error(struct super_block *, const char *, const char *, ...); |
| 942 | extern void __ext3_std_error (struct super_block *, const char *, int); | 942 | extern void __ext3_std_error (struct super_block *, const char *, int); |
| 943 | extern void ext3_abort (struct super_block *, const char *, const char *, ...) | 943 | extern __printf(3, 4) |
| 944 | __attribute__ ((format (printf, 3, 4))); | 944 | void ext3_abort(struct super_block *, const char *, const char *, ...); |
| 945 | extern void ext3_warning (struct super_block *, const char *, const char *, ...) | 945 | extern __printf(3, 4) |
| 946 | __attribute__ ((format (printf, 3, 4))); | 946 | void ext3_warning(struct super_block *, const char *, const char *, ...); |
| 947 | extern void ext3_msg(struct super_block *, const char *, const char *, ...) | 947 | extern __printf(3, 4) |
| 948 | __attribute__ ((format (printf, 3, 4))); | 948 | void ext3_msg(struct super_block *, const char *, const char *, ...); |
| 949 | extern void ext3_update_dynamic_rev (struct super_block *sb); | 949 | extern void ext3_update_dynamic_rev (struct super_block *sb); |
| 950 | 950 | ||
| 951 | #define ext3_std_error(sb, errno) \ | 951 | #define ext3_std_error(sb, errno) \ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 87b4c6b9692d..7a049fd2aa4c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2635,8 +2635,8 @@ static const struct file_operations __fops = { \ | |||
| 2635 | .llseek = generic_file_llseek, \ | 2635 | .llseek = generic_file_llseek, \ |
| 2636 | }; | 2636 | }; |
| 2637 | 2637 | ||
| 2638 | static inline void __attribute__((format(printf, 1, 2))) | 2638 | static inline __printf(1, 2) |
| 2639 | __simple_attr_check_format(const char *fmt, ...) | 2639 | void __simple_attr_check_format(const char *fmt, ...) |
| 2640 | { | 2640 | { |
| 2641 | /* don't do anything, just let the compiler check the arguments; */ | 2641 | /* don't do anything, just let the compiler check the arguments; */ |
| 2642 | } | 2642 | } |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index af095b54502e..ce31408b1e47 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
| @@ -492,10 +492,10 @@ static inline void fscache_end_io(struct fscache_retrieval *op, | |||
| 492 | /* | 492 | /* |
| 493 | * out-of-line cache backend functions | 493 | * out-of-line cache backend functions |
| 494 | */ | 494 | */ |
| 495 | extern void fscache_init_cache(struct fscache_cache *cache, | 495 | extern __printf(3, 4) |
| 496 | const struct fscache_cache_ops *ops, | 496 | void fscache_init_cache(struct fscache_cache *cache, |
| 497 | const char *idfmt, | 497 | const struct fscache_cache_ops *ops, |
| 498 | ...) __attribute__ ((format (printf, 3, 4))); | 498 | const char *idfmt, ...); |
| 499 | 499 | ||
| 500 | extern int fscache_add_cache(struct fscache_cache *cache, | 500 | extern int fscache_add_cache(struct fscache_cache *cache, |
| 501 | struct fscache_object *fsdef, | 501 | struct fscache_object *fsdef, |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index b65a6f472775..069ee4139105 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
| @@ -78,8 +78,8 @@ static inline void gameport_register_port(struct gameport *gameport) | |||
| 78 | 78 | ||
| 79 | void gameport_unregister_port(struct gameport *gameport); | 79 | void gameport_unregister_port(struct gameport *gameport); |
| 80 | 80 | ||
| 81 | void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) | 81 | __printf(2, 3) |
| 82 | __attribute__ ((format (printf, 2, 3))); | 82 | void gameport_set_phys(struct gameport *gameport, const char *fmt, ...); |
| 83 | 83 | ||
| 84 | #else | 84 | #else |
| 85 | 85 | ||
| @@ -93,8 +93,8 @@ static inline void gameport_unregister_port(struct gameport *gameport) | |||
| 93 | return; | 93 | return; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | static inline void gameport_set_phys(struct gameport *gameport, | 96 | static inline __printf(2, 3) |
| 97 | const char *fmt, ...) | 97 | void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) |
| 98 | { | 98 | { |
| 99 | return; | 99 | return; |
| 100 | } | 100 | } |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 0df513b7a9f8..387571959dd9 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
| @@ -101,9 +101,8 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u | |||
| 101 | #endif /*CONFIG_KALLSYMS*/ | 101 | #endif /*CONFIG_KALLSYMS*/ |
| 102 | 102 | ||
| 103 | /* This macro allows us to keep printk typechecking */ | 103 | /* This macro allows us to keep printk typechecking */ |
| 104 | static void __check_printsym_format(const char *fmt, ...) | 104 | static __printf(1, 2) |
| 105 | __attribute__((format(printf,1,2))); | 105 | void __check_printsym_format(const char *fmt, ...) |
| 106 | static inline void __check_printsym_format(const char *fmt, ...) | ||
| 107 | { | 106 | { |
| 108 | } | 107 | } |
| 109 | 108 | ||
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 529d9a0c75a5..064725854db8 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h | |||
| @@ -114,12 +114,9 @@ typedef enum { | |||
| 114 | } kdb_reason_t; | 114 | } kdb_reason_t; |
| 115 | 115 | ||
| 116 | extern int kdb_trap_printk; | 116 | extern int kdb_trap_printk; |
| 117 | extern int vkdb_printf(const char *fmt, va_list args) | 117 | extern __printf(1, 0) int vkdb_printf(const char *fmt, va_list args); |
| 118 | __attribute__ ((format (printf, 1, 0))); | 118 | extern __printf(1, 2) int kdb_printf(const char *, ...); |
| 119 | extern int kdb_printf(const char *, ...) | 119 | typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...); |
| 120 | __attribute__ ((format (printf, 1, 2))); | ||
| 121 | typedef int (*kdb_printf_t)(const char *, ...) | ||
| 122 | __attribute__ ((format (printf, 1, 2))); | ||
| 123 | 120 | ||
| 124 | extern void kdb_init(int level); | 121 | extern void kdb_init(int level); |
| 125 | 122 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 8eefcf7e95eb..e40c950e1d62 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -296,20 +296,18 @@ extern long long simple_strtoll(const char *,char **,unsigned int); | |||
| 296 | #define strict_strtoull kstrtoull | 296 | #define strict_strtoull kstrtoull |
| 297 | #define strict_strtoll kstrtoll | 297 | #define strict_strtoll kstrtoll |
| 298 | 298 | ||
| 299 | extern int sprintf(char * buf, const char * fmt, ...) | 299 | extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...); |
| 300 | __attribute__ ((format (printf, 2, 3))); | 300 | extern __printf(2, 0) int vsprintf(char *buf, const char *, va_list); |
| 301 | extern int vsprintf(char *buf, const char *, va_list) | 301 | extern __printf(3, 4) |
| 302 | __attribute__ ((format (printf, 2, 0))); | 302 | int snprintf(char *buf, size_t size, const char *fmt, ...); |
| 303 | extern int snprintf(char * buf, size_t size, const char * fmt, ...) | 303 | extern __printf(3, 0) |
| 304 | __attribute__ ((format (printf, 3, 4))); | 304 | int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); |
| 305 | extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | 305 | extern __printf(3, 4) |
| 306 | __attribute__ ((format (printf, 3, 0))); | 306 | int scnprintf(char *buf, size_t size, const char *fmt, ...); |
| 307 | extern int scnprintf(char * buf, size_t size, const char * fmt, ...) | 307 | extern __printf(3, 0) |
| 308 | __attribute__ ((format (printf, 3, 4))); | 308 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); |
| 309 | extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) | 309 | extern __printf(2, 3) |
| 310 | __attribute__ ((format (printf, 3, 0))); | 310 | char *kasprintf(gfp_t gfp, const char *fmt, ...); |
| 311 | extern char *kasprintf(gfp_t gfp, const char *fmt, ...) | ||
| 312 | __attribute__ ((format (printf, 2, 3))); | ||
| 313 | extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); | 311 | extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); |
| 314 | 312 | ||
| 315 | extern int sscanf(const char *, const char *, ...) | 313 | extern int sscanf(const char *, const char *, ...) |
| @@ -427,8 +425,8 @@ extern void tracing_start(void); | |||
| 427 | extern void tracing_stop(void); | 425 | extern void tracing_stop(void); |
| 428 | extern void ftrace_off_permanent(void); | 426 | extern void ftrace_off_permanent(void); |
| 429 | 427 | ||
| 430 | static inline void __attribute__ ((format (printf, 1, 2))) | 428 | static inline __printf(1, 2) |
| 431 | ____trace_printk_check_format(const char *fmt, ...) | 429 | void ____trace_printk_check_format(const char *fmt, ...) |
| 432 | { | 430 | { |
| 433 | } | 431 | } |
| 434 | #define __trace_printk_check_format(fmt, args...) \ | 432 | #define __trace_printk_check_format(fmt, args...) \ |
| @@ -467,13 +465,11 @@ do { \ | |||
| 467 | __trace_printk(_THIS_IP_, fmt, ##args); \ | 465 | __trace_printk(_THIS_IP_, fmt, ##args); \ |
| 468 | } while (0) | 466 | } while (0) |
| 469 | 467 | ||
| 470 | extern int | 468 | extern __printf(2, 3) |
| 471 | __trace_bprintk(unsigned long ip, const char *fmt, ...) | 469 | int __trace_bprintk(unsigned long ip, const char *fmt, ...); |
| 472 | __attribute__ ((format (printf, 2, 3))); | ||
| 473 | 470 | ||
| 474 | extern int | 471 | extern __printf(2, 3) |
| 475 | __trace_printk(unsigned long ip, const char *fmt, ...) | 472 | int __trace_printk(unsigned long ip, const char *fmt, ...); |
| 476 | __attribute__ ((format (printf, 2, 3))); | ||
| 477 | 473 | ||
| 478 | extern void trace_dump_stack(void); | 474 | extern void trace_dump_stack(void); |
| 479 | 475 | ||
| @@ -502,8 +498,8 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); | |||
| 502 | 498 | ||
| 503 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); | 499 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); |
| 504 | #else | 500 | #else |
| 505 | static inline int | 501 | static inline __printf(1, 2) |
| 506 | trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); | 502 | int trace_printk(const char *fmt, ...); |
| 507 | 503 | ||
| 508 | static inline void tracing_start(void) { } | 504 | static inline void tracing_start(void) { } |
| 509 | static inline void tracing_stop(void) { } | 505 | static inline void tracing_stop(void) { } |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index c2478a342cd7..8944ebe7963e 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -130,8 +130,8 @@ int kexec_should_crash(struct task_struct *); | |||
| 130 | void crash_save_cpu(struct pt_regs *regs, int cpu); | 130 | void crash_save_cpu(struct pt_regs *regs, int cpu); |
| 131 | void crash_save_vmcoreinfo(void); | 131 | void crash_save_vmcoreinfo(void); |
| 132 | void arch_crash_save_vmcoreinfo(void); | 132 | void arch_crash_save_vmcoreinfo(void); |
| 133 | void vmcoreinfo_append_str(const char *fmt, ...) | 133 | __printf(1, 2) |
| 134 | __attribute__ ((format (printf, 1, 2))); | 134 | void vmcoreinfo_append_str(const char *fmt, ...); |
| 135 | unsigned long paddr_vmcoreinfo_note(void); | 135 | unsigned long paddr_vmcoreinfo_note(void); |
| 136 | 136 | ||
| 137 | #define VMCOREINFO_OSRELEASE(value) \ | 137 | #define VMCOREINFO_OSRELEASE(value) \ |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 0da38cf7db7b..b16f65390734 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
| @@ -32,8 +32,8 @@ | |||
| 32 | extern char modprobe_path[]; /* for sysctl */ | 32 | extern char modprobe_path[]; /* for sysctl */ |
| 33 | /* modprobe exit status on success, -ve on error. Return value | 33 | /* modprobe exit status on success, -ve on error. Return value |
| 34 | * usually useless though. */ | 34 | * usually useless though. */ |
| 35 | extern int __request_module(bool wait, const char *name, ...) \ | 35 | extern __printf(2, 3) |
| 36 | __attribute__((format(printf, 2, 3))); | 36 | int __request_module(bool wait, const char *name, ...); |
| 37 | #define request_module(mod...) __request_module(true, mod) | 37 | #define request_module(mod...) __request_module(true, mod) |
| 38 | #define request_module_nowait(mod...) __request_module(false, mod) | 38 | #define request_module_nowait(mod...) __request_module(false, mod) |
| 39 | #define try_then_request_module(x, mod...) \ | 39 | #define try_then_request_module(x, mod...) \ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 668729cc0fe9..ad81e1c51487 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -72,8 +72,8 @@ struct kobject { | |||
| 72 | unsigned int uevent_suppress:1; | 72 | unsigned int uevent_suppress:1; |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) | 75 | extern __printf(2, 3) |
| 76 | __attribute__((format(printf, 2, 3))); | 76 | int kobject_set_name(struct kobject *kobj, const char *name, ...); |
| 77 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | 77 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, |
| 78 | va_list vargs); | 78 | va_list vargs); |
| 79 | 79 | ||
| @@ -83,15 +83,13 @@ static inline const char *kobject_name(const struct kobject *kobj) | |||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); | 85 | extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); |
| 86 | extern int __must_check kobject_add(struct kobject *kobj, | 86 | extern __printf(3, 4) __must_check |
| 87 | struct kobject *parent, | 87 | int kobject_add(struct kobject *kobj, struct kobject *parent, |
| 88 | const char *fmt, ...) | 88 | const char *fmt, ...); |
| 89 | __attribute__((format(printf, 3, 4))); | 89 | extern __printf(4, 5) __must_check |
| 90 | extern int __must_check kobject_init_and_add(struct kobject *kobj, | 90 | int kobject_init_and_add(struct kobject *kobj, |
| 91 | struct kobj_type *ktype, | 91 | struct kobj_type *ktype, struct kobject *parent, |
| 92 | struct kobject *parent, | 92 | const char *fmt, ...); |
| 93 | const char *fmt, ...) | ||
| 94 | __attribute__((format(printf, 4, 5))); | ||
| 95 | 93 | ||
| 96 | extern void kobject_del(struct kobject *kobj); | 94 | extern void kobject_del(struct kobject *kobj); |
| 97 | 95 | ||
| @@ -212,8 +210,8 @@ int kobject_uevent(struct kobject *kobj, enum kobject_action action); | |||
| 212 | int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | 210 | int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, |
| 213 | char *envp[]); | 211 | char *envp[]); |
| 214 | 212 | ||
| 215 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 213 | __printf(2, 3) |
| 216 | __attribute__((format (printf, 2, 3))); | 214 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...); |
| 217 | 215 | ||
| 218 | int kobject_action_type(const char *buf, size_t count, | 216 | int kobject_action_type(const char *buf, size_t count, |
| 219 | enum kobject_action *type); | 217 | enum kobject_action *type); |
| @@ -226,7 +224,7 @@ static inline int kobject_uevent_env(struct kobject *kobj, | |||
| 226 | char *envp[]) | 224 | char *envp[]) |
| 227 | { return 0; } | 225 | { return 0; } |
| 228 | 226 | ||
| 229 | static inline __attribute__((format(printf, 2, 3))) | 227 | static inline __printf(2, 3) |
| 230 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 228 | int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) |
| 231 | { return 0; } | 229 | { return 0; } |
| 232 | 230 | ||
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 1e923e5e88e8..5cac19b3a266 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -4,11 +4,11 @@ | |||
| 4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | 6 | ||
| 7 | __printf(4, 5) | ||
| 7 | struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), | 8 | struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), |
| 8 | void *data, | 9 | void *data, |
| 9 | int node, | 10 | int node, |
| 10 | const char namefmt[], ...) | 11 | const char namefmt[], ...); |
| 11 | __attribute__((format(printf, 4, 5))); | ||
| 12 | 12 | ||
| 13 | #define kthread_create(threadfn, data, namefmt, arg...) \ | 13 | #define kthread_create(threadfn, data, namefmt, arg...) \ |
| 14 | kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) | 14 | kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 23fa829bf7a3..cafc09a64fe4 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -1256,13 +1256,13 @@ static inline int sata_srst_pmp(struct ata_link *link) | |||
| 1256 | /* | 1256 | /* |
| 1257 | * printk helpers | 1257 | * printk helpers |
| 1258 | */ | 1258 | */ |
| 1259 | __attribute__((format (printf, 3, 4))) | 1259 | __printf(3, 4) |
| 1260 | int ata_port_printk(const struct ata_port *ap, const char *level, | 1260 | int ata_port_printk(const struct ata_port *ap, const char *level, |
| 1261 | const char *fmt, ...); | 1261 | const char *fmt, ...); |
| 1262 | __attribute__((format (printf, 3, 4))) | 1262 | __printf(3, 4) |
| 1263 | int ata_link_printk(const struct ata_link *link, const char *level, | 1263 | int ata_link_printk(const struct ata_link *link, const char *level, |
| 1264 | const char *fmt, ...); | 1264 | const char *fmt, ...); |
| 1265 | __attribute__((format (printf, 3, 4))) | 1265 | __printf(3, 4) |
| 1266 | int ata_dev_printk(const struct ata_device *dev, const char *level, | 1266 | int ata_dev_printk(const struct ata_device *dev, const char *level, |
| 1267 | const char *fmt, ...); | 1267 | const char *fmt, ...); |
| 1268 | 1268 | ||
| @@ -1304,10 +1304,10 @@ void ata_print_version(const struct device *dev, const char *version); | |||
| 1304 | /* | 1304 | /* |
| 1305 | * ata_eh_info helpers | 1305 | * ata_eh_info helpers |
| 1306 | */ | 1306 | */ |
| 1307 | extern void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) | 1307 | extern __printf(2, 3) |
| 1308 | __attribute__ ((format (printf, 2, 3))); | 1308 | void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...); |
| 1309 | extern void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) | 1309 | extern __printf(2, 3) |
| 1310 | __attribute__ ((format (printf, 2, 3))); | 1310 | void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...); |
| 1311 | extern void ata_ehi_clear_desc(struct ata_eh_info *ehi); | 1311 | extern void ata_ehi_clear_desc(struct ata_eh_info *ehi); |
| 1312 | 1312 | ||
| 1313 | static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) | 1313 | static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) |
| @@ -1321,8 +1321,8 @@ static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) | |||
| 1321 | /* | 1321 | /* |
| 1322 | * port description helpers | 1322 | * port description helpers |
| 1323 | */ | 1323 | */ |
| 1324 | extern void ata_port_desc(struct ata_port *ap, const char *fmt, ...) | 1324 | extern __printf(2, 3) |
| 1325 | __attribute__ ((format (printf, 2, 3))); | 1325 | void ata_port_desc(struct ata_port *ap, const char *fmt, ...); |
| 1326 | #ifdef CONFIG_PCI | 1326 | #ifdef CONFIG_PCI |
| 1327 | extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset, | 1327 | extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset, |
| 1328 | const char *name); | 1328 | const char *name); |
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h index 97491f78b08c..c5d52780d6a0 100644 --- a/include/linux/mmiotrace.h +++ b/include/linux/mmiotrace.h | |||
| @@ -49,8 +49,7 @@ extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size, | |||
| 49 | extern void mmiotrace_iounmap(volatile void __iomem *addr); | 49 | extern void mmiotrace_iounmap(volatile void __iomem *addr); |
| 50 | 50 | ||
| 51 | /* For anyone to insert markers. Remember trailing newline. */ | 51 | /* For anyone to insert markers. Remember trailing newline. */ |
| 52 | extern int mmiotrace_printk(const char *fmt, ...) | 52 | extern __printf(1, 2) int mmiotrace_printk(const char *fmt, ...); |
| 53 | __attribute__ ((format (printf, 1, 2))); | ||
| 54 | #else /* !CONFIG_MMIOTRACE: */ | 53 | #else /* !CONFIG_MMIOTRACE: */ |
| 55 | static inline int is_kmmio_active(void) | 54 | static inline int is_kmmio_active(void) |
| 56 | { | 55 | { |
| @@ -71,10 +70,7 @@ static inline void mmiotrace_iounmap(volatile void __iomem *addr) | |||
| 71 | { | 70 | { |
| 72 | } | 71 | } |
| 73 | 72 | ||
| 74 | static inline int mmiotrace_printk(const char *fmt, ...) | 73 | static inline __printf(1, 2) int mmiotrace_printk(const char *fmt, ...) |
| 75 | __attribute__ ((format (printf, 1, 0))); | ||
| 76 | |||
| 77 | static inline int mmiotrace_printk(const char *fmt, ...) | ||
| 78 | { | 74 | { |
| 79 | return 0; | 75 | return 0; |
| 80 | } | 76 | } |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index df1c836e6948..cbeb5867cff7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2622,23 +2622,23 @@ static inline const char *netdev_name(const struct net_device *dev) | |||
| 2622 | extern int __netdev_printk(const char *level, const struct net_device *dev, | 2622 | extern int __netdev_printk(const char *level, const struct net_device *dev, |
| 2623 | struct va_format *vaf); | 2623 | struct va_format *vaf); |
| 2624 | 2624 | ||
| 2625 | extern int netdev_printk(const char *level, const struct net_device *dev, | 2625 | extern __printf(3, 4) |
| 2626 | const char *format, ...) | 2626 | int netdev_printk(const char *level, const struct net_device *dev, |
| 2627 | __attribute__ ((format (printf, 3, 4))); | 2627 | const char *format, ...); |
| 2628 | extern int netdev_emerg(const struct net_device *dev, const char *format, ...) | 2628 | extern __printf(2, 3) |
| 2629 | __attribute__ ((format (printf, 2, 3))); | 2629 | int netdev_emerg(const struct net_device *dev, const char *format, ...); |
| 2630 | extern int netdev_alert(const struct net_device *dev, const char *format, ...) | 2630 | extern __printf(2, 3) |
| 2631 | __attribute__ ((format (printf, 2, 3))); | 2631 | int netdev_alert(const struct net_device *dev, const char *format, ...); |
| 2632 | extern int netdev_crit(const struct net_device *dev, const char *format, ...) | 2632 | extern __printf(2, 3) |
| 2633 | __attribute__ ((format (printf, 2, 3))); | 2633 | int netdev_crit(const struct net_device *dev, const char *format, ...); |
| 2634 | extern int netdev_err(const struct net_device *dev, const char *format, ...) | 2634 | extern __printf(2, 3) |
| 2635 | __attribute__ ((format (printf, 2, 3))); | 2635 | int netdev_err(const struct net_device *dev, const char *format, ...); |
| 2636 | extern int netdev_warn(const struct net_device *dev, const char *format, ...) | 2636 | extern __printf(2, 3) |
| 2637 | __attribute__ ((format (printf, 2, 3))); | 2637 | int netdev_warn(const struct net_device *dev, const char *format, ...); |
| 2638 | extern int netdev_notice(const struct net_device *dev, const char *format, ...) | 2638 | extern __printf(2, 3) |
| 2639 | __attribute__ ((format (printf, 2, 3))); | 2639 | int netdev_notice(const struct net_device *dev, const char *format, ...); |
| 2640 | extern int netdev_info(const struct net_device *dev, const char *format, ...) | 2640 | extern __printf(2, 3) |
| 2641 | __attribute__ ((format (printf, 2, 3))); | 2641 | int netdev_info(const struct net_device *dev, const char *format, ...); |
| 2642 | 2642 | ||
| 2643 | #define MODULE_ALIAS_NETDEV(device) \ | 2643 | #define MODULE_ALIAS_NETDEV(device) \ |
| 2644 | MODULE_ALIAS("netdev-" device) | 2644 | MODULE_ALIAS("netdev-" device) |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 0101d55d9651..f0e22f75143f 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -82,22 +82,22 @@ struct va_format { | |||
| 82 | * Dummy printk for disabled debugging statements to use whilst maintaining | 82 | * Dummy printk for disabled debugging statements to use whilst maintaining |
| 83 | * gcc's format and side-effect checking. | 83 | * gcc's format and side-effect checking. |
| 84 | */ | 84 | */ |
| 85 | static inline __attribute__ ((format (printf, 1, 2))) | 85 | static inline __printf(1, 2) |
| 86 | int no_printk(const char *fmt, ...) | 86 | int no_printk(const char *fmt, ...) |
| 87 | { | 87 | { |
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | extern asmlinkage __attribute__ ((format (printf, 1, 2))) | 91 | extern asmlinkage __printf(1, 2) |
| 92 | void early_printk(const char *fmt, ...); | 92 | void early_printk(const char *fmt, ...); |
| 93 | 93 | ||
| 94 | extern int printk_needs_cpu(int cpu); | 94 | extern int printk_needs_cpu(int cpu); |
| 95 | extern void printk_tick(void); | 95 | extern void printk_tick(void); |
| 96 | 96 | ||
| 97 | #ifdef CONFIG_PRINTK | 97 | #ifdef CONFIG_PRINTK |
| 98 | asmlinkage __attribute__ ((format (printf, 1, 0))) | 98 | asmlinkage __printf(1, 0) |
| 99 | int vprintk(const char *fmt, va_list args); | 99 | int vprintk(const char *fmt, va_list args); |
| 100 | asmlinkage __attribute__ ((format (printf, 1, 2))) __cold | 100 | asmlinkage __printf(1, 2) __cold |
| 101 | int printk(const char *fmt, ...); | 101 | int printk(const char *fmt, ...); |
| 102 | 102 | ||
| 103 | /* | 103 | /* |
| @@ -117,12 +117,12 @@ extern int kptr_restrict; | |||
| 117 | void log_buf_kexec_setup(void); | 117 | void log_buf_kexec_setup(void); |
| 118 | void __init setup_log_buf(int early); | 118 | void __init setup_log_buf(int early); |
| 119 | #else | 119 | #else |
| 120 | static inline __attribute__ ((format (printf, 1, 0))) | 120 | static inline __printf(1, 0) |
| 121 | int vprintk(const char *s, va_list args) | 121 | int vprintk(const char *s, va_list args) |
| 122 | { | 122 | { |
| 123 | return 0; | 123 | return 0; |
| 124 | } | 124 | } |
| 125 | static inline __attribute__ ((format (printf, 1, 2))) __cold | 125 | static inline __printf(1, 2) __cold |
| 126 | int printk(const char *s, ...) | 126 | int printk(const char *s, ...) |
| 127 | { | 127 | { |
| 128 | return 0; | 128 | return 0; |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 26f9e3612e0f..d93f95e6177c 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -31,7 +31,7 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) | |||
| 31 | #define quota_error(sb, fmt, args...) \ | 31 | #define quota_error(sb, fmt, args...) \ |
| 32 | __quota_error((sb), __func__, fmt , ## args) | 32 | __quota_error((sb), __func__, fmt , ## args) |
| 33 | 33 | ||
| 34 | extern __attribute__((format (printf, 3, 4))) | 34 | extern __printf(3, 4) |
| 35 | void __quota_error(struct super_block *sb, const char *func, | 35 | void __quota_error(struct super_block *sb, const char *func, |
| 36 | const char *fmt, ...); | 36 | const char *fmt, ...); |
| 37 | 37 | ||
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index be720cd2038d..0b69a4684216 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -84,8 +84,7 @@ int seq_putc(struct seq_file *m, char c); | |||
| 84 | int seq_puts(struct seq_file *m, const char *s); | 84 | int seq_puts(struct seq_file *m, const char *s); |
| 85 | int seq_write(struct seq_file *seq, const void *data, size_t len); | 85 | int seq_write(struct seq_file *seq, const void *data, size_t len); |
| 86 | 86 | ||
| 87 | int seq_printf(struct seq_file *, const char *, ...) | 87 | __printf(2, 3) int seq_printf(struct seq_file *, const char *, ...); |
| 88 | __attribute__ ((format (printf,2,3))); | ||
| 89 | 88 | ||
| 90 | int seq_path(struct seq_file *, struct path *, char *); | 89 | int seq_path(struct seq_file *, struct path *, char *); |
| 91 | int seq_dentry(struct seq_file *, struct dentry *, char *); | 90 | int seq_dentry(struct seq_file *, struct dentry *, char *); |
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index 5cf397ceb726..7dadc3df0c77 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h | |||
| @@ -29,10 +29,10 @@ trace_seq_init(struct trace_seq *s) | |||
| 29 | * Currently only defined when tracing is enabled. | 29 | * Currently only defined when tracing is enabled. |
| 30 | */ | 30 | */ |
| 31 | #ifdef CONFIG_TRACING | 31 | #ifdef CONFIG_TRACING |
| 32 | extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...) | 32 | extern __printf(2, 3) |
| 33 | __attribute__ ((format (printf, 2, 3))); | 33 | int trace_seq_printf(struct trace_seq *s, const char *fmt, ...); |
| 34 | extern int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args) | 34 | extern __printf(2, 0) |
| 35 | __attribute__ ((format (printf, 2, 0))); | 35 | int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args); |
| 36 | extern int | 36 | extern int |
| 37 | trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary); | 37 | trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary); |
| 38 | extern int trace_print_seq(struct seq_file *m, struct trace_seq *s); | 38 | extern int trace_print_seq(struct seq_file *m, struct trace_seq *s); |
