treewide: use __printf not __attribute__((format(printf,...)))
authorJoe Perches <joe@perches.com>
Tue, 1 Nov 2011 00:11:33 +0000 (17:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 1 Nov 2011 00:30:54 +0000 (17:30 -0700)
commitb9075fa968a0a4347aef35e235e2995c0e57dddd
treecf9f9716784e790d8a43339653256d9cf9178ff3
parentae29bc92da01a2e9d278a9a58c3b307d41cc0254
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>
61 files changed:
drivers/isdn/hisax/callc.c
drivers/isdn/hisax/hisax.h
drivers/isdn/hisax/isdnl1.h
drivers/isdn/hisax/isdnl3.c
drivers/isdn/hisax/st5481_d.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
drivers/net/wireless/ath/ath.h
drivers/net/wireless/ath/ath5k/debug.h
drivers/net/wireless/ath/ath6kl/debug.h
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43legacy/b43legacy.h
drivers/staging/iio/trigger.h
fs/ecryptfs/ecryptfs_kernel.h
fs/ext2/ext2.h
fs/ext4/ext4.h
fs/fat/fat.h
fs/gfs2/glock.h
fs/hpfs/hpfs_fn.h
fs/nilfs2/nilfs.h
fs/ntfs/debug.h
fs/ocfs2/super.h
fs/partitions/ldm.c
fs/udf/udfdecl.h
fs/ufs/ufs.h
fs/xfs/xfs_message.h
include/asm-generic/bug.h
include/drm/drmP.h
include/linux/audit.h
include/linux/blktrace_api.h
include/linux/device.h
include/linux/dynamic_debug.h
include/linux/ext3_fs.h
include/linux/fs.h
include/linux/fscache-cache.h
include/linux/gameport.h
include/linux/kallsyms.h
include/linux/kdb.h
include/linux/kernel.h
include/linux/kexec.h
include/linux/kmod.h
include/linux/kobject.h
include/linux/kthread.h
include/linux/libata.h
include/linux/mmiotrace.h
include/linux/netdevice.h
include/linux/printk.h
include/linux/quotaops.h
include/linux/seq_file.h
include/linux/trace_seq.h
include/net/bluetooth/bluetooth.h
include/net/netfilter/nf_log.h
include/net/sock.h
include/sound/core.h
include/sound/info.h
include/sound/seq_kernel.h
include/xen/hvc-console.h
include/xen/xenbus.h
net/nfc/nfc.h
net/rds/rds.h
net/sunrpc/svc.c
sound/firewire/cmp.c