History

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>

Joe Perches committed 15 years ago

Commit b9075fa1 parent ae29bc961 files · +324 −350Browse files

Unified · Split

61 files
  1. drivers/isdn/hisax/callc.c +2 −2
  2. drivers/isdn/hisax/hisax.h +2 −2
  3. drivers/isdn/hisax/isdnl1.h +1 −1
  4. drivers/isdn/hisax/isdnl3.c +1 −1
  5. drivers/isdn/hisax/st5481_d.c +2 −2
  6. drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +2 −1
  7. drivers/net/wireless/ath/ath.h +2 −3
  8. drivers/net/wireless/ath/ath5k/debug.h +2 −2
  9. drivers/net/wireless/ath/ath6kl/debug.h +2 −2
  10. drivers/net/wireless/b43/b43.h +4 −8
  11. drivers/net/wireless/b43legacy/b43legacy.h +8 −8
  12. drivers/staging/iio/trigger.h +1 −2
  13. fs/ecryptfs/ecryptfs_kernel.h +1 −1
  14. fs/ext2/ext2.h +4 −4
  15. fs/ext4/ext4.h +22 −22
  16. fs/fat/fat.h +4 −5
  17. fs/gfs2/glock.h +1 −1
  18. fs/hpfs/hpfs_fn.h +2 −2
  19. fs/nilfs2/nilfs.h +4 −4
  20. fs/ntfs/debug.h +9 −6
  21. fs/ocfs2/super.h +6 −8
  22. fs/partitions/ldm.c +9 −7
  23. fs/udf/udfdecl.h +2 −2
  24. fs/ufs/ufs.h +6 −3
  25. fs/xfs/xfs_message.h +20 −22
  26. include/asm-generic/bug.h +6 −5
  27. include/drm/drmP.h +5 −5
  28. include/linux/audit.h +5 −6
  29. include/linux/blktrace_api.h +1 −1
  30. include/linux/device.h +51 −59
  31. include/linux/dynamic_debug.h +9 −10
  32. include/linux/ext3_fs.h +8 −8
  33. include/linux/fs.h +2 −2
  34. include/linux/fscache-cache.h +4 −4
  35. include/linux/gameport.h +4 −4
  36. include/linux/kallsyms.h +2 −3
  37. include/linux/kdb.h +3 −6
  38. include/linux/kernel.h +20 −24
  39. include/linux/kexec.h +2 −2
  40. include/linux/kmod.h +2 −2
  41. include/linux/kobject.h +12 −14
  42. include/linux/kthread.h +2 −2
  43. include/linux/libata.h +9 −9
  44. include/linux/mmiotrace.h +2 −6
  45. include/linux/netdevice.h +17 −17
  46. include/linux/printk.h +6 −6
  47. include/linux/quotaops.h +1 −1
  48. include/linux/seq_file.h +1 −2
  49. include/linux/trace_seq.h +4 −4
  50. include/net/bluetooth/bluetooth.h +1 −1
  51. include/net/netfilter/nf_log.h +2 −1
  52. include/net/sock.h +2 −2
  53. include/sound/core.h +2 −2
  54. include/sound/info.h +2 −2
  55. include/sound/seq_kernel.h +2 −2
  56. include/xen/hvc-console.h +2 −2
  57. include/xen/xenbus.h +6 −6
  58. net/nfc/nfc.h +1 −1
  59. net/rds/rds.h +4 −4
  60. net/sunrpc/svc.c +2 −3
  61. sound/firewire/cmp.c +1 −1
