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
6565 return (struct IsdnCardState *) 0;
6666 }
6767
68−static __attribute__((format(printf, 3, 4))) void
68+static __printf(3, 4) void
6969 link_debug(struct Channel *chanp, int direction, char *fmt, ...)
7070 {
7171 va_list args;
@@ -1068,7 +1068,7 @@ init_d_st(struct Channel *chanp) · 996 unmodified lines
10681068 return 0;
10691069 }
10701070
1071−static __attribute__((format(printf, 2, 3))) void
1071+static __printf(2, 3) void
10721072 callc_debug(struct FsmInst *fi, char *fmt, ...)
10731073 {
10741074 va_list args;
drivers/isdn/hisax/hisax.h+2−2
@@ -1287,9 +1287,9 @@ int jiftime(char *s, long mark); · 1286 unmodified lines
12871287
12881288 int HiSax_command(isdn_ctrl * ic);
12891289 int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb);
1290−__attribute__((format(printf, 3, 4)))
1290+__printf(3, 4)
12911291 void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);
1292−__attribute__((format(printf, 3, 0)))
1292+__printf(3, 0)
12931293 void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);
12941294 void HiSax_reportcard(int cardnr, int sel);
12951295 int QuickHex(char *txt, u_char * p, int cnt);
drivers/isdn/hisax/isdnl1.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 #define B_XMTBUFREADY 1
2222 #define B_ACKPENDING 2
2323
24−__attribute__((format(printf, 2, 3)))
24+__printf(2, 3)
2525 void debugl1(struct IsdnCardState *cs, char *fmt, ...);
2626 void DChannel_proc_xmt(struct IsdnCardState *cs);
2727 void DChannel_proc_rcv(struct IsdnCardState *cs);
drivers/isdn/hisax/isdnl3.c+1−1
@@ -66,7 +66,7 @@ static char *strL3Event[] = · 65 unmodified lines
6666 "EV_TIMEOUT",
6767 };
6868
69−static __attribute__((format(printf, 2, 3))) void
69+static __printf(2, 3) void
7070 l3m_debug(struct FsmInst *fi, char *fmt, ...)
7171 {
7272 va_list args;
drivers/isdn/hisax/st5481_d.c+2−2
@@ -167,7 +167,7 @@ static struct FsmNode L1FnList[] __initdata = · 166 unmodified lines
167167 {ST_L1_F8, EV_IND_RSY, l1_ignore},
168168 };
169169
170−static __attribute__((format(printf, 2, 3)))
170+static __printf(2, 3)
171171 void l1m_debug(struct FsmInst *fi, char *fmt, ...)
172172 {
173173 va_list args;
@@ -270,7 +270,7 @@ static char *strDoutEvent[] = · 96 unmodified lines
270270 "EV_DOUT_UNDERRUN",
271271 };
272272
273−static __attribute__((format(printf, 2, 3)))
273+static __printf(2, 3)
274274 void dout_debug(struct FsmInst *fi, char *fmt, ...)
275275 {
276276 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
581581 * printk / logging functions
582582 */
583583
584+__printf(3, 4)
584585 int en_print(const char *level, const struct mlx4_en_priv *priv,
585− const char *format, ...) __attribute__ ((format (printf, 3, 4)));
586+ const char *format, ...);
586587
587588 #define en_dbg(mlevel, priv, format, arg...) \
588589 do { \
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
173173 void ath_hw_cycle_counters_update(struct ath_common *common);
174174 int32_t ath_hw_get_listen_time(struct ath_common *common);
175175
176−extern __attribute__((format (printf, 2, 3)))
177−void ath_printk(const char *level, const char *fmt, ...);
176+extern __printf(2, 3) void ath_printk(const char *level, const char *fmt, ...);
178177
179178 #define _ath_printk(level, common, fmt, ...) \
180179 do { \
@@ -258,7 +257,7 @@ do { \ · 77 unmodified lines
258257
259258 #else
260259
261−static inline __attribute__((format (printf, 3, 4)))
260+static inline __attribute__ ((format (printf, 3, 4)))
262261 void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask,
263262 const char *fmt, ...)
264263 {
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
141141
142142 #include <linux/compiler.h>
143143
144−static inline void __attribute__ ((format (printf, 3, 4)))
144+static inline __printf(3, 4) void
145145 ATH5K_DBG(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...) {}
146146
147−static inline void __attribute__ ((format (printf, 3, 4)))
147+static inline __printf(3, 4) void
148148 ATH5K_DBG_UNLIMIT(struct ath5k_hw *ah, unsigned int m, const char *fmt, ...)
149149 {}
150150
drivers/net/wireless/ath/ath6kl/debug.h+2−2
@@ -44,8 +44,8 @@ enum ATH6K_DEBUG_MASK { · 43 unmodified lines
4444 };
4545
4646 extern unsigned int debug_mask;
47−extern int ath6kl_printk(const char *level, const char *fmt, ...)
48− __attribute__ ((format (printf, 2, 3)));
47+extern __printf(2, 3)
48+int ath6kl_printk(const char *level, const char *fmt, ...);
4949
5050 #define ath6kl_info(fmt, ...) \
5151 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
10111011 }
10121012
10131013 /* Message printing */
1014−void b43info(struct b43_wl *wl, const char *fmt, ...)
1015− __attribute__ ((format(printf, 2, 3)));
1016−void b43err(struct b43_wl *wl, const char *fmt, ...)
1017− __attribute__ ((format(printf, 2, 3)));
1018−void b43warn(struct b43_wl *wl, const char *fmt, ...)
1019− __attribute__ ((format(printf, 2, 3)));
1020−void b43dbg(struct b43_wl *wl, const char *fmt, ...)
1021− __attribute__ ((format(printf, 2, 3)));
1014+__printf(2, 3) void b43info(struct b43_wl *wl, const char *fmt, ...);
1015+__printf(2, 3) void b43err(struct b43_wl *wl, const char *fmt, ...);
1016+__printf(2, 3) void b43warn(struct b43_wl *wl, const char *fmt, ...);
1017+__printf(2, 3) void b43dbg(struct b43_wl *wl, const char *fmt, ...);
10221018
10231019
10241020 /* 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
810810
811811
812812 /* Message printing */
813−void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...)
814− __attribute__((format(printf, 2, 3)));
815−void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...)
816− __attribute__((format(printf, 2, 3)));
817−void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...)
818− __attribute__((format(printf, 2, 3)));
813+__printf(2, 3)
814+void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...);
815+__printf(2, 3)
816+void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...);
817+__printf(2, 3)
818+void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...);
819819 #if B43legacy_DEBUG
820−void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...)
821− __attribute__((format(printf, 2, 3)));
820+__printf(2, 3)
821+void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...);
822822 #else /* DEBUG */
823823 # define b43legacydbg(wl, fmt...) do { /* nothing */ } while (0)
824824 #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
115115
116116 irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private);
117117
118−struct iio_trigger *iio_allocate_trigger(const char *fmt, ...)
119− __attribute__((format(printf, 1, 2)));
118+__printf(1, 2) struct iio_trigger *iio_allocate_trigger(const char *fmt, ...);
120119 void iio_free_trigger(struct iio_trigger *trig);
121120
122121 #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
514514
515515 #define ecryptfs_printk(type, fmt, arg...) \
516516 __ecryptfs_printk(type "%s: " fmt, __func__, ## arg);
517−__attribute__ ((format(printf, 1, 2)))
517+__printf(1, 2)
518518 void __ecryptfs_printk(const char *fmt, ...);
519519
520520 extern 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
135135 struct dentry *ext2_get_parent(struct dentry *child);
136136
137137 /* super.c */
138−extern void ext2_error (struct super_block *, const char *, const char *, ...)
139− __attribute__ ((format (printf, 3, 4)));
140−extern void ext2_msg(struct super_block *, const char *, const char *, ...)
141− __attribute__ ((format (printf, 3, 4)));
138+extern __printf(3, 4)
139+void ext2_error(struct super_block *, const char *, const char *, ...);
140+extern __printf(3, 4)
141+void ext2_msg(struct super_block *, const char *, const char *, ...);
142142 extern void ext2_update_dynamic_rev (struct super_block *sb);
143143 extern void ext2_write_super (struct super_block *);
144144
fs/ext4/ext4.h+22−22
@@ -1878,40 +1878,40 @@ extern int ext4_group_extend(struct super_block *sb, · 1877 unmodified lines
18781878 extern void *ext4_kvmalloc(size_t size, gfp_t flags);
18791879 extern void *ext4_kvzalloc(size_t size, gfp_t flags);
18801880 extern void ext4_kvfree(void *ptr);
1881−extern void __ext4_error(struct super_block *, const char *, unsigned int,
1882− const char *, ...)
1883− __attribute__ ((format (printf, 4, 5)));
1881+extern __printf(4, 5)
1882+void __ext4_error(struct super_block *, const char *, unsigned int,
1883+ const char *, ...);
18841884 #define ext4_error(sb, message...) __ext4_error(sb, __func__, \
18851885 __LINE__, ## message)
1886−extern void ext4_error_inode(struct inode *, const char *, unsigned int,
1887− ext4_fsblk_t, const char *, ...)
1888− __attribute__ ((format (printf, 5, 6)));
1889−extern void ext4_error_file(struct file *, const char *, unsigned int,
1890− ext4_fsblk_t, const char *, ...)
1891− __attribute__ ((format (printf, 5, 6)));
1886+extern __printf(5, 6)
1887+void ext4_error_inode(struct inode *, const char *, unsigned int, ext4_fsblk_t,
1888+ const char *, ...);
1889+extern __printf(5, 6)
1890+void ext4_error_file(struct file *, const char *, unsigned int, ext4_fsblk_t,
1891+ const char *, ...);
18921892 extern void __ext4_std_error(struct super_block *, const char *,
18931893 unsigned int, int);
1894−extern void __ext4_abort(struct super_block *, const char *, unsigned int,
1895− const char *, ...)
1896− __attribute__ ((format (printf, 4, 5)));
1894+extern __printf(4, 5)
1895+void __ext4_abort(struct super_block *, const char *, unsigned int,
1896+ const char *, ...);
18971897 #define ext4_abort(sb, message...) __ext4_abort(sb, __func__, \
18981898 __LINE__, ## message)
1899−extern void __ext4_warning(struct super_block *, const char *, unsigned int,
1900− const char *, ...)
1901− __attribute__ ((format (printf, 4, 5)));
1899+extern __printf(4, 5)
1900+void __ext4_warning(struct super_block *, const char *, unsigned int,
1901+ const char *, ...);
19021902 #define ext4_warning(sb, message...) __ext4_warning(sb, __func__, \
19031903 __LINE__, ## message)
1904−extern void ext4_msg(struct super_block *, const char *, const char *, ...)
1905− __attribute__ ((format (printf, 3, 4)));
1904+extern __printf(3, 4)
1905+void ext4_msg(struct super_block *, const char *, const char *, ...);
19061906 extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp,
19071907 const char *, unsigned int, const char *);
19081908 #define dump_mmp_msg(sb, mmp, msg) __dump_mmp_msg(sb, mmp, __func__, \
19091909 __LINE__, msg)
1910−extern void __ext4_grp_locked_error(const char *, unsigned int, \
1911− struct super_block *, ext4_group_t, \
1912− unsigned long, ext4_fsblk_t, \
1913− const char *, ...)
1914− __attribute__ ((format (printf, 7, 8)));
1910+extern __printf(7, 8)
1911+void __ext4_grp_locked_error(const char *, unsigned int,
1912+ struct super_block *, ext4_group_t,
1913+ unsigned long, ext4_fsblk_t,
1914+ const char *, ...);
19151915 #define ext4_grp_locked_error(sb, grp, message...) \
19161916 __ext4_grp_locked_error(__func__, __LINE__, (sb), (grp), ## message)
19171917 extern 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
326326 extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
327327 struct inode *i2);
328328 /* fat/misc.c */
329−extern void
330−__fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
331− __attribute__ ((format (printf, 3, 4))) __cold;
329+extern __printf(3, 4) __cold
330+void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...);
332331 #define fat_fs_error(sb, fmt, args...) \
333332 __fat_fs_error(sb, 1, fmt , ## args)
334333 #define fat_fs_error_ratelimit(sb, fmt, args...) \
335334 __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)
336−void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...)
337− __attribute__ ((format (printf, 3, 4))) __cold;
335+__printf(3, 4) __cold
336+void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...);
338337 extern int fat_clusters_flush(struct super_block *sb);
339338 extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
340339 extern 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
201201 void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs);
202202 void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs);
203203
204−__attribute__ ((format(printf, 2, 3)))
204+__printf(2, 3)
205205 void gfs2_print_dbg(struct seq_file *seq, const char *fmt, ...);
206206
207207 /**
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
311311
312312 /* super.c */
313313
314−void hpfs_error(struct super_block *, const char *, ...)
315− __attribute__((format (printf, 2, 3)));
314+__printf(2, 3)
315+void hpfs_error(struct super_block *, const char *, ...);
316316 int hpfs_stop_cycles(struct super_block *, int, int *, int *, char *);
317317 unsigned hpfs_count_one_bitmap(struct super_block *, secno);
318318
fs/nilfs2/nilfs.h+4−4
@@ -276,10 +276,10 @@ int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, · 275 unmodified lines
276276 /* super.c */
277277 extern struct inode *nilfs_alloc_inode(struct super_block *);
278278 extern void nilfs_destroy_inode(struct inode *);
279−extern void nilfs_error(struct super_block *, const char *, const char *, ...)
280− __attribute__ ((format (printf, 3, 4)));
281−extern void nilfs_warning(struct super_block *, const char *, const char *, ...)
282− __attribute__ ((format (printf, 3, 4)));
279+extern __printf(3, 4)
280+void nilfs_error(struct super_block *, const char *, const char *, ...);
281+extern __printf(3, 4)
282+void nilfs_warning(struct super_block *, const char *, const char *, ...);
283283 extern struct nilfs_super_block *
284284 nilfs_read_super_block(struct super_block *, u64, int, struct buffer_head **);
285285 extern int nilfs_store_magic_and_option(struct super_block *,
fs/ntfs/debug.h+9−6
@@ -30,8 +30,9 @@ · 29 unmodified lines
3030
3131 extern int debug_msgs;
3232
33−extern void __ntfs_debug(const char *file, int line, const char *function,
34− const char *format, ...) __attribute__ ((format (printf, 4, 5)));
33+extern __printf(4, 5)
34+void __ntfs_debug(const char *file, int line, const char *function,
35+ const char *format, ...);
3536 /**
3637 * ntfs_debug - write a debug level message to syslog
3738 * @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
5253
5354 #endif /* !DEBUG */
5455
55−extern void __ntfs_warning(const char *function, const struct super_block *sb,
56− const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
56+extern __printf(3, 4)
57+void __ntfs_warning(const char *function, const struct super_block *sb,
58+ const char *fmt, ...);
5759 #define ntfs_warning(sb, f, a...) __ntfs_warning(__func__, sb, f, ##a)
5860
59−extern void __ntfs_error(const char *function, const struct super_block *sb,
60− const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
61+extern __printf(3, 4)
62+void __ntfs_error(const char *function, const struct super_block *sb,
63+ const char *fmt, ...);
6164 #define ntfs_error(sb, f, a...) __ntfs_error(__func__, sb, f, ##a)
6265
6366 #endif /* _LINUX_NTFS_DEBUG_H */
fs/ocfs2/super.h+6−8
@@ -31,17 +31,15 @@ extern struct workqueue_struct *ocfs2_wq; · 30 unmodified lines
3131 int ocfs2_publish_get_mount_state(struct ocfs2_super *osb,
3232 int node_num);
3333
34−void __ocfs2_error(struct super_block *sb,
35− const char *function,
36− const char *fmt, ...)
37− __attribute__ ((format (printf, 3, 4)));
34+__printf(3, 4)
35+void __ocfs2_error(struct super_block *sb, const char *function,
36+ const char *fmt, ...);
3837
3938 #define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)
4039
41−void __ocfs2_abort(struct super_block *sb,
42− const char *function,
43− const char *fmt, ...)
44− __attribute__ ((format (printf, 3, 4)));
40+__printf(3, 4)
41+void __ocfs2_abort(struct super_block *sb, const char *function,
42+ const char *fmt, ...);
4543
4644 #define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
4745
fs/partitions/ldm.c+9−7
@@ -49,18 +49,20 @@ · 48 unmodified lines
4949 #define ldm_error(f, a...) _ldm_printk (KERN_ERR, __func__, f, ##a)
5050 #define ldm_info(f, a...) _ldm_printk (KERN_INFO, __func__, f, ##a)
5151
52−__attribute__ ((format (printf, 3, 4)))
53−static void _ldm_printk (const char *level, const char *function,
54− const char *fmt, ...)
52+static __printf(3, 4)
53+void _ldm_printk(const char *level, const char *function, const char *fmt, ...)
5554 {
56− static char buf[128];
55+ struct va_format vaf;
5756 va_list args;
5857
5958 va_start (args, fmt);
60− vsnprintf (buf, sizeof (buf), fmt, args);
61− va_end (args);
6259
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);
6466 }
6567
6668 /**
fs/udf/udfdecl.h+2−2
@@ -112,8 +112,8 @@ struct extent_position { · 111 unmodified lines
112112
113113 /* super.c */
114114
115−__attribute__((format(printf, 3, 4)))
116−extern void udf_warning(struct super_block *, const char *, const char *, ...);
115+extern __printf(3, 4) void udf_warning(struct super_block *, const char *,
116+ const char *, ...);
117117 static inline void udf_updated_lvid(struct super_block *sb)
118118 {
119119 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
117117 extern const struct file_operations ufs_dir_operations;
118118
119119 /* super.c */
120−extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
121−extern void ufs_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
122−extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
120+extern __printf(3, 4)
121+void ufs_warning(struct super_block *, const char *, const char *, ...);
122+extern __printf(3, 4)
123+void ufs_error(struct super_block *, const char *, const char *, ...);
124+extern __printf(3, 4)
125+void ufs_panic(struct super_block *, const char *, const char *, ...);
123126
124127 /* symlink.c */
125128 extern const struct inode_operations ufs_fast_symlink_inode_operations;
fs/xfs/xfs_message.h+20−22
@@ -3,31 +3,29 @@ · 2 unmodified lines
33
44 struct xfs_mount;
55
6−extern void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...)
7− __attribute__ ((format (printf, 2, 3)));
8−extern void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...)
9− __attribute__ ((format (printf, 2, 3)));
10−extern void xfs_alert_tag(const struct xfs_mount *mp, int tag,
11− const char *fmt, ...)
12− __attribute__ ((format (printf, 3, 4)));
13−extern void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...)
14− __attribute__ ((format (printf, 2, 3)));
15−extern void xfs_err(const struct xfs_mount *mp, const char *fmt, ...)
16− __attribute__ ((format (printf, 2, 3)));
17−extern void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...)
18− __attribute__ ((format (printf, 2, 3)));
19−extern void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...)
20− __attribute__ ((format (printf, 2, 3)));
21−extern void xfs_info(const struct xfs_mount *mp, const char *fmt, ...)
22− __attribute__ ((format (printf, 2, 3)));
6+extern __printf(2, 3)
7+void xfs_emerg(const struct xfs_mount *mp, const char *fmt, ...);
8+extern __printf(2, 3)
9+void xfs_alert(const struct xfs_mount *mp, const char *fmt, ...);
10+extern __printf(3, 4)
11+void xfs_alert_tag(const struct xfs_mount *mp, int tag, const char *fmt, ...);
12+extern __printf(2, 3)
13+void xfs_crit(const struct xfs_mount *mp, const char *fmt, ...);
14+extern __printf(2, 3)
15+void xfs_err(const struct xfs_mount *mp, const char *fmt, ...);
16+extern __printf(2, 3)
17+void xfs_warn(const struct xfs_mount *mp, const char *fmt, ...);
18+extern __printf(2, 3)
19+void xfs_notice(const struct xfs_mount *mp, const char *fmt, ...);
20+extern __printf(2, 3)
21+void xfs_info(const struct xfs_mount *mp, const char *fmt, ...);
2322
2423 #ifdef DEBUG
25−extern void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
26− __attribute__ ((format (printf, 2, 3)));
24+extern __printf(2, 3)
25+void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...);
2726 #else
28−static inline void
29−__attribute__ ((format (printf, 2, 3)))
30−xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
27+static inline __printf(2, 3)
28+void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...)
3129 {
3230 }
3331 #endif
include/asm-generic/bug.h+6−5
@@ -61,11 +61,12 @@ struct bug_entry { · 60 unmodified lines
6161 */
6262 #ifndef __WARN_TAINT
6363 #ifndef __ASSEMBLY__
64−extern void warn_slowpath_fmt(const char *file, const int line,
65− const char *fmt, ...) __attribute__((format(printf, 3, 4)));
66−extern void warn_slowpath_fmt_taint(const char *file, const int line,
67− unsigned taint, const char *fmt, ...)
68− __attribute__((format(printf, 4, 5)));
64+extern __printf(3, 4)
65+void warn_slowpath_fmt(const char *file, const int line,
66+ const char *fmt, ...);
67+extern __printf(4, 5)
68+void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
69+ const char *fmt, ...);
6970 extern void warn_slowpath_null(const char *file, const int line);
7071 #define WANT_WARN_ON_SLOWPATH
7172 #endif
include/drm/drmP.h+5−5
@@ -122,12 +122,12 @@ struct drm_device; · 121 unmodified lines
122122 * using the DRM_DEBUG_KMS and DRM_DEBUG.
123123 */
124124
125−extern __attribute__((format (printf, 4, 5)))
125+extern __printf(4, 5)
126126 void drm_ut_debug_printk(unsigned int request_level,
127− const char *prefix,
128− const char *function_name,
129− const char *format, ...);
130−extern __attribute__((format (printf, 2, 3)))
127+ const char *prefix,
128+ const char *function_name,
129+ const char *format, ...);
130+extern __printf(2, 3)
131131 int drm_err(const char *func, const char *format, ...);
132132
133133 /***********************************************************************/
include/linux/audit.h+5−6
@@ -584,14 +584,13 @@ extern int audit_signals; · 583 unmodified lines
584584 #ifdef CONFIG_AUDIT
585585 /* These are defined in audit.c */
586586 /* Public API */
587−extern void audit_log(struct audit_context *ctx, gfp_t gfp_mask,
588− int type, const char *fmt, ...)
589− __attribute__((format(printf,4,5)));
587+extern __printf(4, 5)
588+void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
589+ const char *fmt, ...);
590590
591591 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,
593− const char *fmt, ...)
594− __attribute__((format(printf,2,3)));
592+extern __printf(2, 3)
593+void audit_log_format(struct audit_buffer *ab, const char *fmt, ...);
595594 extern void audit_log_end(struct audit_buffer *ab);
596595 extern int audit_string_contains_control(const char *string,
597596 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
170170 extern int do_blk_trace_setup(struct request_queue *q, char *name,
171171 dev_t dev, struct block_device *bdev,
172172 struct blk_user_trace_setup *buts);
173−extern __attribute__((format(printf, 2, 3)))
173+extern __printf(2, 3)
174174 void __trace_note_message(struct blk_trace *, const char *fmt, ...);
175175
176176 /**
include/linux/device.h+51−59
@@ -622,8 +622,8 @@ static inline const char *dev_name(const struct device *dev) · 621 unmodified lines
622622 return kobject_name(&dev->kobj);
623623 }
624624
625−extern int dev_set_name(struct device *dev, const char *name, ...)
626− __attribute__((format(printf, 2, 3)));
625+extern __printf(2, 3)
626+int dev_set_name(struct device *dev, const char *name, ...);
627627
628628 #ifdef CONFIG_NUMA
629629 static inline int dev_to_node(struct device *dev)
@@ -753,10 +753,10 @@ extern struct device *device_create_vargs(struct class *cls, · 123 unmodified lines
753753 void *drvdata,
754754 const char *fmt,
755755 va_list vargs);
756−extern struct device *device_create(struct class *cls, struct device *parent,
757− dev_t devt, void *drvdata,
758− const char *fmt, ...)
759− __attribute__((format(printf, 5, 6)));
756+extern __printf(5, 6)
757+struct device *device_create(struct class *cls, struct device *parent,
758+ dev_t devt, void *drvdata,
759+ const char *fmt, ...);
760760 extern void device_destroy(struct class *cls, dev_t devt);
761761
762762 /*
@@ -800,64 +800,56 @@ extern const char *dev_driver_string(const struct device *dev); · 37 unmodified lines
800800
801801 extern int __dev_printk(const char *level, const struct device *dev,
802802 struct va_format *vaf);
803−extern int dev_printk(const char *level, const struct device *dev,
804− const char *fmt, ...)
805− __attribute__ ((format (printf, 3, 4)));
806−extern int dev_emerg(const struct device *dev, const char *fmt, ...)
807− __attribute__ ((format (printf, 2, 3)));
808−extern int dev_alert(const struct device *dev, const char *fmt, ...)
809− __attribute__ ((format (printf, 2, 3)));
810−extern int dev_crit(const struct device *dev, const char *fmt, ...)
811− __attribute__ ((format (printf, 2, 3)));
812−extern int dev_err(const struct device *dev, const char *fmt, ...)
813− __attribute__ ((format (printf, 2, 3)));
814−extern int dev_warn(const struct device *dev, const char *fmt, ...)
815− __attribute__ ((format (printf, 2, 3)));
816−extern int dev_notice(const struct device *dev, const char *fmt, ...)
817− __attribute__ ((format (printf, 2, 3)));
818−extern int _dev_info(const struct device *dev, const char *fmt, ...)
819− __attribute__ ((format (printf, 2, 3)));
803+extern __printf(3, 4)
804+int dev_printk(const char *level, const struct device *dev,
805+ const char *fmt, ...)
806+ ;
807+extern __printf(2, 3)
808+int dev_emerg(const struct device *dev, const char *fmt, ...);
809+extern __printf(2, 3)
810+int dev_alert(const struct device *dev, const char *fmt, ...);
811+extern __printf(2, 3)
812+int dev_crit(const struct device *dev, const char *fmt, ...);
813+extern __printf(2, 3)
814+int dev_err(const struct device *dev, const char *fmt, ...);
815+extern __printf(2, 3)
816+int dev_warn(const struct device *dev, const char *fmt, ...);
817+extern __printf(2, 3)
818+int dev_notice(const struct device *dev, const char *fmt, ...);
819+extern __printf(2, 3)
820+int _dev_info(const struct device *dev, const char *fmt, ...);
820821
821822 #else
822823
823824 static inline int __dev_printk(const char *level, const struct device *dev,
824825 struct va_format *vaf)
825− { return 0; }
826−static inline int dev_printk(const char *level, const struct device *dev,
827− const char *fmt, ...)
828− __attribute__ ((format (printf, 3, 4)));
829−static inline int dev_printk(const char *level, const struct device *dev,
830− const char *fmt, ...)
831− { return 0; }
832−
833−static inline int dev_emerg(const struct device *dev, const char *fmt, ...)
834− __attribute__ ((format (printf, 2, 3)));
835−static inline int dev_emerg(const struct device *dev, const char *fmt, ...)
836− { return 0; }
837−static inline int dev_crit(const struct device *dev, const char *fmt, ...)
838− __attribute__ ((format (printf, 2, 3)));
839−static inline int dev_crit(const struct device *dev, const char *fmt, ...)
840− { return 0; }
841−static inline int dev_alert(const struct device *dev, const char *fmt, ...)
842− __attribute__ ((format (printf, 2, 3)));
843−static inline int dev_alert(const struct device *dev, const char *fmt, ...)
844− { return 0; }
845−static inline int dev_err(const struct device *dev, const char *fmt, ...)
846− __attribute__ ((format (printf, 2, 3)));
847−static inline int dev_err(const struct device *dev, const char *fmt, ...)
848− { return 0; }
849−static inline int dev_warn(const struct device *dev, const char *fmt, ...)
850− __attribute__ ((format (printf, 2, 3)));
851−static inline int dev_warn(const struct device *dev, const char *fmt, ...)
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; }
826+{ return 0; }
827+static inline __printf(3, 4)
828+int dev_printk(const char *level, const struct device *dev,
829+ const char *fmt, ...)
830+{ return 0; }
831+
832+static inline __printf(2, 3)
833+int dev_emerg(const struct device *dev, const char *fmt, ...)
834+{ return 0; }
835+static inline __printf(2, 3)
836+int dev_crit(const struct device *dev, const char *fmt, ...)
837+{ return 0; }
838+static inline __printf(2, 3)
839+int dev_alert(const struct device *dev, const char *fmt, ...)
840+{ return 0; }
841+static inline __printf(2, 3)
842+int dev_err(const struct device *dev, const char *fmt, ...)
843+{ return 0; }
844+static inline __printf(2, 3)
845+int dev_warn(const struct device *dev, const char *fmt, ...)
846+{ return 0; }
847+static inline __printf(2, 3)
848+int dev_notice(const struct device *dev, const char *fmt, ...)
849+{ return 0; }
850+static inline __printf(2, 3)
851+int _dev_info(const struct device *dev, const char *fmt, ...)
852+{ return 0; }
861853
862854 #endif
863855
include/linux/dynamic_debug.h+9−10
@@ -37,22 +37,21 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, · 36 unmodified lines
3737
3838 #if defined(CONFIG_DYNAMIC_DEBUG)
3939 extern int ddebug_remove_module(const char *mod_name);
40−extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
41− __attribute__ ((format (printf, 2, 3)));
40+extern __printf(2, 3)
41+int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
4242
4343 struct device;
4444
45−extern int __dynamic_dev_dbg(struct _ddebug *descriptor,
46− const struct device *dev,
47− const char *fmt, ...)
48− __attribute__ ((format (printf, 3, 4)));
45+extern __printf(3, 4)
46+int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
47+ const char *fmt, ...);
4948
5049 struct net_device;
5150
52−extern int __dynamic_netdev_dbg(struct _ddebug *descriptor,
53− const struct net_device *dev,
54− const char *fmt, ...)
55− __attribute__ ((format (printf, 3, 4)));
51+extern __printf(3, 4)
52+int __dynamic_netdev_dbg(struct _ddebug *descriptor,
53+ const struct net_device *dev,
54+ const char *fmt, ...);
5655
5756 #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \
5857 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
937937 ext3_fsblk_t n_blocks_count);
938938
939939 /* super.c */
940−extern void ext3_error (struct super_block *, const char *, const char *, ...)
941− __attribute__ ((format (printf, 3, 4)));
940+extern __printf(3, 4)
941+void ext3_error(struct super_block *, const char *, const char *, ...);
942942 extern void __ext3_std_error (struct super_block *, const char *, int);
943−extern void ext3_abort (struct super_block *, const char *, const char *, ...)
944− __attribute__ ((format (printf, 3, 4)));
945−extern void ext3_warning (struct super_block *, const char *, const char *, ...)
946− __attribute__ ((format (printf, 3, 4)));
947−extern void ext3_msg(struct super_block *, const char *, const char *, ...)
948− __attribute__ ((format (printf, 3, 4)));
943+extern __printf(3, 4)
944+void ext3_abort(struct super_block *, const char *, const char *, ...);
945+extern __printf(3, 4)
946+void ext3_warning(struct super_block *, const char *, const char *, ...);
947+extern __printf(3, 4)
948+void ext3_msg(struct super_block *, const char *, const char *, ...);
949949 extern void ext3_update_dynamic_rev (struct super_block *sb);
950950
951951 #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
26352635 .llseek = generic_file_llseek, \
26362636 };
26372637
2638−static inline void __attribute__((format(printf, 1, 2)))
2639−__simple_attr_check_format(const char *fmt, ...)
2638+static inline __printf(1, 2)
2639+void __simple_attr_check_format(const char *fmt, ...)
26402640 {
26412641 /* don't do anything, just let the compiler check the arguments; */
26422642 }
include/linux/fscache-cache.h+4−4
@@ -492,10 +492,10 @@ static inline void fscache_end_io(struct fscache_retrieval *op, · 491 unmodified lines
492492 /*
493493 * out-of-line cache backend functions
494494 */
495−extern void fscache_init_cache(struct fscache_cache *cache,
496− const struct fscache_cache_ops *ops,
497− const char *idfmt,
498− ...) __attribute__ ((format (printf, 3, 4)));
495+extern __printf(3, 4)
496+void fscache_init_cache(struct fscache_cache *cache,
497+ const struct fscache_cache_ops *ops,
498+ const char *idfmt, ...);
499499
500500 extern int fscache_add_cache(struct fscache_cache *cache,
501501 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
7878
7979 void gameport_unregister_port(struct gameport *gameport);
8080
81−void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
82− __attribute__ ((format (printf, 2, 3)));
81+__printf(2, 3)
82+void gameport_set_phys(struct gameport *gameport, const char *fmt, ...);
8383
8484 #else
8585
@@ -93,8 +93,8 @@ static inline void gameport_unregister_port(struct gameport *gameport) · 7 unmodified lines
9393 return;
9494 }
9595
96−static inline void gameport_set_phys(struct gameport *gameport,
97− const char *fmt, ...)
96+static inline __printf(2, 3)
97+void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
9898 {
9999 return;
100100 }
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
101101 #endif /*CONFIG_KALLSYMS*/
102102
103103 /* This macro allows us to keep printk typechecking */
104−static void __check_printsym_format(const char *fmt, ...)
105−__attribute__((format(printf,1,2)));
106−static inline void __check_printsym_format(const char *fmt, ...)
104+static __printf(1, 2)
105+void __check_printsym_format(const char *fmt, ...)
107106 {
108107 }
109108
include/linux/kdb.h+3−6
@@ -114,12 +114,9 @@ typedef enum { · 113 unmodified lines
114114 } kdb_reason_t;
115115
116116 extern int kdb_trap_printk;
117−extern int vkdb_printf(const char *fmt, va_list args)
118− __attribute__ ((format (printf, 1, 0)));
119−extern int kdb_printf(const char *, ...)
120− __attribute__ ((format (printf, 1, 2)));
121−typedef int (*kdb_printf_t)(const char *, ...)
122− __attribute__ ((format (printf, 1, 2)));
117+extern __printf(1, 0) int vkdb_printf(const char *fmt, va_list args);
118+extern __printf(1, 2) int kdb_printf(const char *, ...);
119+typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...);
123120
124121 extern void kdb_init(int level);
125122
include/linux/kernel.h+20−24
@@ -296,20 +296,18 @@ extern long long simple_strtoll(const char *,char **,unsigned int); · 295 unmodified lines
296296 #define strict_strtoull kstrtoull
297297 #define strict_strtoll kstrtoll
298298
299−extern int sprintf(char * buf, const char * fmt, ...)
300− __attribute__ ((format (printf, 2, 3)));
301−extern int vsprintf(char *buf, const char *, va_list)
302− __attribute__ ((format (printf, 2, 0)));
303−extern int snprintf(char * buf, size_t size, const char * fmt, ...)
304− __attribute__ ((format (printf, 3, 4)));
305−extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
306− __attribute__ ((format (printf, 3, 0)));
307−extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
308− __attribute__ ((format (printf, 3, 4)));
309−extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
310− __attribute__ ((format (printf, 3, 0)));
311−extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
312− __attribute__ ((format (printf, 2, 3)));
299+extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...);
300+extern __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
301+extern __printf(3, 4)
302+int snprintf(char *buf, size_t size, const char *fmt, ...);
303+extern __printf(3, 0)
304+int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
305+extern __printf(3, 4)
306+int scnprintf(char *buf, size_t size, const char *fmt, ...);
307+extern __printf(3, 0)
308+int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
309+extern __printf(2, 3)
310+char *kasprintf(gfp_t gfp, const char *fmt, ...);
313311 extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
314312
315313 extern int sscanf(const char *, const char *, ...)
@@ -427,8 +425,8 @@ extern void tracing_start(void); · 111 unmodified lines
427425 extern void tracing_stop(void);
428426 extern void ftrace_off_permanent(void);
429427
430−static inline void __attribute__ ((format (printf, 1, 2)))
431−____trace_printk_check_format(const char *fmt, ...)
428+static inline __printf(1, 2)
429+void ____trace_printk_check_format(const char *fmt, ...)
432430 {
433431 }
434432 #define __trace_printk_check_format(fmt, args...) \
@@ -467,13 +465,11 @@ do { \ · 32 unmodified lines
467465 __trace_printk(_THIS_IP_, fmt, ##args); \
468466 } while (0)
469467
470−extern int
471−__trace_bprintk(unsigned long ip, const char *fmt, ...)
472− __attribute__ ((format (printf, 2, 3)));
468+extern __printf(2, 3)
469+int __trace_bprintk(unsigned long ip, const char *fmt, ...);
473470
474−extern int
475−__trace_printk(unsigned long ip, const char *fmt, ...)
476− __attribute__ ((format (printf, 2, 3)));
471+extern __printf(2, 3)
472+int __trace_printk(unsigned long ip, const char *fmt, ...);
477473
478474 extern void trace_dump_stack(void);
479475
@@ -502,8 +498,8 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); · 22 unmodified lines
502498
503499 extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);
504500 #else
505−static inline int
506−trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
501+static inline __printf(1, 2)
502+int trace_printk(const char *fmt, ...);
507503
508504 static inline void tracing_start(void) { }
509505 static 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
130130 void crash_save_cpu(struct pt_regs *regs, int cpu);
131131 void crash_save_vmcoreinfo(void);
132132 void arch_crash_save_vmcoreinfo(void);
133−void vmcoreinfo_append_str(const char *fmt, ...)
134− __attribute__ ((format (printf, 1, 2)));
133+__printf(1, 2)
134+void vmcoreinfo_append_str(const char *fmt, ...);
135135 unsigned long paddr_vmcoreinfo_note(void);
136136
137137 #define VMCOREINFO_OSRELEASE(value) \
include/linux/kmod.h+2−2
@@ -32,8 +32,8 @@ · 31 unmodified lines
3232 extern char modprobe_path[]; /* for sysctl */
3333 /* modprobe exit status on success, -ve on error. Return value
3434 * usually useless though. */
35−extern int __request_module(bool wait, const char *name, ...) \
36− __attribute__((format(printf, 2, 3)));
35+extern __printf(2, 3)
36+int __request_module(bool wait, const char *name, ...);
3737 #define request_module(mod...) __request_module(true, mod)
3838 #define request_module_nowait(mod...) __request_module(false, mod)
3939 #define try_then_request_module(x, mod...) \
include/linux/kobject.h+12−14
@@ -72,8 +72,8 @@ struct kobject { · 71 unmodified lines
7272 unsigned int uevent_suppress:1;
7373 };
7474
75−extern int kobject_set_name(struct kobject *kobj, const char *name, ...)
76− __attribute__((format(printf, 2, 3)));
75+extern __printf(2, 3)
76+int kobject_set_name(struct kobject *kobj, const char *name, ...);
7777 extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
7878 va_list vargs);
7979
@@ -83,15 +83,13 @@ static inline const char *kobject_name(const struct kobject *kobj) · 3 unmodified lines
8383 }
8484
8585 extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
86−extern int __must_check kobject_add(struct kobject *kobj,
87− struct kobject *parent,
88− const char *fmt, ...)
89− __attribute__((format(printf, 3, 4)));
90−extern int __must_check kobject_init_and_add(struct kobject *kobj,
91− struct kobj_type *ktype,
92− struct kobject *parent,
93− const char *fmt, ...)
94− __attribute__((format(printf, 4, 5)));
86+extern __printf(3, 4) __must_check
87+int kobject_add(struct kobject *kobj, struct kobject *parent,
88+ const char *fmt, ...);
89+extern __printf(4, 5) __must_check
90+int kobject_init_and_add(struct kobject *kobj,
91+ struct kobj_type *ktype, struct kobject *parent,
92+ const char *fmt, ...);
9593
9694 extern void kobject_del(struct kobject *kobj);
9795
@@ -212,8 +210,8 @@ int kobject_uevent(struct kobject *kobj, enum kobject_action action); · 114 unmodified lines
212210 int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
213211 char *envp[]);
214212
215−int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
216− __attribute__((format (printf, 2, 3)));
213+__printf(2, 3)
214+int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...);
217215
218216 int kobject_action_type(const char *buf, size_t count,
219217 enum kobject_action *type);
@@ -226,7 +224,7 @@ static inline int kobject_uevent_env(struct kobject *kobj, · 6 unmodified lines
226224 char *envp[])
227225 { return 0; }
228226
229−static inline __attribute__((format(printf, 2, 3)))
227+static inline __printf(2, 3)
230228 int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
231229 { return 0; }
232230
include/linux/kthread.h+2−2
@@ -4,11 +4,11 @@ · 3 unmodified lines
44 #include <linux/err.h>
55 #include <linux/sched.h>
66
7+__printf(4, 5)
78 struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
89 void *data,
910 int node,
10− const char namefmt[], ...)
11− __attribute__((format(printf, 4, 5)));
11+ const char namefmt[], ...);
1212
1313 #define kthread_create(threadfn, data, namefmt, arg...) \
1414 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
12561256 /*
12571257 * printk helpers
12581258 */
1259−__attribute__((format (printf, 3, 4)))
1259+__printf(3, 4)
12601260 int ata_port_printk(const struct ata_port *ap, const char *level,
12611261 const char *fmt, ...);
1262−__attribute__((format (printf, 3, 4)))
1262+__printf(3, 4)
12631263 int ata_link_printk(const struct ata_link *link, const char *level,
12641264 const char *fmt, ...);
1265−__attribute__((format (printf, 3, 4)))
1265+__printf(3, 4)
12661266 int ata_dev_printk(const struct ata_device *dev, const char *level,
12671267 const char *fmt, ...);
12681268
@@ -1304,10 +1304,10 @@ void ata_print_version(const struct device *dev, const char *version); · 35 unmodified lines
13041304 /*
13051305 * ata_eh_info helpers
13061306 */
1307−extern void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...)
1308− __attribute__ ((format (printf, 2, 3)));
1309−extern void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...)
1310− __attribute__ ((format (printf, 2, 3)));
1307+extern __printf(2, 3)
1308+void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...);
1309+extern __printf(2, 3)
1310+void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...);
13111311 extern void ata_ehi_clear_desc(struct ata_eh_info *ehi);
13121312
13131313 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) · 7 unmodified lines
13211321 /*
13221322 * port description helpers
13231323 */
1324−extern void ata_port_desc(struct ata_port *ap, const char *fmt, ...)
1325− __attribute__ ((format (printf, 2, 3)));
1324+extern __printf(2, 3)
1325+void ata_port_desc(struct ata_port *ap, const char *fmt, ...);
13261326 #ifdef CONFIG_PCI
13271327 extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset,
13281328 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
4949 extern void mmiotrace_iounmap(volatile void __iomem *addr);
5050
5151 /* For anyone to insert markers. Remember trailing newline. */
52−extern int mmiotrace_printk(const char *fmt, ...)
53− __attribute__ ((format (printf, 1, 2)));
52+extern __printf(1, 2) int mmiotrace_printk(const char *fmt, ...);
5453 #else /* !CONFIG_MMIOTRACE: */
5554 static inline int is_kmmio_active(void)
5655 {
@@ -71,10 +70,7 @@ static inline void mmiotrace_iounmap(volatile void __iomem *addr) · 14 unmodified lines
7170 {
7271 }
7372
74−static inline int mmiotrace_printk(const char *fmt, ...)
75− __attribute__ ((format (printf, 1, 0)));
76−
77−static inline int mmiotrace_printk(const char *fmt, ...)
73+static inline __printf(1, 2) int mmiotrace_printk(const char *fmt, ...)
7874 {
7975 return 0;
8076 }
include/linux/netdevice.h+17−17
@@ -2622,23 +2622,23 @@ static inline const char *netdev_name(const struct net_device *dev) · 2621 unmodified lines
26222622 extern int __netdev_printk(const char *level, const struct net_device *dev,
26232623 struct va_format *vaf);
26242624
2625−extern int netdev_printk(const char *level, const struct net_device *dev,
2626− const char *format, ...)
2627− __attribute__ ((format (printf, 3, 4)));
2628−extern int netdev_emerg(const struct net_device *dev, const char *format, ...)
2629− __attribute__ ((format (printf, 2, 3)));
2630−extern int netdev_alert(const struct net_device *dev, const char *format, ...)
2631− __attribute__ ((format (printf, 2, 3)));
2632−extern int netdev_crit(const struct net_device *dev, const char *format, ...)
2633− __attribute__ ((format (printf, 2, 3)));
2634−extern int netdev_err(const struct net_device *dev, const char *format, ...)
2635− __attribute__ ((format (printf, 2, 3)));
2636−extern int netdev_warn(const struct net_device *dev, const char *format, ...)
2637− __attribute__ ((format (printf, 2, 3)));
2638−extern int netdev_notice(const struct net_device *dev, const char *format, ...)
2639− __attribute__ ((format (printf, 2, 3)));
2640−extern int netdev_info(const struct net_device *dev, const char *format, ...)
2641− __attribute__ ((format (printf, 2, 3)));
2625+extern __printf(3, 4)
2626+int netdev_printk(const char *level, const struct net_device *dev,
2627+ const char *format, ...);
2628+extern __printf(2, 3)
2629+int netdev_emerg(const struct net_device *dev, const char *format, ...);
2630+extern __printf(2, 3)
2631+int netdev_alert(const struct net_device *dev, const char *format, ...);
2632+extern __printf(2, 3)
2633+int netdev_crit(const struct net_device *dev, const char *format, ...);
2634+extern __printf(2, 3)
2635+int netdev_err(const struct net_device *dev, const char *format, ...);
2636+extern __printf(2, 3)
2637+int netdev_warn(const struct net_device *dev, const char *format, ...);
2638+extern __printf(2, 3)
2639+int netdev_notice(const struct net_device *dev, const char *format, ...);
2640+extern __printf(2, 3)
2641+int netdev_info(const struct net_device *dev, const char *format, ...);
26422642
26432643 #define MODULE_ALIAS_NETDEV(device) \
26442644 MODULE_ALIAS("netdev-" device)
include/linux/printk.h+6−6
@@ -82,22 +82,22 @@ struct va_format { · 81 unmodified lines
8282 * Dummy printk for disabled debugging statements to use whilst maintaining
8383 * gcc's format and side-effect checking.
8484 */
85−static inline __attribute__ ((format (printf, 1, 2)))
85+static inline __printf(1, 2)
8686 int no_printk(const char *fmt, ...)
8787 {
8888 return 0;
8989 }
9090
91−extern asmlinkage __attribute__ ((format (printf, 1, 2)))
91+extern asmlinkage __printf(1, 2)
9292 void early_printk(const char *fmt, ...);
9393
9494 extern int printk_needs_cpu(int cpu);
9595 extern void printk_tick(void);
9696
9797 #ifdef CONFIG_PRINTK
98−asmlinkage __attribute__ ((format (printf, 1, 0)))
98+asmlinkage __printf(1, 0)
9999 int vprintk(const char *fmt, va_list args);
100−asmlinkage __attribute__ ((format (printf, 1, 2))) __cold
100+asmlinkage __printf(1, 2) __cold
101101 int printk(const char *fmt, ...);
102102
103103 /*
@@ -117,12 +117,12 @@ extern int kptr_restrict; · 13 unmodified lines
117117 void log_buf_kexec_setup(void);
118118 void __init setup_log_buf(int early);
119119 #else
120−static inline __attribute__ ((format (printf, 1, 0)))
120+static inline __printf(1, 0)
121121 int vprintk(const char *s, va_list args)
122122 {
123123 return 0;
124124 }
125−static inline __attribute__ ((format (printf, 1, 2))) __cold
125+static inline __printf(1, 2) __cold
126126 int printk(const char *s, ...)
127127 {
128128 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
3131 #define quota_error(sb, fmt, args...) \
3232 __quota_error((sb), __func__, fmt , ## args)
3333
34−extern __attribute__((format (printf, 3, 4)))
34+extern __printf(3, 4)
3535 void __quota_error(struct super_block *sb, const char *func,
3636 const char *fmt, ...);
3737
include/linux/seq_file.h+1−2
@@ -84,8 +84,7 @@ int seq_putc(struct seq_file *m, char c); · 83 unmodified lines
8484 int seq_puts(struct seq_file *m, const char *s);
8585 int seq_write(struct seq_file *seq, const void *data, size_t len);
8686
87−int seq_printf(struct seq_file *, const char *, ...)
88− __attribute__ ((format (printf,2,3)));
87+__printf(2, 3) int seq_printf(struct seq_file *, const char *, ...);
8988
9089 int seq_path(struct seq_file *, struct path *, char *);
9190 int 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
2929 * Currently only defined when tracing is enabled.
3030 */
3131 #ifdef CONFIG_TRACING
32−extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
33− __attribute__ ((format (printf, 2, 3)));
34−extern int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args)
35− __attribute__ ((format (printf, 2, 0)));
32+extern __printf(2, 3)
33+int trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
34+extern __printf(2, 0)
35+int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
3636 extern int
3737 trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
3838 extern 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
7777 #define BT_POWER_FORCE_ACTIVE_OFF 0
7878 #define BT_POWER_FORCE_ACTIVE_ON 1
7979
80−__attribute__((format (printf, 2, 3)))
80+__printf(2, 3)
8181 int bt_printk(const char *level, const char *fmt, ...);
8282
8383 #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
5353 void nf_log_unbind_pf(u_int8_t pf);
5454
5555 /* Calls the registered backend logging function */
56+__printf(7, 8)
5657 void nf_log_packet(u_int8_t pf,
5758 unsigned int hooknum,
5859 const struct sk_buff *skb,
5960 const struct net_device *in,
6061 const struct net_device *out,
6162 const struct nf_loginfo *li,
62− const char *fmt, ...) __attribute__ ((format(printf,7,8)));
63+ const char *fmt, ...);
6364
6465 #endif /* _NF_LOG_H */
include/net/sock.h+2−2
@@ -76,8 +76,8 @@ · 75 unmodified lines
7676 printk(KERN_DEBUG msg); } while (0)
7777 #else
7878 /* Validate arguments and do nothing */
79−static inline void __attribute__ ((format (printf, 2, 3)))
80−SOCK_DEBUG(struct sock *sk, const char *msg, ...)
79+static inline __printf(2, 3)
80+void SOCK_DEBUG(struct sock *sk, const char *msg, ...)
8181 {
8282 }
8383 #endif
include/sound/core.h+2−2
@@ -326,9 +326,9 @@ void release_and_free_resource(struct resource *res); · 325 unmodified lines
326326 /* --- */
327327
328328 #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
329+__printf(4, 5)
329330 void __snd_printk(unsigned int level, const char *file, int line,
330− const char *format, ...)
331− __attribute__ ((format (printf, 4, 5)));
331+ const char *format, ...);
332332 #else
333333 #define __snd_printk(level, file, line, format, args...) \
334334 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
110110 static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
111111 #endif
112112
113−int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) \
114− __attribute__ ((format (printf, 2, 3)));
113+__printf(2, 3)
114+int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...);
115115 int snd_info_init(void);
116116 int snd_info_done(void);
117117
include/sound/seq_kernel.h+2−2
@@ -75,9 +75,9 @@ struct snd_seq_port_callback { · 74 unmodified lines
7575 };
7676
7777 /* interface for kernel client */
78+__printf(3, 4)
7879 int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
79− const char *name_fmt, ...)
80− __attribute__ ((format (printf, 3, 4)));
80+ const char *name_fmt, ...);
8181 int snd_seq_delete_kernel_client(int client);
8282 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
8383 int 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
66 #ifdef CONFIG_HVC_XEN
77 void xen_console_resume(void);
88 void xen_raw_console_write(const char *str);
9−__attribute__((format(printf, 1, 2)))
9+__printf(1, 2)
1010 void xen_raw_printk(const char *fmt, ...);
1111 #else
1212 static inline void xen_console_resume(void) { }
1313 static inline void xen_raw_console_write(const char *str) { }
14−static inline __attribute__((format(printf, 1, 2)))
14+static inline __printf(1, 2)
1515 void xen_raw_printk(const char *fmt, ...) { }
1616 #endif
1717
include/xen/xenbus.h+6−6
@@ -156,9 +156,9 @@ int xenbus_scanf(struct xenbus_transaction t, · 155 unmodified lines
156156 __attribute__((format(scanf, 4, 5)));
157157
158158 /* Single printf and write: returns -errno or 0. */
159+__printf(4, 5)
159160 int xenbus_printf(struct xenbus_transaction t,
160− const char *dir, const char *node, const char *fmt, ...)
161− __attribute__((format(printf, 4, 5)));
161+ const char *dir, const char *node, const char *fmt, ...);
162162
163163 /* Generic read function: NULL-terminated triples of name,
164164 * 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
200200 struct xenbus_watch *watch,
201201 void (*callback)(struct xenbus_watch *,
202202 const char **, unsigned int));
203+__printf(4, 5)
203204 int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch,
204205 void (*callback)(struct xenbus_watch *,
205206 const char **, unsigned int),
206− const char *pathfmt, ...)
207− __attribute__ ((format (printf, 4, 5)));
207+ const char *pathfmt, ...);
208208
209209 int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state);
210210 int 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
223223
224224 enum xenbus_state xenbus_read_driver_state(const char *path);
225225
226−__attribute__((format(printf, 3, 4)))
226+__printf(3, 4)
227227 void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt, ...);
228−__attribute__((format(printf, 3, 4)))
228+__printf(3, 4)
229229 void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt, ...);
230230
231231 const char *xenbus_strstate(enum xenbus_state state);
net/nfc/nfc.h+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 #include <net/nfc/nfc.h>
2828 #include <net/sock.h>
2929
30−__attribute__((format (printf, 2, 3)))
30+__printf(2, 3)
3131 int nfc_printk(const char *level, const char *fmt, ...);
3232
3333 #define nfc_info(fmt, arg...) nfc_printk(KERN_INFO, fmt, ##arg)
net/rds/rds.h+4−4
@@ -36,8 +36,8 @@ · 35 unmodified lines
3636 #define rdsdebug(fmt, args...) pr_debug("%s(): " fmt, __func__ , ##args)
3737 #else
3838 /* sigh, pr_debug() causes unused variable warnings */
39−static inline void __attribute__ ((format (printf, 1, 2)))
40−rdsdebug(char *fmt, ...)
39+static inline __printf(1, 2)
40+void rdsdebug(char *fmt, ...)
4141 {
4242 }
4343 #endif
@@ -625,8 +625,8 @@ void rds_for_each_conn_info(struct socket *sock, unsigned int len, · 581 unmodified lines
625625 struct rds_info_lengths *lens,
626626 int (*visitor)(struct rds_connection *, void *),
627627 size_t item_len);
628−void __rds_conn_error(struct rds_connection *conn, const char *, ...)
629− __attribute__ ((format (printf, 2, 3)));
628+__printf(2, 3)
629+void __rds_conn_error(struct rds_connection *conn, const char *, ...);
630630 #define rds_conn_error(conn, fmt...) \
631631 __rds_conn_error(conn, KERN_WARNING "RDS: " fmt)
632632
net/sunrpc/svc.c+2−3
@@ -971,9 +971,8 @@ static void svc_unregister(const struct svc_serv *serv) · 970 unmodified lines
971971 /*
972972 * Printk the given error with the address of the client that caused it.
973973 */
974−static int
975−__attribute__ ((format (printf, 2, 3)))
976−svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
974+static __printf(2, 3)
975+int svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
977976 {
978977 va_list args;
979978 int r;
sound/firewire/cmp.c+1−1
@@ -32,7 +32,7 @@ enum bus_reset_handling { · 31 unmodified lines
3232 SUCCEED_ON_BUS_RESET,
3333 };
3434
35−static __attribute__((format(printf, 2, 3)))
35+static __printf(2, 3)
3636 void cmp_error(struct cmp_connection *c, const char *fmt, ...)
3737 {
3838 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