summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
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/ehci-hcd.c
parent1906f64f6458f4f7f7b77268a7280c7689f61163 (diff)
downloadlinux-a0ef2bdfa3b1497ac3d0cb348102c87c51f041a9.tar.bz2
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/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index e8d7667828eb..cdafa97f632d 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -730,9 +730,9 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
/* normal [4.15.1.2] or error [4.15.1.1] completion */
if (likely ((status & (STS_INT|STS_ERR)) != 0)) {
if (likely ((status & STS_ERR) == 0))
- COUNT (ehci->stats.normal);
+ INCR(ehci->stats.normal);
else
- COUNT (ehci->stats.error);
+ INCR(ehci->stats.error);
bh = 1;
}
@@ -756,7 +756,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
if (cmd & CMD_IAAD)
ehci_dbg(ehci, "IAA with IAAD still set?\n");
if (ehci->iaa_in_progress)
- COUNT(ehci->stats.iaa);
+ INCR(ehci->stats.iaa);
end_iaa_cycle(ehci);
}