usb: host: Replace empty define with do while

It's dangerous to use empty code define.
Furthermore it lead to the following warning:
"suggest braces around empty body in an « else » statement"

So let's replace emptyness by "do {} while(0)"

Furthermore, as suggested by Joe Perches, rename the macro to INCR.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Corentin Labbe
2018-09-19 19:48:53 +00:00
committed by Greg Kroah-Hartman
parent 1906f64f64
commit a0ef2bdfa3
6 changed files with 16 additions and 16 deletions

View File

@@ -235,9 +235,9 @@ struct ehci_hcd { /* one per controller */
/* irq statistics */
#ifdef EHCI_STATS
struct ehci_stats stats;
# define COUNT(x) ((x)++)
# define INCR(x) ((x)++)
#else
# define COUNT(x)
# define INCR(x) do {} while (0)
#endif
/* debug files */