summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-q.c
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2018-09-19 21:48:53 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-28 15:03:37 +0200
commita0ef2bdfa3b1497ac3d0cb348102c87c51f041a9 (patch)
tree65c28c0ab68945221df9fe957914f87f3a4c932e /drivers/usb/host/ehci-q.c
parentUSB: STORAGE: ISD200 Fixed coding style issue "space required in for loop" (diff)
downloadlinux-a0ef2bdfa3b1497ac3d0cb348102c87c51f041a9.tar.xz
linux-a0ef2bdfa3b1497ac3d0cb348102c87c51f041a9.zip
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-q.c')
-rw-r--r--drivers/usb/host/ehci-q.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 327630405695..aa2f77f1506d 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -245,12 +245,12 @@ ehci_urb_done(struct ehci_hcd *ehci, struct urb *urb, int status)
}
if (unlikely(urb->unlinked)) {
- COUNT(ehci->stats.unlink);
+ INCR(ehci->stats.unlink);
} else {
/* report non-error and short read status as zero */
if (status == -EINPROGRESS || status == -EREMOTEIO)
status = 0;
- COUNT(ehci->stats.complete);
+ INCR(ehci->stats.complete);
}
#ifdef EHCI_URB_TRACE