提交 ba8618e0 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

usb: chipidea: fix precedence bug in ci_requests_show()

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: NDan Carpenter <dan.carpenter@oracle.com>
[rebased on top of debug.c changes]
Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 adf0f735
......@@ -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++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册