From: Dan Carpenter <dan.carpen...@oracle.com>

The intent here was to have parenthesis around the (ci->hw_ep_max / 2)
so that it counts like "0 1 2 0 1 2".  In the current code, the mod
operation happens first so it counts like "0 0 1 1 2 2".

Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
[rebased on top of debug.c changes]
Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com>
---
 drivers/usb/chipidea/debug.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index 5738079..36a7063 100644
--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -175,7 +175,7 @@ static int ci_requests_show(struct seq_file *s, void *data)
                        req = list_entry(ptr, struct ci13xxx_req, queue);
 
                        seq_printf(s, "EP=%02i: TD=%08X %s\n",
-                                  i % ci->hw_ep_max/2, (u32)req->dma,
+                                  i % (ci->hw_ep_max / 2), (u32)req->dma,
                                   ((i < ci->hw_ep_max/2) ? "RX" : "TX"));
 
                        for (j = 0; j < qsize; j++)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to