summaryrefslogtreecommitdiff
path: root/drivers/usb/host/fotg210.h
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2018-09-19 19:48:53 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-28 15:03:37 +0200
commita0ef2bdfa3b1497ac3d0cb348102c87c51f041a9 (patch)
tree65c28c0ab68945221df9fe957914f87f3a4c932e /drivers/usb/host/fotg210.h
parent1906f64f6458f4f7f7b77268a7280c7689f61163 (diff)
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>
Diffstat (limited to 'drivers/usb/host/fotg210.h')
-rw-r--r--drivers/usb/host/fotg210.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/fotg210.h b/drivers/usb/host/fotg210.h
index 28f6467c0cbf..1b4db95e5c43 100644
--- a/drivers/usb/host/fotg210.h
+++ b/drivers/usb/host/fotg210.h
@@ -177,9 +177,9 @@ struct fotg210_hcd { /* one per controller */
/* irq statistics */
#ifdef FOTG210_STATS
struct fotg210_stats stats;
-# define COUNT(x) ((x)++)
+# define INCR(x) ((x)++)
#else
-# define COUNT(x)
+# define INCR(x) do {} while (0)
#endif
/* silicon clock */