diff options
author | Joe Perches <joe@perches.com> | 2011-10-31 20:11:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:54 -0400 |
commit | b9075fa968a0a4347aef35e235e2995c0e57dddd (patch) | |
tree | cf9f9716784e790d8a43339653256d9cf9178ff3 /include/linux/libata.h | |
parent | ae29bc92da01a2e9d278a9a58c3b307d41cc0254 (diff) |
treewide: use __printf not __attribute__((format(printf,...)))
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.
Done via script and a little typing.
$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'
[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 23fa829bf7a3..cafc09a64fe4 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1256,13 +1256,13 @@ static inline int sata_srst_pmp(struct ata_link *link) | |||
1256 | /* | 1256 | /* |
1257 | * printk helpers | 1257 | * printk helpers |
1258 | */ | 1258 | */ |
1259 | __attribute__((format (printf, 3, 4))) | 1259 | __printf(3, 4) |
1260 | int ata_port_printk(const struct ata_port *ap, const char *level, | 1260 | int ata_port_printk(const struct ata_port *ap, const char *level, |
1261 | const char *fmt, ...); | 1261 | const char *fmt, ...); |
1262 | __attribute__((format (printf, 3, 4))) | 1262 | __printf(3, 4) |
1263 | int ata_link_printk(const struct ata_link *link, const char *level, | 1263 | int ata_link_printk(const struct ata_link *link, const char *level, |
1264 | const char *fmt, ...); | 1264 | const char *fmt, ...); |
1265 | __attribute__((format (printf, 3, 4))) | 1265 | __printf(3, 4) |
1266 | int ata_dev_printk(const struct ata_device *dev, const char *level, | 1266 | int ata_dev_printk(const struct ata_device *dev, const char *level, |
1267 | const char *fmt, ...); | 1267 | const char *fmt, ...); |
1268 | 1268 | ||
@@ -1304,10 +1304,10 @@ void ata_print_version(const struct device *dev, const char *version); | |||
1304 | /* | 1304 | /* |
1305 | * ata_eh_info helpers | 1305 | * ata_eh_info helpers |
1306 | */ | 1306 | */ |
1307 | extern void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) | 1307 | extern __printf(2, 3) |
1308 | __attribute__ ((format (printf, 2, 3))); | 1308 | void __ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...); |
1309 | extern void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...) | 1309 | extern __printf(2, 3) |
1310 | __attribute__ ((format (printf, 2, 3))); | 1310 | void ata_ehi_push_desc(struct ata_eh_info *ehi, const char *fmt, ...); |
1311 | extern void ata_ehi_clear_desc(struct ata_eh_info *ehi); | 1311 | extern void ata_ehi_clear_desc(struct ata_eh_info *ehi); |
1312 | 1312 | ||
1313 | static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) | 1313 | static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) |
@@ -1321,8 +1321,8 @@ static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) | |||
1321 | /* | 1321 | /* |
1322 | * port description helpers | 1322 | * port description helpers |
1323 | */ | 1323 | */ |
1324 | extern void ata_port_desc(struct ata_port *ap, const char *fmt, ...) | 1324 | extern __printf(2, 3) |
1325 | __attribute__ ((format (printf, 2, 3))); | 1325 | void ata_port_desc(struct ata_port *ap, const char *fmt, ...); |
1326 | #ifdef CONFIG_PCI | 1326 | #ifdef CONFIG_PCI |
1327 | extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset, | 1327 | extern void ata_port_pbar_desc(struct ata_port *ap, int bar, ssize_t offset, |
1328 | const char *name); | 1328 | const char *name); |