drivers/isdn/hisax/callc.c+2−2
@@ -65,7 +65,7 @@ hisax_findcard(int driverid) · 64 unmodified lines
65 return (struct IsdnCardState *) 0;65 return (struct IsdnCardState *) 0;
66}66}
67 67
68static __attribute__((format(printf, 3, 4))) void68static __printf(3, 4) void
69link_debug(struct Channel *chanp, int direction, char *fmt, ...)69link_debug(struct Channel *chanp, int direction, char *fmt, ...)
70{70{
71 va_list args;71 va_list args;
@@ -1068,7 +1068,7 @@ init_d_st(struct Channel *chanp) · 996 unmodified lines
1068 return 0;1068 return 0;
1069}1069}
1070 1070
1071static __attribute__((format(printf, 2, 3))) void1071static __printf(2, 3) void
1072callc_debug(struct FsmInst *fi, char *fmt, ...)1072callc_debug(struct FsmInst *fi, char *fmt, ...)
1073{1073{
1074 va_list args;1074 va_list args;
drivers/isdn/hisax/hisax.h+2−2
@@ -1287,9 +1287,9 @@ int jiftime(char *s, long mark); · 1286 unmodified lines
1287 1287
1288int HiSax_command(isdn_ctrl * ic);1288int HiSax_command(isdn_ctrl * ic);
1289int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb);1289int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb);
1290__attribute__((format(printf, 3, 4)))1290__printf(3, 4)
1291void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);1291void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);
1292__attribute__((format(printf, 3, 0)))1292__printf(3, 0)
1293void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);1293void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);
1294void HiSax_reportcard(int cardnr, int sel);1294void HiSax_reportcard(int cardnr, int sel);
1295int QuickHex(char *txt, u_char * p, int cnt);1295int QuickHex(char *txt, u_char * p, int cnt);
drivers/isdn/hisax/isdnl1.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21#define B_XMTBUFREADY 121#define B_XMTBUFREADY 1
22#define B_ACKPENDING 222#define B_ACKPENDING 2
23 23
24__attribute__((format(printf, 2, 3)))24__printf(2, 3)
25void debugl1(struct IsdnCardState *cs, char *fmt, ...);25void debugl1(struct IsdnCardState *cs, char *fmt, ...);
26void DChannel_proc_xmt(struct IsdnCardState *cs);26void DChannel_proc_xmt(struct IsdnCardState *cs);
27void DChannel_proc_rcv(struct IsdnCardState *cs);27void DChannel_proc_rcv(struct IsdnCardState *cs);
drivers/isdn/hisax/isdnl3.c+1−1
@@ -66,7 +66,7 @@ static char *strL3Event[] = · 65 unmodified lines
66 "EV_TIMEOUT",66 "EV_TIMEOUT",
67};67};
68 68
69static __attribute__((format(printf, 2, 3))) void69static __printf(2, 3) void
70l3m_debug(struct FsmInst *fi, char *fmt, ...)70l3m_debug(struct FsmInst *fi, char *fmt, ...)
71{71{
72 va_list args;72 va_list args;
drivers/isdn/hisax/st5481_d.c+2−2
@@ -167,7 +167,7 @@ static struct FsmNode L1FnList[] __initdata = · 166 unmodified lines
167 {ST_L1_F8, EV_IND_RSY, l1_ignore},167 {ST_L1_F8, EV_IND_RSY, l1_ignore},
168};168};
169 169
170static __attribute__((format(printf, 2, 3)))170static __printf(2, 3)
171void l1m_debug(struct FsmInst *fi, char *fmt, ...)171void l1m_debug(struct FsmInst *fi, char *fmt, ...)
172{172{
173 va_list args;173 va_list args;
@@ -270,7 +270,7 @@ static char *strDoutEvent[] = · 96 unmodified lines
270 "EV_DOUT_UNDERRUN",270 "EV_DOUT_UNDERRUN",
271};271};
272 272
273static __attribute__((format(printf, 2, 3)))273static __printf(2, 3)
274void dout_debug(struct FsmInst *fi, char *fmt, ...)274void dout_debug(struct FsmInst *fi, char *fmt, ...)
275{275{
276 va_list args;276 va_list args;
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h+2−1
@@ -581,8 +581,9 @@ extern const struct ethtool_ops mlx4_en_ethtool_ops; · 580 unmodified lines
581 * printk / logging functions581 * printk / logging functions
582 */582 */
583 583
584__printf(3, 4)
584int en_print(const char *level, const struct mlx4_en_priv *priv,585int en_print(const char *level, const struct mlx4_en_priv *priv,
585 const char *format, ...) __attribute__ ((format (printf, 3, 4)));586 const char *format, ...);
586 587
587#define en_dbg(mlevel, priv, format, arg...) \588#define en_dbg(mlevel, priv, format, arg...) \
588do { \589do { \
drivers/net/wireless/ath/ath.h+2−3
@@ -173,8 +173,7 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry); · 172 unmodified lines
173void ath_hw_cycle_counters_update(struct ath_common *common);173void ath_hw_cycle_counters_update(struct ath_common *common);
174int32_t ath_hw_get_listen_time(struct ath_common *common);174int32_t ath_hw_get_listen_time(struct ath_common *common);
175 175
176extern __attribute__((format (printf, 2, 3)))176extern __printf(2, 3) void ath_printk(const char *level, const char *fmt, ...);
177void ath_printk(const char *level, const char *fmt, ...);
178 177
179#define _ath_printk(level, common, fmt, ...) \178#define _ath_printk(level, common, fmt, ...) \
180do { \179do { \
@@ -258,7 +257,7 @@ do { \ · 77 unmodified lines
258 257
259#else258#else
260 259
261static inline __attribute__((format (printf, 3, 4)))260static inline __attribute__ ((format (printf, 3, 4)))
262void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask,261void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask,
263 const char *fmt, ...)262 const char *fmt, ...)
264{263{
drivers/net/wireless/ath/ath5k/debug.h+2−2
@@ -141,10 +141,10 @@ ath5k_debug_printtxbuf(struct ath5k_hw *ah, struct ath5k_buf *bf); · 140 unmodified lines
141 141
142#include <linux/compiler.h>142#include <linux/compiler.h>
143 143
144static inline void __attribute__ ((format (printf, 3, 4)))144static inline __printf(3, 4) void
145ATH5K_DBG(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...) {}145ATH5K_DBG(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...) {}
146 146
147static inline void __attribute__ ((format (printf, 3, 4)))147static inline __printf(3, 4) void
148ATH5K_DBG_UNLIMIT(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...)148ATH5K_DBG_UNLIMIT(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...)
149{}149{}
150 150
drivers/net/wireless/ath/ath6kl/debug.h+2−2
@@ -44,8 +44,8 @@ enum ATH6K_DEBUG_MASK { · 43 unmodified lines
44};44};
45 45
46extern unsigned int debug_mask;46extern unsigned int debug_mask;
47extern int ath6kl_printk(const char *level, const char *fmt, ...)47extern __printf(2, 3)
48 __attribute__ ((format (printf, 2, 3)));48int ath6kl_printk(const char *level, const char *fmt, ...);
49 49
50#define ath6kl_info(fmt, ...) \50#define ath6kl_info(fmt, ...) \
51 ath6kl_printk(KERN_INFO, fmt, ##__VA_ARGS__)51 ath6kl_printk(KERN_INFO, fmt, ##__VA_ARGS__)
drivers/net/wireless/b43/b43.h+4−8
@@ -1011,14 +1011,10 @@ static inline bool b43_using_pio_transfers(struct b43_wldev *dev) · 1010 unmodified lines
1011}1011}
1012 1012
1013/* Message printing */1013/* Message printing */
1014void b43info(struct b43_wl *wl, const char *fmt, ...)1014__printf(2, 3) void b43info(struct b43_wl *wl, const char *fmt, ...);
1015 __attribute__ ((format(printf, 2, 3)));1015__printf(2, 3) void b43err(struct b43_wl *wl, const char *fmt, ...);
1016void b43err(struct b43_wl *wl, const char *fmt, ...)1016__printf(2, 3) void b43warn(struct b43_wl *wl, const char *fmt, ...);
1017 __attribute__ ((format(printf, 2, 3)));1017__printf(2, 3) void b43dbg(struct b43_wl *wl, const char *fmt, ...);
1018void b43warn(struct b43_wl *wl, const char *fmt, ...)
1019 __attribute__ ((format(printf, 2, 3)));
1020void b43dbg(struct b43_wl *wl, const char *fmt, ...)
1021 __attribute__ ((format(printf, 2, 3)));
1022 1018
1023 1019
1024/* A WARN_ON variant that vanishes when b43 debugging is disabled.1020/* A WARN_ON variant that vanishes when b43 debugging is disabled.
drivers/net/wireless/b43legacy/b43legacy.h+8−8
@@ -810,15 +810,15 @@ struct b43legacy_lopair *b43legacy_get_lopair(struct b43legacy_phy *phy, · 809 unmodified lines
810 810
811 811
812/* Message printing */812/* Message printing */
813void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...)813__printf(2, 3)
814 __attribute__((format(printf, 2, 3)));814void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...);
815void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...)815__printf(2, 3)
816 __attribute__((format(printf, 2, 3)));816void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...);
817void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...)817__printf(2, 3)
818 __attribute__((format(printf, 2, 3)));818void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...);
819#if B43legacy_DEBUG819#if B43legacy_DEBUG
820void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...)820__printf(2, 3)
821 __attribute__((format(printf, 2, 3)));821void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...);
822#else /* DEBUG */822#else /* DEBUG */
823# define b43legacydbg(wl, fmt...) do { /* nothing */ } while (0)823# define b43legacydbg(wl, fmt...) do { /* nothing */ } while (0)
824#endif /* DEBUG */824#endif /* DEBUG */
drivers/staging/iio/trigger.h+1−2
@@ -115,8 +115,7 @@ void iio_trigger_poll_chained(struct iio_trigger *trig, s64 time); · 114 unmodified lines
115 115
116irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private);116irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private);
117 117
118struct iio_trigger *iio_allocate_trigger(const char *fmt, ...)118__printf(1, 2) struct iio_trigger *iio_allocate_trigger(const char *fmt, ...);
119 __attribute__((format(printf, 1, 2)));
120void iio_free_trigger(struct iio_trigger *trig);119void iio_free_trigger(struct iio_trigger *trig);
121 120
122#endif /* _IIO_TRIGGER_H_ */121#endif /* _IIO_TRIGGER_H_ */
fs/ecryptfs/ecryptfs_kernel.h+1−1
@@ -514,7 +514,7 @@ ecryptfs_set_dentry_lower_mnt(struct dentry *dentry, struct vfsmount *lower_mnt) · 513 unmodified lines
514 514
515#define ecryptfs_printk(type, fmt, arg...) \515#define ecryptfs_printk(type, fmt, arg...) \
516 __ecryptfs_printk(type "%s: " fmt, __func__, ## arg);516 __ecryptfs_printk(type "%s: " fmt, __func__, ## arg);
517__attribute__ ((format(printf, 1, 2)))517__printf(1, 2)
518void __ecryptfs_printk(const char *fmt, ...);518void __ecryptfs_printk(const char *fmt, ...);
519 519
520extern const struct file_operations ecryptfs_main_fops;520extern const struct file_operations ecryptfs_main_fops;
fs/ext2/ext2.h+4−4
@@ -135,10 +135,10 @@ extern long ext2_compat_ioctl(struct file *, unsigned int, unsigned long); · 134 unmodified lines
135struct dentry *ext2_get_parent(struct dentry *child);135struct dentry *ext2_get_parent(struct dentry *child);
136 136
137/* super.c */137/* super.c */
138extern void ext2_error (struct super_block *, const char *, const char *, ...)138extern __printf(3, 4)
139 __attribute__ ((format (printf, 3, 4)));139void ext2_error(struct super_block *, const char *, const char *, ...);
140extern void ext2_msg(struct super_block *, const char *, const char *, ...)140extern __printf(3, 4)
141 __attribute__ ((format (printf, 3, 4)));141void ext2_msg(struct super_block *, const char *, const char *, ...);
142extern void ext2_update_dynamic_rev (struct super_block *sb);142extern void ext2_update_dynamic_rev (struct super_block *sb);
143extern void ext2_write_super (struct super_block *);143extern void ext2_write_super (struct super_block *);
144 144
fs/ext4/ext4.h+22−22
@@ -1878,40 +1878,40 @@ extern int ext4_group_extend(struct super_block *sb, · 1877 unmodified lines
1878extern void *ext4_kvmalloc(size_t size, gfp_t flags);1878extern void *ext4_kvmalloc(size_t size, gfp_t flags);
1879extern void *ext4_kvzalloc(size_t size, gfp_t flags);1879extern void *ext4_kvzalloc(size_t size, gfp_t flags);
1880extern void ext4_kvfree(void *ptr);1880extern void ext4_kvfree(void *ptr);
1881extern void __ext4_error(struct super_block *, const char *, unsigned int,1881extern __printf(4, 5)
1882 const char *, ...)1882void __ext4_error(struct super_block *, const char *, unsigned int,
1883 __attribute__ ((format (printf, 4, 5)));1883 const char *, ...);
1884#define ext4_error(sb, message...) __ext4_error(sb, __func__, \1884#define ext4_error(sb, message...) __ext4_error(sb, __func__, \
1885 __LINE__, ## message)1885 __LINE__, ## message)
1886extern void ext4_error_inode(struct inode *, const char *, unsigned int,1886extern __printf(5, 6)
1887 ext4_fsblk_t, const char *, ...)1887void ext4_error_inode(struct inode *, const char *, unsigned int, ext4_fsblk_t,
1888 __attribute__ ((format (printf, 5, 6)));1888 const char *, ...);
1889extern void ext4_error_file(struct file *, const char *, unsigned int,1889extern __printf(5, 6)
1890 ext4_fsblk_t, const char *, ...)1890void ext4_error_file(struct file *, const char *, unsigned int, ext4_fsblk_t,
1891 __attribute__ ((format (printf, 5, 6)));1891 const char *, ...);
1892extern void __ext4_std_error(struct super_block *, const char *,1892extern void __ext4_std_error(struct super_block *, const char *,
1893 unsigned int, int);1893 unsigned int, int);
1894extern void __ext4_abort(struct super_block *, const char *, unsigned int,1894extern __printf(4, 5)
1895 const char *, ...)1895void __ext4_abort(struct super_block *, const char *, unsigned int,
1896 __attribute__ ((format (printf, 4, 5)));1896 const char *, ...);
1897#define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \1897#define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \
1898 __LINE__, ## message)1898 __LINE__, ## message)
1899extern void __ext4_warning(struct super_block *, const char *, unsigned int,1899extern __printf(4, 5)
1900 const char *, ...)1900void __ext4_warning(struct super_block *, const char *, unsigned int,
1901 __attribute__ ((format (printf, 4, 5)));1901 const char *, ...);
1902#define ext4_warning(sb, message...) __ext4_warning(sb, __func__, \1902#define ext4_warning(sb, message...) __ext4_warning(sb, __func__, \
1903 __LINE__, ## message)1903 __LINE__, ## message)
1904extern void ext4_msg(struct super_block *, const char *, const char *, ...)1904extern __printf(3, 4)
1905 __attribute__ ((format (printf, 3, 4)));1905void ext4_msg(struct super_block *, const char *, const char *, ...);
1906extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp,1906extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp,
1907 const char *, unsigned int, const char *);1907 const char *, unsigned int, const char *);
1908#define dump_mmp_msg(sb, mmp, msg) __dump_mmp_msg(sb, mmp, __func__, \1908#define dump_mmp_msg(sb, mmp, msg) __dump_mmp_msg(sb, mmp, __func__, \
1909 __LINE__, msg)1909 __LINE__, msg)
1910extern void __ext4_grp_locked_error(const char *, unsigned int, \1910extern __printf(7, 8)
1911 struct super_block *, ext4_group_t, \1911void __ext4_grp_locked_error(const char *, unsigned int,
1912 unsigned long, ext4_fsblk_t, \1912 struct super_block *, ext4_group_t,
1913 const char *, ...)1913 unsigned long, ext4_fsblk_t,
1914 __attribute__ ((format (printf, 7, 8)));1914 const char *, ...);
1915#define ext4_grp_locked_error(sb, grp, message...) \1915#define ext4_grp_locked_error(sb, grp, message...) \
1916 __ext4_grp_locked_error(__func__, __LINE__, (sb), (grp), ## message)1916 __ext4_grp_locked_error(__func__, __LINE__, (sb), (grp), ## message)
1917extern void ext4_update_dynamic_rev(struct super_block *sb);1917extern void ext4_update_dynamic_rev(struct super_block *sb);
fs/fat/fat.h+4−5
@@ -326,15 +326,14 @@ extern int fat_fill_super(struct super_block *sb, void *data, int silent, · 325 unmodified lines
326extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,326extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
327 struct inode *i2);327 struct inode *i2);
328/* fat/misc.c */328/* fat/misc.c */
329extern void329extern __printf(3, 4) __cold
330__fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)330void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...);
331 __attribute__ ((format (printf, 3, 4))) __cold;
332#define fat_fs_error(sb, fmt, args...) \331#define fat_fs_error(sb, fmt, args...) \
333 __fat_fs_error(sb, 1, fmt , ## args)332 __fat_fs_error(sb, 1, fmt , ## args)
334#define fat_fs_error_ratelimit(sb, fmt, args...) \333#define fat_fs_error_ratelimit(sb, fmt, args...) \
335 __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)334 __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)
336void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...)335__printf(3, 4) __cold
337 __attribute__ ((format (printf, 3, 4))) __cold;336void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...);
338extern int fat_clusters_flush(struct super_block *sb);337extern int fat_clusters_flush(struct super_block *sb);
339extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);338extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
340extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts,339extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts,
fs/gfs2/glock.h+1−1
@@ -201,7 +201,7 @@ int gfs2_glock_nq_m(unsigned int num_gh, struct gfs2_holder *ghs); · 200 unmodified lines
201void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs);201void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs);
202void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs);202void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs);
203 203
204__attribute__ ((format(printf, 2, 3)))204__printf(2, 3)
205void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...);205void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...);
206 206
207/**207/**
fs/hpfs/hpfs_fn.h+2−2
@@ -311,8 +311,8 @@ static inline struct hpfs_sb_info *hpfs_sb(struct super_block *sb) · 310 unmodified lines
311 311
312/* super.c */312/* super.c */
313 313
314void hpfs_error(struct super_block *, const char *, ...)314__printf(2, 3)
315 __attribute__((format (printf, 2, 3)));315void hpfs_error(struct super_block *, const char *, ...);
316int hpfs_stop_cycles(struct super_block *, int, int *, int *, char *);316int hpfs_stop_cycles(struct super_block *, int, int *, int *, char *);
317unsigned hpfs_count_one_bitmap(struct super_block *, secno);317unsigned hpfs_count_one_bitmap(struct super_block *, secno);
318 318
fs/nilfs2/nilfs.h+4−4
@@ -276,10 +276,10 @@ int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 275 unmodified lines
276/* super.c */276/* super.c */
277extern struct inode *nilfs_alloc_inode(struct super_block *);277extern struct inode *nilfs_alloc_inode(struct super_block *);
278extern void nilfs_destroy_inode(struct inode *);278extern void nilfs_destroy_inode(struct inode *);
279extern void nilfs_error(struct super_block *, const char *, const char *, ...)279extern __printf(3, 4)
280 __attribute__ ((format (printf, 3, 4)));280void nilfs_error(struct super_block *, const char *, const char *, ...);
281extern void nilfs_warning(struct super_block *, const char *, const char *, ...)281extern __printf(3, 4)
282 __attribute__ ((format (printf, 3, 4)));282void nilfs_warning(struct super_block *, const char *, const char *, ...);
283extern struct nilfs_super_block *283extern struct nilfs_super_block *
284nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **);284nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **);
285extern int nilfs_store_magic_and_option(struct super_block *,285extern int nilfs_store_magic_and_option(struct super_block *,
fs/ntfs/debug.h+9−6
@@ -30,8 +30,9 @@ · 29 unmodified lines
30 30
31extern int debug_msgs;31extern int debug_msgs;
32 32
33extern void __ntfs_debug(const char *file, int line, const char *function,33extern __printf(4, 5)
34 const char *format, ...) __attribute__ ((format (printf, 4, 5)));34void __ntfs_debug(const char *file, int line, const char *function,
35 const char *format, ...);
35/**36/**
36 * ntfs_debug - write a debug level message to syslog37 * ntfs_debug - write a debug level message to syslog
37 * @f: a printf format string containing the message38 * @f: a printf format string containing the message
@@ -52,12 +53,14 @@ extern void ntfs_debug_dump_runlist(const runlist_element *rl); · 14 unmodified lines
52 53
53#endif /* !DEBUG */54#endif /* !DEBUG */
54 55
55extern void __ntfs_warning(const char *function, const struct super_block *sb,56extern __printf(3, 4)
56 const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));57void __ntfs_warning(const char *function, const struct super_block *sb,
58 const char *fmt, ...);
57#define ntfs_warning(sb, f, a...) __ntfs_warning(__func__, sb, f, ##a)59#define ntfs_warning(sb, f, a...) __ntfs_warning(__func__, sb, f, ##a)
58 60
59extern void __ntfs_error(const char *function, const struct super_block *sb,61extern __printf(3, 4)
60 const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));62void __ntfs_error(const char *function, const struct super_block *sb,
63 const char *fmt, ...);
61#define ntfs_error(sb, f, a...) __ntfs_error(__func__, sb, f, ##a)64#define ntfs_error(sb, f, a...) __ntfs_error(__func__, sb, f, ##a)
62 65
63#endif /* _LINUX_NTFS_DEBUG_H */66#endif /* _LINUX_NTFS_DEBUG_H */
fs/ocfs2/super.h+6−8
@@ -31,17 +31,15 @@ extern struct workqueue_struct *ocfs2_wq; · 30 unmodified lines
31int ocfs2_publish_get_mount_state(struct ocfs2_super *osb,31int ocfs2_publish_get_mount_state(struct ocfs2_super *osb,
32 int node_num);32 int node_num);
33 33
34void __ocfs2_error(struct super_block *sb,34__printf(3, 4)
35 const char *function,35void __ocfs2_error(struct super_block *sb, const char *function,
36 const char *fmt, ...)36 const char *fmt, ...);
37 __attribute__ ((format (printf, 3, 4)));
38 37
39#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)38#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)
40 39
41void __ocfs2_abort(struct super_block *sb,40__printf(3, 4)
42 const char *function,41void __ocfs2_abort(struct super_block *sb, const char *function,
43 const char *fmt, ...)42 const char *fmt, ...);
44 __attribute__ ((format (printf, 3, 4)));
45 43
46#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)44#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
47 45
fs/partitions/ldm.c+9−7
@@ -49,18 +49,20 @@ · 48 unmodified lines
49#define ldm_error(f, a...) _ldm_printk (KERN_ERR, __func__, f, ##a)49#define ldm_error(f, a...) _ldm_printk (KERN_ERR, __func__, f, ##a)
50#define ldm_info(f, a...) _ldm_printk (KERN_INFO, __func__, f, ##a)50#define ldm_info(f, a...) _ldm_printk (KERN_INFO, __func__, f, ##a)
51 51
52__attribute__ ((format (printf, 3, 4)))52static __printf(3, 4)
53static void _ldm_printk (const char *level, const char *function,53void _ldm_printk(const char *level, const char *function, const char *fmt, ...)
54 const char *fmt, ...)
55{54{
56 static char buf[128];55 struct va_format vaf;
57 va_list args;56 va_list args;
58 57
59 va_start (args, fmt);58 va_start (args, fmt);
60 vsnprintf (buf, sizeof (buf), fmt, args);
61 va_end (args);
62 59
63 printk ("%s%s(): %s\n", level, function, buf);60 vaf.fmt = fmt;
61 vaf.va = &args;
62
63 printk("%s%s(): %pV\n", level, function, &vaf);
64
65 va_end(args);
64}66}
65 67
66/**68/**
fs/udf/udfdecl.h+2−2
@@ -112,8 +112,8 @@ struct extent_position { · 111 unmodified lines
112 112
113/* super.c */113/* super.c */
114 114
115__attribute__((format(printf, 3, 4)))115extern __printf(3, 4) void udf_warning(struct super_block *, const char *,
116extern void udf_warning(struct super_block *, const char *, const char *, ...);116 const char *, ...);
117static inline void udf_updated_lvid(struct super_block *sb)117static inline void udf_updated_lvid(struct super_block *sb)
118{118{
119 struct buffer_head *bh = UDF_SB(sb)->s_lvid_bh;119 struct buffer_head *bh = UDF_SB(sb)->s_lvid_bh;
fs/ufs/ufs.h+6−3
@@ -117,9 +117,12 @@ extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buf · 116 unmodified lines
117extern const struct file_operations ufs_dir_operations;117extern const struct file_operations ufs_dir_operations;
118 118
119/* super.c */119/* super.c */
120extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));120extern __printf(3, 4)
121extern void ufs_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));121void ufs_warning(struct super_block *, const char *, const char *, ...);
122extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));122extern __printf(3, 4)
123void ufs_error(struct super_block *, const char *, const char *, ...);
124extern __printf(3, 4)
125void ufs_panic(struct super_block *, const char *, const char *, ...);
123 126
124/* symlink.c */127/* symlink.c */
125extern const struct inode_operations ufs_fast_symlink_inode_operations;128extern const struct inode_operations ufs_fast_symlink_inode_operations;
fs/xfs/xfs_message.h+20−22
@@ -3,31 +3,29 @@ · 2 unmodified lines
3 3
4struct xfs_mount;4struct xfs_mount;
5 5
6extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...)6extern __printf(2, 3)
7 __attribute__ ((format (printf, 2, 3)));7void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...);
8extern void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...)8extern __printf(2, 3)
9 __attribute__ ((format (printf, 2, 3)));9void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...);
10extern void xfs_alert_tag(const struct xfs_mount *mp, int tag,10extern __printf(3, 4)
11 const char *fmt, ...)11void xfs_alert_tag(const struct xfs_mount *mp, int tag, const char *fmt, ...);
12 __attribute__ ((format (printf, 3, 4)));12extern __printf(2, 3)
13extern void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...)13void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...);
14 __attribute__ ((format (printf, 2, 3)));14extern __printf(2, 3)
15extern void xfs_err(const struct xfs_mount *mp, const char *fmt, ...)15void xfs_err(const struct xfs_mount *mp, const char *fmt, ...);
16 __attribute__ ((format (printf, 2, 3)));16extern __printf(2, 3)
17extern void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...)17void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...);
18 __attribute__ ((format (printf, 2, 3)));18extern __printf(2, 3)
19extern void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...)19void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...);
20 __attribute__ ((format (printf, 2, 3)));20extern __printf(2, 3)
21extern void xfs_info(const struct xfs_mount *mp, const char *fmt, ...)21void xfs_info(const struct xfs_mount *mp, const char *fmt, ...);
22 __attribute__ ((format (printf, 2, 3)));
23 22
24#ifdef DEBUG23#ifdef DEBUG
25extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)24extern __printf(2, 3)
26 __attribute__ ((format (printf, 2, 3)));25void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...);
27#else26#else
28static inline void27static inline __printf(2, 3)
29__attribute__ ((format (printf, 2, 3)))28void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
30xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
31{29{
32}30}
33#endif31#endif
include/asm-generic/bug.h+6−5
@@ -61,11 +61,12 @@ struct bug_entry { · 60 unmodified lines
61 */61 */
62#ifndef __WARN_TAINT62#ifndef __WARN_TAINT
63#ifndef __ASSEMBLY__63#ifndef __ASSEMBLY__
64extern void warn_slowpath_fmt(const char *file, const int line,64extern __printf(3, 4)
65 const char *fmt, ...) __attribute__((format(printf, 3, 4)));65void warn_slowpath_fmt(const char *file, const int line,
66extern void warn_slowpath_fmt_taint(const char *file, const int line,66 const char *fmt, ...);
67 unsigned taint, const char *fmt, ...)67extern __printf(4, 5)
68 __attribute__((format(printf, 4, 5)));68void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
69 const char *fmt, ...);
69extern void warn_slowpath_null(const char *file, const int line);70extern void warn_slowpath_null(const char *file, const int line);
70#define WANT_WARN_ON_SLOWPATH71#define WANT_WARN_ON_SLOWPATH
71#endif72#endif
include/drm/drmP.h+5−5
@@ -122,12 +122,12 @@ struct drm_device; · 121 unmodified lines
122 * using the DRM_DEBUG_KMS and DRM_DEBUG.122 * using the DRM_DEBUG_KMS and DRM_DEBUG.
123 */123 */
124 124
125extern __attribute__((format (printf, 4, 5)))125extern __printf(4, 5)
126void drm_ut_debug_printk(unsigned int request_level,126void drm_ut_debug_printk(unsigned int request_level,
127 const char *prefix,127 const char *prefix,
128 const char *function_name,128 const char *function_name,
129 const char *format, ...);129 const char *format, ...);
130extern __attribute__((format (printf, 2, 3)))130extern __printf(2, 3)
131int drm_err(const char *func, const char *format, ...);131int drm_err(const char *func, const char *format, ...);
132 132
133/***********************************************************************/133/***********************************************************************/
include/linux/audit.h+5−6
@@ -584,14 +584,13 @@ extern int audit_signals; · 583 unmodified lines
584#ifdef CONFIG_AUDIT584#ifdef CONFIG_AUDIT
585/* These are defined in audit.c */585/* These are defined in audit.c */
586 /* Public API */586 /* Public API */
587extern void audit_log(struct audit_context *ctx, gfp_t gfp_mask,587extern __printf(4, 5)
588 int type, const char *fmt, ...)588void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
589 __attribute__((format(printf,4,5)));589 const char *fmt, ...);
590 590
591extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);591extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
592extern void audit_log_format(struct audit_buffer *ab,592extern __printf(2, 3)
593 const char *fmt, ...)593void audit_log_format(struct audit_buffer *ab, const char *fmt, ...);
594 __attribute__((format(printf,2,3)));
595extern void audit_log_end(struct audit_buffer *ab);594extern void audit_log_end(struct audit_buffer *ab);
596extern int audit_string_contains_control(const char *string,595extern int audit_string_contains_control(const char *string,
597 size_t len);596 size_t len);
include/linux/blktrace_api.h+1−1
@@ -170,7 +170,7 @@ extern void blk_trace_shutdown(struct request_queue *); · 169 unmodified lines
170extern int do_blk_trace_setup(struct request_queue *q, char *name,170extern 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);
173extern __attribute__((format(printf, 2, 3)))173extern __printf(2, 3)
174void __trace_note_message(struct blk_trace *, const char *fmt, ...);174void __trace_note_message(struct blk_trace *, const char *fmt, ...);
175 175
176/**176/**
include/linux/device.h+51−59
@@ -622,8 +622,8 @@ static inline const char *dev_name(const struct device *dev) · 621 unmodified lines
622 return kobject_name(&dev->kobj);622 return kobject_name(&dev->kobj);
623}623}
624 624
625extern int dev_set_name(struct device *dev, const char *name, ...)625extern __printf(2, 3)
626 __attribute__((format(printf, 2, 3)));626int dev_set_name(struct device *dev, const char *name, ...);
627 627
628#ifdef CONFIG_NUMA628#ifdef CONFIG_NUMA
629static inline int dev_to_node(struct device *dev)629static inline int dev_to_node(struct device *dev)
@@ -753,10 +753,10 @@ extern struct device *device_create_vargs(struct class *cls, · 123 unmodified lines
753 void *drvdata,753 void *drvdata,
754 const char *fmt,754 const char *fmt,
755 va_list vargs);755 va_list vargs);
756extern struct device *device_create(struct class *cls, struct device *parent,756extern __printf(5, 6)
757 dev_t devt, void *drvdata,757struct 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, ...);
760extern void device_destroy(struct class *cls, dev_t devt);760extern 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); · 37 unmodified lines
800 800
801extern int __dev_printk(const char *level, const struct device *dev,801extern int __dev_printk(const char *level, const struct device *dev,
802 struct va_format *vaf);802 struct va_format *vaf);
803extern int dev_printk(const char *level, const struct device *dev,803extern __printf(3, 4)
804 const char *fmt, ...)804int dev_printk(const char *level, const struct device *dev,
805 __attribute__ ((format (printf, 3, 4)));805 const char *fmt, ...)
806extern int dev_emerg(const struct device *dev, const char *fmt, ...)806 ;
807 __attribute__ ((format (printf, 2, 3)));807extern __printf(2, 3)
808extern int dev_alert(const struct device *dev, const char *fmt, ...)808int dev_emerg(const struct device *dev, const char *fmt, ...);
809 __attribute__ ((format (printf, 2, 3)));809extern __printf(2, 3)
810extern int dev_crit(const struct device *dev, const char *fmt, ...)810int dev_alert(const struct device *dev, const char *fmt, ...);
811 __attribute__ ((format (printf, 2, 3)));811extern __printf(2, 3)
812extern int dev_err(const struct device *dev, const char *fmt, ...)812int dev_crit(const struct device *dev, const char *fmt, ...);
813 __attribute__ ((format (printf, 2, 3)));813extern __printf(2, 3)
814extern int dev_warn(const struct device *dev, const char *fmt, ...)814int dev_err(const struct device *dev, const char *fmt, ...);
815 __attribute__ ((format (printf, 2, 3)));815extern __printf(2, 3)
816extern int dev_notice(const struct device *dev, const char *fmt, ...)816int dev_warn(const struct device *dev, const char *fmt, ...);
817 __attribute__ ((format (printf, 2, 3)));817extern __printf(2, 3)
818extern int _dev_info(const struct device *dev, const char *fmt, ...)818int dev_notice(const struct device *dev, const char *fmt, ...);
819 __attribute__ ((format (printf, 2, 3)));819extern __printf(2, 3)
820int _dev_info(const struct device *dev, const char *fmt, ...);
820 821
821#else822#else
822 823
823static inline int __dev_printk(const char *level, const struct device *dev,824static 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; }
826static inline int dev_printk(const char *level, const struct device *dev,827static inline __printf(3, 4)
827 const char *fmt, ...)828int dev_printk(const char *level, const struct device *dev,
828 __attribute__ ((format (printf, 3, 4)));829 const char *fmt, ...)
829static inline int dev_printk(const char *level, const struct device *dev,830{ return 0; }
830 const char *fmt, ...)831
831 { return 0; }832static inline __printf(2, 3)
832 833int dev_emerg(const struct device *dev, const char *fmt, ...)
833static inline int dev_emerg(const struct device *dev, const char *fmt, ...)834{ return 0; }
834 __attribute__ ((format (printf, 2, 3)));835static inline __printf(2, 3)
835static inline int dev_emerg(const struct device *dev, const char *fmt, ...)836int dev_crit(const struct device *dev, const char *fmt, ...)
836 { return 0; }837{ return 0; }
837static inline int dev_crit(const struct device *dev, const char *fmt, ...)838static inline __printf(2, 3)
838 __attribute__ ((format (printf, 2, 3)));839int dev_alert(const struct device *dev, const char *fmt, ...)
839static inline int dev_crit(const struct device *dev, const char *fmt, ...)840{ return 0; }
840 { return 0; }841static inline __printf(2, 3)
841static inline int dev_alert(const struct device *dev, const char *fmt, ...)842int dev_err(const struct device *dev, const char *fmt, ...)
842 __attribute__ ((format (printf, 2, 3)));843{ return 0; }
843static inline int dev_alert(const struct device *dev, const char *fmt, ...)844static inline __printf(2, 3)
844 { return 0; }845int dev_warn(const struct device *dev, const char *fmt, ...)
845static inline int dev_err(const struct device *dev, const char *fmt, ...)846{ return 0; }
846 __attribute__ ((format (printf, 2, 3)));847static inline __printf(2, 3)
847static inline int dev_err(const struct device *dev, const char *fmt, ...)848int dev_notice(const struct device *dev, const char *fmt, ...)
848 { return 0; }849{ return 0; }
849static inline int dev_warn(const struct device *dev, const char *fmt, ...)850static inline __printf(2, 3)
850 __attribute__ ((format (printf, 2, 3)));851int _dev_info(const struct device *dev, const char *fmt, ...)
851static inline int dev_warn(const struct device *dev, const char *fmt, ...)852{ return 0; }
852 { return 0; }
853static inline int dev_notice(const struct device *dev, const char *fmt, ...)
854 __attribute__ ((format (printf, 2, 3)));
855static inline int dev_notice(const struct device *dev, const char *fmt, ...)
856 { return 0; }
857static inline int _dev_info(const struct device *dev, const char *fmt, ...)
858 __attribute__ ((format (printf, 2, 3)));
859static inline int _dev_info(const struct device *dev, const char *fmt, ...)
860 { return 0; }
861 853
862#endif854#endif
863 855
include/linux/dynamic_debug.h+9−10
@@ -37,22 +37,21 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, · 36 unmodified lines
37 37
38#if defined(CONFIG_DYNAMIC_DEBUG)38#if defined(CONFIG_DYNAMIC_DEBUG)
39extern int ddebug_remove_module(const char *mod_name);39extern int ddebug_remove_module(const char *mod_name);
40extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)40extern __printf(2, 3)
41 __attribute__ ((format (printf, 2, 3)));41int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
42 42
43struct device;43struct device;
44 44
45extern int __dynamic_dev_dbg(struct _ddebug *descriptor,45extern __printf(3, 4)
46 const struct device *dev,46int __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
50struct net_device;49struct net_device;
51 50
52extern int __dynamic_netdev_dbg(struct _ddebug *descriptor,51extern __printf(3, 4)
53 const struct net_device *dev,52int __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) \
include/linux/ext3_fs.h+8−8
@@ -937,15 +937,15 @@ extern int ext3_group_extend(struct super_block *sb, · 936 unmodified lines
937 ext3_fsblk_t n_blocks_count);937 ext3_fsblk_t n_blocks_count);
938 938
939/* super.c */939/* super.c */
940extern void ext3_error (struct super_block *, const char *, const char *, ...)940extern __printf(3, 4)
941 __attribute__ ((format (printf, 3, 4)));941void ext3_error(struct super_block *, const char *, const char *, ...);
942extern void __ext3_std_error (struct super_block *, const char *, int);942extern void __ext3_std_error (struct super_block *, const char *, int);
943extern void ext3_abort (struct super_block *, const char *, const char *, ...)943extern __printf(3, 4)
944 __attribute__ ((format (printf, 3, 4)));944void ext3_abort(struct super_block *, const char *, const char *, ...);
945extern void ext3_warning (struct super_block *, const char *, const char *, ...)945extern __printf(3, 4)
946 __attribute__ ((format (printf, 3, 4)));946void ext3_warning(struct super_block *, const char *, const char *, ...);
947extern void ext3_msg(struct super_block *, const char *, const char *, ...)947extern __printf(3, 4)
948 __attribute__ ((format (printf, 3, 4)));948void ext3_msg(struct super_block *, const char *, const char *, ...);
949extern void ext3_update_dynamic_rev (struct super_block *sb);949extern 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) \
include/linux/fs.h+2−2
@@ -2635,8 +2635,8 @@ static const struct file_operations __fops = { \ · 2634 unmodified lines
2635 .llseek = generic_file_llseek, \2635 .llseek = generic_file_llseek, \
2636};2636};
2637 2637
2638static inline void __attribute__((format(printf, 1, 2)))2638static inline __printf(1, 2)
2639__simple_attr_check_format(const char *fmt, ...)2639void __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}
include/linux/fscache-cache.h+4−4
@@ -492,10 +492,10 @@ static inline void fscache_end_io(struct fscache_retrieval *op, · 491 unmodified lines
492/*492/*
493 * out-of-line cache backend functions493 * out-of-line cache backend functions
494 */494 */
495extern void fscache_init_cache(struct fscache_cache *cache,495extern __printf(3, 4)
496 const struct fscache_cache_ops *ops,496void 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
500extern int fscache_add_cache(struct fscache_cache *cache,500extern int fscache_add_cache(struct fscache_cache *cache,
501 struct fscache_object *fsdef,501 struct fscache_object *fsdef,
include/linux/gameport.h+4−4
@@ -78,8 +78,8 @@ static inline void gameport_register_port(struct gameport *gameport) · 77 unmodified lines
78 78
79void gameport_unregister_port(struct gameport *gameport);79void gameport_unregister_port(struct gameport *gameport);
80 80
81void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)81__printf(2, 3)
82 __attribute__ ((format (printf, 2, 3)));82void gameport_set_phys(struct gameport *gameport, const char *fmt, ...);
83 83
84#else84#else
85 85
@@ -93,8 +93,8 @@ static inline void gameport_unregister_port(struct gameport *gameport) · 7 unmodified lines
93 return;93 return;
94}94}
95 95
96static inline void gameport_set_phys(struct gameport *gameport,96static inline __printf(2, 3)
97 const char *fmt, ...)97void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
98{98{
99 return;99 return;
100}100}
include/linux/kallsyms.h+2−3
@@ -101,9 +101,8 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u · 100 unmodified lines
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 */
104static void __check_printsym_format(const char *fmt, ...)104static __printf(1, 2)
105__attribute__((format(printf,1,2)));105void __check_printsym_format(const char *fmt, ...)
106static inline void __check_printsym_format(const char *fmt, ...)
107{106{
108}107}
109 108
include/linux/kdb.h+3−6
@@ -114,12 +114,9 @@ typedef enum { · 113 unmodified lines
114} kdb_reason_t;114} kdb_reason_t;
115 115
116extern int kdb_trap_printk;116extern int kdb_trap_printk;
117extern int vkdb_printf(const char *fmt, va_list args)117extern __printf(1, 0) int vkdb_printf(const char *fmt, va_list args);
118 __attribute__ ((format (printf, 1, 0)));118extern __printf(1, 2) int kdb_printf(const char *, ...);
119extern int kdb_printf(const char *, ...)119typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...);
120 __attribute__ ((format (printf, 1, 2)));
121typedef int (*kdb_printf_t)(const char *, ...)
122 __attribute__ ((format (printf, 1, 2)));
123 120
124extern void kdb_init(int level);121extern void kdb_init(int level);
125 122
include/linux/kernel.h+20−24
@@ -296,20 +296,18 @@ extern long long simple_strtoll(const char *,char **,unsigned int); · 295 unmodified lines
296#define strict_strtoull kstrtoull296#define strict_strtoull kstrtoull
297#define strict_strtoll kstrtoll297#define strict_strtoll kstrtoll
298 298
299extern int sprintf(char * buf, const char * fmt, ...)299extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...);
300 __attribute__ ((format (printf, 2, 3)));300extern __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
301extern int vsprintf(char *buf, const char *, va_list)301extern __printf(3, 4)
302 __attribute__ ((format (printf, 2, 0)));302int snprintf(char *buf, size_t size, const char *fmt, ...);
303extern int snprintf(char * buf, size_t size, const char * fmt, ...)303extern __printf(3, 0)
304 __attribute__ ((format (printf, 3, 4)));304int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
305extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)305extern __printf(3, 4)
306 __attribute__ ((format (printf, 3, 0)));306int scnprintf(char *buf, size_t size, const char *fmt, ...);
307extern int scnprintf(char * buf, size_t size, const char * fmt, ...)307extern __printf(3, 0)
308 __attribute__ ((format (printf, 3, 4)));308int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
309extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)309extern __printf(2, 3)
310 __attribute__ ((format (printf, 3, 0)));310char *kasprintf(gfp_t gfp, const char *fmt, ...);
311extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
312 __attribute__ ((format (printf, 2, 3)));
313extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);311extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
314 312
315extern int sscanf(const char *, const char *, ...)313extern int sscanf(const char *, const char *, ...)
@@ -427,8 +425,8 @@ extern void tracing_start(void); · 111 unmodified lines
427extern void tracing_stop(void);425extern void tracing_stop(void);
428extern void ftrace_off_permanent(void);426extern void ftrace_off_permanent(void);
429 427
430static inline void __attribute__ ((format (printf, 1, 2)))428static inline __printf(1, 2)
431____trace_printk_check_format(const char *fmt, ...)429void ____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 { \ · 32 unmodified lines
467 __trace_printk(_THIS_IP_, fmt, ##args); \465 __trace_printk(_THIS_IP_, fmt, ##args); \
468} while (0)466} while (0)
469 467
470extern int468extern __printf(2, 3)
471__trace_bprintk(unsigned long ip, const char *fmt, ...)469int __trace_bprintk(unsigned long ip, const char *fmt, ...);
472 __attribute__ ((format (printf, 2, 3)));
473 470
474extern int471extern __printf(2, 3)
475__trace_printk(unsigned long ip, const char *fmt, ...)472int __trace_printk(unsigned long ip, const char *fmt, ...);
476 __attribute__ ((format (printf, 2, 3)));
477 473
478extern void trace_dump_stack(void);474extern void trace_dump_stack(void);
479 475
@@ -502,8 +498,8 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); · 22 unmodified lines
502 498
503extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);499extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);
504#else500#else
505static inline int501static inline __printf(1, 2)
506trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));502int trace_printk(const char *fmt, ...);
507 503
508static inline void tracing_start(void) { }504static inline void tracing_start(void) { }
509static inline void tracing_stop(void) { }505static inline void tracing_stop(void) { }
include/linux/kexec.h+2−2
@@ -130,8 +130,8 @@ int kexec_should_crash(struct task_struct *); · 129 unmodified lines
130void crash_save_cpu(struct pt_regs *regs, int cpu);130void crash_save_cpu(struct pt_regs *regs, int cpu);
131void crash_save_vmcoreinfo(void);131void crash_save_vmcoreinfo(void);
132void arch_crash_save_vmcoreinfo(void);132void arch_crash_save_vmcoreinfo(void);
133void vmcoreinfo_append_str(const char *fmt, ...)133__printf(1, 2)
134 __attribute__ ((format (printf, 1, 2)));134void vmcoreinfo_append_str(const char *fmt, ...);
135unsigned long paddr_vmcoreinfo_note(void);135unsigned long paddr_vmcoreinfo_note(void);
136 136
137#define VMCOREINFO_OSRELEASE(value) \137#define VMCOREINFO_OSRELEASE(value) \
include/linux/kmod.h+2−2
@@ -32,8 +32,8 @@ · 31 unmodified lines
32extern char modprobe_path[]; /* for sysctl */32extern char modprobe_path[]; /* for sysctl */
33/* modprobe exit status on success, -ve on error. Return value33/* modprobe exit status on success, -ve on error. Return value
34 * usually useless though. */34 * usually useless though. */
35extern int __request_module(bool wait, const char *name, ...) \35extern __printf(2, 3)
36 __attribute__((format(printf, 2, 3)));36int __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...) \
include/linux/kobject.h+12−14
@@ -72,8 +72,8 @@ struct kobject { · 71 unmodified lines
72 unsigned int uevent_suppress:1;72 unsigned int uevent_suppress:1;
73};73};
74 74
75extern int kobject_set_name(struct kobject *kobj, const char *name, ...)75extern __printf(2, 3)
76 __attribute__((format(printf, 2, 3)));76int kobject_set_name(struct kobject *kobj, const char *name, ...);
77extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,77extern 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) · 3 unmodified lines
83}83}
84 84
85extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);85extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
86extern int __must_check kobject_add(struct kobject *kobj,86extern __printf(3, 4) __must_check
87 struct kobject *parent,87int kobject_add(struct kobject *kobj, struct kobject *parent,
88 const char *fmt, ...)88 const char *fmt, ...);
89 __attribute__((format(printf, 3, 4)));89extern __printf(4, 5) __must_check
90extern int __must_check kobject_init_and_add(struct kobject *kobj,90int 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
96extern void kobject_del(struct kobject *kobj);94extern void kobject_del(struct kobject *kobj);
97 95
@@ -212,8 +210,8 @@ int kobject_uevent(struct kobject *kobj, enum kobject_action action); · 114 unmodified lines
212int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,210int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
213 char *envp[]);211 char *envp[]);
214 212
215int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)213__printf(2, 3)
216 __attribute__((format (printf, 2, 3)));214int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...);
217 215
218int kobject_action_type(const char *buf, size_t count,216int 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, · 6 unmodified lines
226 char *envp[])224 char *envp[])
227{ return 0; }225{ return 0; }
228 226
229static inline __attribute__((format(printf, 2, 3)))227static inline __printf(2, 3)
230int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)228int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
231{ return 0; }229{ return 0; }
232 230
include/linux/kthread.h+2−2
@@ -4,11 +4,11 @@ · 3 unmodified lines
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)
7struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),8struct 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)
include/linux/libata.h+9−9
@@ -1256,13 +1256,13 @@ static inline int sata_srst_pmp(struct ata_link *link) · 1255 unmodified lines
1256/*1256/*
1257 * printk helpers1257 * printk helpers
1258 */1258 */
1259__attribute__((format (printf, 3, 4)))1259__printf(3, 4)
1260int ata_port_printk(const struct ata_port *ap, const char *level,1260int 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)
1263int ata_link_printk(const struct ata_link *link, const char *level,1263int 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)
1266int ata_dev_printk(const struct ata_device *dev, const char *level,1266int 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); · 35 unmodified lines
1304/*1304/*
1305 * ata_eh_info helpers1305 * ata_eh_info helpers
1306 */1306 */
1307extern void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...)1307extern __printf(2, 3)
1308 __attribute__ ((format (printf, 2, 3)));1308void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...);
1309extern void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...)1309extern __printf(2, 3)
1310 __attribute__ ((format (printf, 2, 3)));1310void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...);
1311extern void ata_ehi_clear_desc(struct ata_eh_info *ehi);1311extern void ata_ehi_clear_desc(struct ata_eh_info *ehi);
1312 1312
1313static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi)1313static 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) · 7 unmodified lines
1321/*1321/*
1322 * port description helpers1322 * port description helpers
1323 */1323 */
1324extern void ata_port_desc(struct ata_port *ap, const char *fmt, ...)1324extern __printf(2, 3)
1325 __attribute__ ((format (printf, 2, 3)));1325void ata_port_desc(struct ata_port *ap, const char *fmt, ...);
1326#ifdef CONFIG_PCI1326#ifdef CONFIG_PCI
1327extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset,1327extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset,
1328 const char *name);1328 const char *name);
include/linux/mmiotrace.h+2−6
@@ -49,8 +49,7 @@ extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size, · 48 unmodified lines
49extern void mmiotrace_iounmap(volatile void __iomem *addr);49extern 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. */
52extern int mmiotrace_printk(const char *fmt, ...)52extern __printf(1, 2) int mmiotrace_printk(const char *fmt, ...);
53 __attribute__ ((format (printf, 1, 2)));
54#else /* !CONFIG_MMIOTRACE: */53#else /* !CONFIG_MMIOTRACE: */
55static inline int is_kmmio_active(void)54static inline int is_kmmio_active(void)
56{55{
@@ -71,10 +70,7 @@ static inline void mmiotrace_iounmap(volatile void __iomem *addr) · 14 unmodified lines
71{70{
72}71}
73 72
74static inline int mmiotrace_printk(const char *fmt, ...)73static inline __printf(1, 2) int mmiotrace_printk(const char *fmt, ...)
75 __attribute__ ((format (printf, 1, 0)));
76
77static inline int mmiotrace_printk(const char *fmt, ...)
78{74{
79 return 0;75 return 0;
80}76}
include/linux/netdevice.h+17−17
@@ -2622,23 +2622,23 @@ static inline const char *netdev_name(const struct net_device *dev) · 2621 unmodified lines
2622extern int __netdev_printk(const char *level, const struct net_device *dev,2622extern int __netdev_printk(const char *level, const struct net_device *dev,
2623 struct va_format *vaf);2623 struct va_format *vaf);
2624 2624
2625extern int netdev_printk(const char *level, const struct net_device *dev,2625extern __printf(3, 4)
2626 const char *format, ...)2626int netdev_printk(const char *level, const struct net_device *dev,
2627 __attribute__ ((format (printf, 3, 4)));2627 const char *format, ...);
2628extern int netdev_emerg(const struct net_device *dev, const char *format, ...)2628extern __printf(2, 3)
2629 __attribute__ ((format (printf, 2, 3)));2629int netdev_emerg(const struct net_device *dev, const char *format, ...);
2630extern int netdev_alert(const struct net_device *dev, const char *format, ...)2630extern __printf(2, 3)
2631 __attribute__ ((format (printf, 2, 3)));2631int netdev_alert(const struct net_device *dev, const char *format, ...);
2632extern int netdev_crit(const struct net_device *dev, const char *format, ...)2632extern __printf(2, 3)
2633 __attribute__ ((format (printf, 2, 3)));2633int netdev_crit(const struct net_device *dev, const char *format, ...);
2634extern int netdev_err(const struct net_device *dev, const char *format, ...)2634extern __printf(2, 3)
2635 __attribute__ ((format (printf, 2, 3)));2635int netdev_err(const struct net_device *dev, const char *format, ...);
2636extern int netdev_warn(const struct net_device *dev, const char *format, ...)2636extern __printf(2, 3)
2637 __attribute__ ((format (printf, 2, 3)));2637int netdev_warn(const struct net_device *dev, const char *format, ...);
2638extern int netdev_notice(const struct net_device *dev, const char *format, ...)2638extern __printf(2, 3)
2639 __attribute__ ((format (printf, 2, 3)));2639int netdev_notice(const struct net_device *dev, const char *format, ...);
2640extern int netdev_info(const struct net_device *dev, const char *format, ...)2640extern __printf(2, 3)
2641 __attribute__ ((format (printf, 2, 3)));2641int 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)
include/linux/printk.h+6−6
@@ -82,22 +82,22 @@ struct va_format { · 81 unmodified lines
82 * Dummy printk for disabled debugging statements to use whilst maintaining82 * 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 */
85static inline __attribute__ ((format (printf, 1, 2)))85static inline __printf(1, 2)
86int no_printk(const char *fmt, ...)86int no_printk(const char *fmt, ...)
87{87{
88 return 0;88 return 0;
89}89}
90 90
91extern asmlinkage __attribute__ ((format (printf, 1, 2)))91extern asmlinkage __printf(1, 2)
92void early_printk(const char *fmt, ...);92void early_printk(const char *fmt, ...);
93 93
94extern int printk_needs_cpu(int cpu);94extern int printk_needs_cpu(int cpu);
95extern void printk_tick(void);95extern void printk_tick(void);
96 96
97#ifdef CONFIG_PRINTK97#ifdef CONFIG_PRINTK
98asmlinkage __attribute__ ((format (printf, 1, 0)))98asmlinkage __printf(1, 0)
99int vprintk(const char *fmt, va_list args);99int vprintk(const char *fmt, va_list args);
100asmlinkage __attribute__ ((format (printf, 1, 2))) __cold100asmlinkage __printf(1, 2) __cold
101int printk(const char *fmt, ...);101int printk(const char *fmt, ...);
102 102
103/*103/*
@@ -117,12 +117,12 @@ extern int kptr_restrict; · 13 unmodified lines
117void log_buf_kexec_setup(void);117void log_buf_kexec_setup(void);
118void __init setup_log_buf(int early);118void __init setup_log_buf(int early);
119#else119#else
120static inline __attribute__ ((format (printf, 1, 0)))120static inline __printf(1, 0)
121int vprintk(const char *s, va_list args)121int vprintk(const char *s, va_list args)
122{122{
123 return 0;123 return 0;
124}124}
125static inline __attribute__ ((format (printf, 1, 2))) __cold125static inline __printf(1, 2) __cold
126int printk(const char *s, ...)126int printk(const char *s, ...)
127{127{
128 return 0;128 return 0;
include/linux/quotaops.h+1−1
@@ -31,7 +31,7 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) · 30 unmodified lines
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
34extern __attribute__((format (printf, 3, 4)))34extern __printf(3, 4)
35void __quota_error(struct super_block *sb, const char *func,35void __quota_error(struct super_block *sb, const char *func,
36 const char *fmt, ...);36 const char *fmt, ...);
37 37
include/linux/seq_file.h+1−2
@@ -84,8 +84,7 @@ int seq_putc(struct seq_file *m, char c); · 83 unmodified lines
84int seq_puts(struct seq_file *m, const char *s);84int seq_puts(struct seq_file *m, const char *s);
85int seq_write(struct seq_file *seq, const void *data, size_t len);85int seq_write(struct seq_file *seq, const void *data, size_t len);
86 86
87int 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
90int seq_path(struct seq_file *, struct path *, char *);89int seq_path(struct seq_file *, struct path *, char *);
91int seq_dentry(struct seq_file *, struct dentry *, char *);90int seq_dentry(struct seq_file *, struct dentry *, char *);
include/linux/trace_seq.h+4−4
@@ -29,10 +29,10 @@ trace_seq_init(struct trace_seq *s) · 28 unmodified lines
29 * Currently only defined when tracing is enabled.29 * Currently only defined when tracing is enabled.
30 */30 */
31#ifdef CONFIG_TRACING31#ifdef CONFIG_TRACING
32extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...)32extern __printf(2, 3)
33 __attribute__ ((format (printf, 2, 3)));33int trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
34extern int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args)34extern __printf(2, 0)
35 __attribute__ ((format (printf, 2, 0)));35int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
36extern int36extern int
37trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);37trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
38extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);38extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
include/net/bluetooth/bluetooth.h+1−1
@@ -77,7 +77,7 @@ struct bt_power { · 76 unmodified lines
77#define BT_POWER_FORCE_ACTIVE_OFF 077#define BT_POWER_FORCE_ACTIVE_OFF 0
78#define BT_POWER_FORCE_ACTIVE_ON 178#define BT_POWER_FORCE_ACTIVE_ON 1
79 79
80__attribute__((format (printf, 2, 3)))80__printf(2, 3)
81int bt_printk(const char *level, const char *fmt, ...);81int bt_printk(const char *level, const char *fmt, ...);
82 82
83#define BT_INFO(fmt, arg...) bt_printk(KERN_INFO, pr_fmt(fmt), ##arg)83#define BT_INFO(fmt, arg...) bt_printk(KERN_INFO, pr_fmt(fmt), ##arg)
include/net/netfilter/nf_log.h+2−1
@@ -53,12 +53,13 @@ int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger); · 52 unmodified lines
53void nf_log_unbind_pf(u_int8_t pf);53void nf_log_unbind_pf(u_int8_t pf);
54 54
55/* Calls the registered backend logging function */55/* Calls the registered backend logging function */
56__printf(7, 8)
56void nf_log_packet(u_int8_t pf,57void nf_log_packet(u_int8_t pf,
57 unsigned int hooknum,58 unsigned int hooknum,
58 const struct sk_buff *skb,59 const struct sk_buff *skb,
59 const struct net_device *in,60 const struct net_device *in,
60 const struct net_device *out,61 const struct net_device *out,
61 const struct nf_loginfo *li,62 const struct nf_loginfo *li,
62 const char *fmt, ...) __attribute__ ((format(printf,7,8)));63 const char *fmt, ...);
63 64
64#endif /* _NF_LOG_H */65#endif /* _NF_LOG_H */
include/net/sock.h+2−2
@@ -76,8 +76,8 @@ · 75 unmodified lines
76 printk(KERN_DEBUG msg); } while (0)76 printk(KERN_DEBUG msg); } while (0)
77#else77#else
78/* Validate arguments and do nothing */78/* Validate arguments and do nothing */
79static inline void __attribute__ ((format (printf, 2, 3)))79static inline __printf(2, 3)
80SOCK_DEBUG(struct sock *sk, const char *msg, ...)80void SOCK_DEBUG(struct sock *sk, const char *msg, ...)
81{81{
82}82}
83#endif83#endif
include/sound/core.h+2−2
@@ -326,9 +326,9 @@ void release_and_free_resource(struct resource *res); · 325 unmodified lines
326/* --- */326/* --- */
327 327
328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
329__printf(4, 5)
329void __snd_printk(unsigned int level, const char *file, int line,330void __snd_printk(unsigned int level, const char *file, int line,
330 const char *format, ...)331 const char *format, ...);
331 __attribute__ ((format (printf, 4, 5)));
332#else332#else
333#define __snd_printk(level, file, line, format, args...) \333#define __snd_printk(level, file, line, format, args...) \
334 printk(format, ##args)334 printk(format, ##args)
include/sound/info.h+2−2
@@ -110,8 +110,8 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer); · 109 unmodified lines
110static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}110static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
111#endif111#endif
112 112
113int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) \113__printf(2, 3)
114 __attribute__ ((format (printf, 2, 3)));114int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...);
115int snd_info_init(void);115int snd_info_init(void);
116int snd_info_done(void);116int snd_info_done(void);
117 117
include/sound/seq_kernel.h+2−2
@@ -75,9 +75,9 @@ struct snd_seq_port_callback { · 74 unmodified lines
75};75};
76 76
77/* interface for kernel client */77/* interface for kernel client */
78__printf(3, 4)
78int snd_seq_create_kernel_client(struct snd_card *card, int client_index,79int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
79 const char *name_fmt, ...)80 const char *name_fmt, ...);
80 __attribute__ ((format (printf, 3, 4)));
81int snd_seq_delete_kernel_client(int client);81int snd_seq_delete_kernel_client(int client);
82int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);82int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
83int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);83int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
include/xen/hvc-console.h+2−2
@@ -6,12 +6,12 @@ extern struct console xenboot_console; · 5 unmodified lines
6#ifdef CONFIG_HVC_XEN6#ifdef CONFIG_HVC_XEN
7void xen_console_resume(void);7void xen_console_resume(void);
8void xen_raw_console_write(const char *str);8void xen_raw_console_write(const char *str);
9__attribute__((format(printf, 1, 2)))9__printf(1, 2)
10void xen_raw_printk(const char *fmt, ...);10void xen_raw_printk(const char *fmt, ...);
11#else11#else
12static inline void xen_console_resume(void) { }12static inline void xen_console_resume(void) { }
13static inline void xen_raw_console_write(const char *str) { }13static inline void xen_raw_console_write(const char *str) { }
14static inline __attribute__((format(printf, 1, 2)))14static inline __printf(1, 2)
15void xen_raw_printk(const char *fmt, ...) { }15void xen_raw_printk(const char *fmt, ...) { }
16#endif16#endif
17 17
include/xen/xenbus.h+6−6
@@ -156,9 +156,9 @@ int xenbus_scanf(struct xenbus_transaction t, · 155 unmodified lines
156 __attribute__((format(scanf, 4, 5)));156 __attribute__((format(scanf, 4, 5)));
157 157
158/* Single printf and write: returns -errno or 0. */158/* Single printf and write: returns -errno or 0. */
159__printf(4, 5)
159int xenbus_printf(struct xenbus_transaction t,160int xenbus_printf(struct xenbus_transaction t,
160 const char *dir, const char *node, const char *fmt, ...)161 const char *dir, const char *node, const char *fmt, ...);
161 __attribute__((format(printf, 4, 5)));
162 162
163/* Generic read function: NULL-terminated triples of name,163/* Generic read function: NULL-terminated triples of name,
164 * sprintf-style type string, and pointer. Returns 0 or errno.*/164 * sprintf-style type string, and pointer. Returns 0 or errno.*/
@@ -200,11 +200,11 @@ int xenbus_watch_path(struct xenbus_device *dev, const char *path, · 35 unmodified lines
200 struct xenbus_watch *watch,200 struct xenbus_watch *watch,
201 void (*callback)(struct xenbus_watch *,201 void (*callback)(struct xenbus_watch *,
202 const char **, unsigned int));202 const char **, unsigned int));
203__printf(4, 5)
203int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch,204int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch,
204 void (*callback)(struct xenbus_watch *,205 void (*callback)(struct xenbus_watch *,
205 const char **, unsigned int),206 const char **, unsigned int),
206 const char *pathfmt, ...)207 const char *pathfmt, ...);
207 __attribute__ ((format (printf, 4, 5)));
208 208
209int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state);209int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state);
210int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn);210int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn);
@@ -223,9 +223,9 @@ int xenbus_free_evtchn(struct xenbus_device *dev, int port); · 12 unmodified lines
223 223
224enum xenbus_state xenbus_read_driver_state(const char *path);224enum xenbus_state xenbus_read_driver_state(const char *path);
225 225
226__attribute__((format(printf, 3, 4)))226__printf(3, 4)
227void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, ...);227void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, ...);
228__attribute__((format(printf, 3, 4)))228__printf(3, 4)
229void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt, ...);229void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt, ...);
230 230
231const char *xenbus_strstate(enum xenbus_state state);231const char *xenbus_strstate(enum xenbus_state state);
net/nfc/nfc.h+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
27#include <net/nfc/nfc.h>27#include <net/nfc/nfc.h>
28#include <net/sock.h>28#include <net/sock.h>
29 29
30__attribute__((format (printf, 2, 3)))30__printf(2, 3)
31int nfc_printk(const char *level, const char *fmt, ...);31int nfc_printk(const char *level, const char *fmt, ...);
32 32
33#define nfc_info(fmt, arg...) nfc_printk(KERN_INFO, fmt, ##arg)33#define nfc_info(fmt, arg...) nfc_printk(KERN_INFO, fmt, ##arg)
net/rds/rds.h+4−4
@@ -36,8 +36,8 @@ · 35 unmodified lines
36#define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args)36#define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args)
37#else37#else
38/* sigh, pr_debug() causes unused variable warnings */38/* sigh, pr_debug() causes unused variable warnings */
39static inline void __attribute__ ((format (printf, 1, 2)))39static inline __printf(1, 2)
40rdsdebug(char *fmt, ...)40void rdsdebug(char *fmt, ...)
41{41{
42}42}
43#endif43#endif
@@ -625,8 +625,8 @@ void rds_for_each_conn_info(struct socket *sock, unsigned int len, · 581 unmodified lines
625 struct rds_info_lengths *lens,625 struct rds_info_lengths *lens,
626 int (*visitor)(struct rds_connection *, void *),626 int (*visitor)(struct rds_connection *, void *),
627 size_t item_len);627 size_t item_len);
628void __rds_conn_error(struct rds_connection *conn, const char *, ...)628__printf(2, 3)
629 __attribute__ ((format (printf, 2, 3)));629void __rds_conn_error(struct rds_connection *conn, const char *, ...);
630#define rds_conn_error(conn, fmt...) \630#define rds_conn_error(conn, fmt...) \
631 __rds_conn_error(conn, KERN_WARNING "RDS: " fmt)631 __rds_conn_error(conn, KERN_WARNING "RDS: " fmt)
632 632
net/sunrpc/svc.c+2−3
@@ -971,9 +971,8 @@ static void svc_unregister(const struct svc_serv *serv) · 970 unmodified lines
971/*971/*
972 * Printk the given error with the address of the client that caused it.972 * Printk the given error with the address of the client that caused it.
973 */973 */
974static int974static __printf(2, 3)
975__attribute__ ((format (printf, 2, 3)))975int svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
976svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
977{976{
978 va_list args;977 va_list args;
979 int r;978 int r;
sound/firewire/cmp.c+1−1
@@ -32,7 +32,7 @@ enum bus_reset_handling { · 31 unmodified lines
32 SUCCEED_ON_BUS_RESET,32 SUCCEED_ON_BUS_RESET,
33};33};
34 34
35static __attribute__((format(printf, 2, 3)))35static __printf(2, 3)
36void cmp_error(struct cmp_connection *c, const char *fmt, ...)36void cmp_error(struct cmp_connection *c, const char *fmt, ...)
37{37{
38 va_list va;38 va_list va;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t