diff options
author | David Rientjes <rientjes@google.com> | 2007-05-11 17:39:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:29:50 -0400 |
commit | 8234509c3968a87faa301a8a9d7f8b987cd9181c (patch) | |
tree | b31f012ab48f870ce554ccc345639fcec10f356d /drivers/usb/host | |
parent | ba02978a48f0117b3d0aced97a30615a5d7412e2 (diff) |
USB: use function attribute __maybe_unused
Substitute USB instances of __attribute__ ((unused)) functions with the
newly introduced __maybe_unused.
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-dbg.c | 22 | ||||
-rw-r--r-- | drivers/usb/host/ohci-dbg.c | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 5bb3d0962ebe..c9cc4413198e 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c | |||
@@ -115,7 +115,7 @@ static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {} | |||
115 | 115 | ||
116 | #ifdef DEBUG | 116 | #ifdef DEBUG |
117 | 117 | ||
118 | static void __attribute__((__unused__)) | 118 | static void __maybe_unused |
119 | dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) | 119 | dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) |
120 | { | 120 | { |
121 | ehci_dbg(ehci, "%s td %p n%08x %08x t%08x p0=%08x\n", label, qtd, | 121 | ehci_dbg(ehci, "%s td %p n%08x %08x t%08x p0=%08x\n", label, qtd, |
@@ -131,7 +131,7 @@ dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) | |||
131 | hc32_to_cpup(ehci, &qtd->hw_buf[4])); | 131 | hc32_to_cpup(ehci, &qtd->hw_buf[4])); |
132 | } | 132 | } |
133 | 133 | ||
134 | static void __attribute__((__unused__)) | 134 | static void __maybe_unused |
135 | dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) | 135 | dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) |
136 | { | 136 | { |
137 | ehci_dbg (ehci, "%s qh %p n%08x info %x %x qtd %x\n", label, | 137 | ehci_dbg (ehci, "%s qh %p n%08x info %x %x qtd %x\n", label, |
@@ -140,7 +140,7 @@ dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
140 | dbg_qtd ("overlay", ehci, (struct ehci_qtd *) &qh->hw_qtd_next); | 140 | dbg_qtd ("overlay", ehci, (struct ehci_qtd *) &qh->hw_qtd_next); |
141 | } | 141 | } |
142 | 142 | ||
143 | static void __attribute__((__unused__)) | 143 | static void __maybe_unused |
144 | dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) | 144 | dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) |
145 | { | 145 | { |
146 | ehci_dbg (ehci, "%s [%d] itd %p, next %08x, urb %p\n", | 146 | ehci_dbg (ehci, "%s [%d] itd %p, next %08x, urb %p\n", |
@@ -171,7 +171,7 @@ dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) | |||
171 | itd->index[6], itd->index[7]); | 171 | itd->index[6], itd->index[7]); |
172 | } | 172 | } |
173 | 173 | ||
174 | static void __attribute__((__unused__)) | 174 | static void __maybe_unused |
175 | dbg_sitd (const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd) | 175 | dbg_sitd (const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd) |
176 | { | 176 | { |
177 | ehci_dbg (ehci, "%s [%d] sitd %p, next %08x, urb %p\n", | 177 | ehci_dbg (ehci, "%s [%d] sitd %p, next %08x, urb %p\n", |
@@ -186,7 +186,7 @@ dbg_sitd (const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd) | |||
186 | hc32_to_cpu(ehci, sitd->hw_buf[1])); | 186 | hc32_to_cpu(ehci, sitd->hw_buf[1])); |
187 | } | 187 | } |
188 | 188 | ||
189 | static int __attribute__((__unused__)) | 189 | static int __maybe_unused |
190 | dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) | 190 | dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) |
191 | { | 191 | { |
192 | return scnprintf (buf, len, | 192 | return scnprintf (buf, len, |
@@ -205,7 +205,7 @@ dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) | |||
205 | ); | 205 | ); |
206 | } | 206 | } |
207 | 207 | ||
208 | static int __attribute__((__unused__)) | 208 | static int __maybe_unused |
209 | dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) | 209 | dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) |
210 | { | 210 | { |
211 | return scnprintf (buf, len, | 211 | return scnprintf (buf, len, |
@@ -273,23 +273,23 @@ dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) | |||
273 | } | 273 | } |
274 | 274 | ||
275 | #else | 275 | #else |
276 | static inline void __attribute__((__unused__)) | 276 | static inline void __maybe_unused |
277 | dbg_qh (char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) | 277 | dbg_qh (char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) |
278 | {} | 278 | {} |
279 | 279 | ||
280 | static inline int __attribute__((__unused__)) | 280 | static inline int __maybe_unused |
281 | dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) | 281 | dbg_status_buf (char *buf, unsigned len, const char *label, u32 status) |
282 | { return 0; } | 282 | { return 0; } |
283 | 283 | ||
284 | static inline int __attribute__((__unused__)) | 284 | static inline int __maybe_unused |
285 | dbg_command_buf (char *buf, unsigned len, const char *label, u32 command) | 285 | dbg_command_buf (char *buf, unsigned len, const char *label, u32 command) |
286 | { return 0; } | 286 | { return 0; } |
287 | 287 | ||
288 | static inline int __attribute__((__unused__)) | 288 | static inline int __maybe_unused |
289 | dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) | 289 | dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable) |
290 | { return 0; } | 290 | { return 0; } |
291 | 291 | ||
292 | static inline int __attribute__((__unused__)) | 292 | static inline int __maybe_unused |
293 | dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) | 293 | dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) |
294 | { return 0; } | 294 | { return 0; } |
295 | 295 | ||
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index 273d5ddb72be..6f9e43e9a6ca 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c | |||
@@ -23,7 +23,7 @@ | |||
23 | /* debug| print the main components of an URB | 23 | /* debug| print the main components of an URB |
24 | * small: 0) header + data packets 1) just header | 24 | * small: 0) header + data packets 1) just header |
25 | */ | 25 | */ |
26 | static void __attribute__((unused)) | 26 | static void __maybe_unused |
27 | urb_print (struct urb * urb, char * str, int small) | 27 | urb_print (struct urb * urb, char * str, int small) |
28 | { | 28 | { |
29 | unsigned int pipe= urb->pipe; | 29 | unsigned int pipe= urb->pipe; |
@@ -338,7 +338,7 @@ static void ohci_dump_td (const struct ohci_hcd *ohci, const char *label, | |||
338 | } | 338 | } |
339 | 339 | ||
340 | /* caller MUST own hcd spinlock if verbose is set! */ | 340 | /* caller MUST own hcd spinlock if verbose is set! */ |
341 | static void __attribute__((unused)) | 341 | static void __maybe_unused |
342 | ohci_dump_ed (const struct ohci_hcd *ohci, const char *label, | 342 | ohci_dump_ed (const struct ohci_hcd *ohci, const char *label, |
343 | const struct ed *ed, int verbose) | 343 | const struct ed *ed, int verbose) |
344 | { | 344 | { |