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 /drivers/isdn | |
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 'drivers/isdn')
-rw-r--r-- | drivers/isdn/hisax/callc.c | 4 | ||||
-rw-r--r-- | drivers/isdn/hisax/hisax.h | 4 | ||||
-rw-r--r-- | drivers/isdn/hisax/isdnl1.h | 2 | ||||
-rw-r--r-- | drivers/isdn/hisax/isdnl3.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hisax/st5481_d.c | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c index 37e685eafd24..c4897e1075d8 100644 --- a/drivers/isdn/hisax/callc.c +++ b/drivers/isdn/hisax/callc.c | |||
@@ -65,7 +65,7 @@ hisax_findcard(int driverid) | |||
65 | return (struct IsdnCardState *) 0; | 65 | return (struct IsdnCardState *) 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | static __attribute__((format(printf, 3, 4))) void | 68 | static __printf(3, 4) void |
69 | link_debug(struct Channel *chanp, int direction, char *fmt, ...) | 69 | link_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) | |||
1068 | return 0; | 1068 | return 0; |
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | static __attribute__((format(printf, 2, 3))) void | 1071 | static __printf(2, 3) void |
1072 | callc_debug(struct FsmInst *fi, char *fmt, ...) | 1072 | callc_debug(struct FsmInst *fi, char *fmt, ...) |
1073 | { | 1073 | { |
1074 | va_list args; | 1074 | va_list args; |
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 0a5c42a3f125..aff45a11a92d 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h | |||
@@ -1287,9 +1287,9 @@ int jiftime(char *s, long mark); | |||
1287 | 1287 | ||
1288 | int HiSax_command(isdn_ctrl * ic); | 1288 | int HiSax_command(isdn_ctrl * ic); |
1289 | int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb); | 1289 | int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb); |
1290 | __attribute__((format(printf, 3, 4))) | 1290 | __printf(3, 4) |
1291 | void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...); | 1291 | void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...); |
1292 | __attribute__((format(printf, 3, 0))) | 1292 | __printf(3, 0) |
1293 | void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args); | 1293 | void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args); |
1294 | void HiSax_reportcard(int cardnr, int sel); | 1294 | void HiSax_reportcard(int cardnr, int sel); |
1295 | int QuickHex(char *txt, u_char * p, int cnt); | 1295 | int QuickHex(char *txt, u_char * p, int cnt); |
diff --git a/drivers/isdn/hisax/isdnl1.h b/drivers/isdn/hisax/isdnl1.h index 425d86116f2b..66ddcab19bba 100644 --- a/drivers/isdn/hisax/isdnl1.h +++ b/drivers/isdn/hisax/isdnl1.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define B_XMTBUFREADY 1 | 21 | #define B_XMTBUFREADY 1 |
22 | #define B_ACKPENDING 2 | 22 | #define B_ACKPENDING 2 |
23 | 23 | ||
24 | __attribute__((format(printf, 2, 3))) | 24 | __printf(2, 3) |
25 | void debugl1(struct IsdnCardState *cs, char *fmt, ...); | 25 | void debugl1(struct IsdnCardState *cs, char *fmt, ...); |
26 | void DChannel_proc_xmt(struct IsdnCardState *cs); | 26 | void DChannel_proc_xmt(struct IsdnCardState *cs); |
27 | void DChannel_proc_rcv(struct IsdnCardState *cs); | 27 | void DChannel_proc_rcv(struct IsdnCardState *cs); |
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c index ad291f21b201..1c24e4457b6f 100644 --- a/drivers/isdn/hisax/isdnl3.c +++ b/drivers/isdn/hisax/isdnl3.c | |||
@@ -66,7 +66,7 @@ static char *strL3Event[] = | |||
66 | "EV_TIMEOUT", | 66 | "EV_TIMEOUT", |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static __attribute__((format(printf, 2, 3))) void | 69 | static __printf(2, 3) void |
70 | l3m_debug(struct FsmInst *fi, char *fmt, ...) | 70 | l3m_debug(struct FsmInst *fi, char *fmt, ...) |
71 | { | 71 | { |
72 | va_list args; | 72 | va_list args; |
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c index 44082637a09f..db247b79e561 100644 --- a/drivers/isdn/hisax/st5481_d.c +++ b/drivers/isdn/hisax/st5481_d.c | |||
@@ -167,7 +167,7 @@ static struct FsmNode L1FnList[] __initdata = | |||
167 | {ST_L1_F8, EV_IND_RSY, l1_ignore}, | 167 | {ST_L1_F8, EV_IND_RSY, l1_ignore}, |
168 | }; | 168 | }; |
169 | 169 | ||
170 | static __attribute__((format(printf, 2, 3))) | 170 | static __printf(2, 3) |
171 | void l1m_debug(struct FsmInst *fi, char *fmt, ...) | 171 | void l1m_debug(struct FsmInst *fi, char *fmt, ...) |
172 | { | 172 | { |
173 | va_list args; | 173 | va_list args; |
@@ -270,7 +270,7 @@ static char *strDoutEvent[] = | |||
270 | "EV_DOUT_UNDERRUN", | 270 | "EV_DOUT_UNDERRUN", |
271 | }; | 271 | }; |
272 | 272 | ||
273 | static __attribute__((format(printf, 2, 3))) | 273 | static __printf(2, 3) |
274 | void dout_debug(struct FsmInst *fi, char *fmt, ...) | 274 | void dout_debug(struct FsmInst *fi, char *fmt, ...) |
275 | { | 275 | { |
276 | va_list args; | 276 | va_list args; |