UPSTREAM: usb: dwc3: switch trb enqueue/dequeue and first_trb_index to u8
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 5 Apr 2016 09:42:15 +0000 (12:42 +0300)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commitdd0b2b6033ea4aac5fecd419066abff0247a3a8a
tree0dc50119f89a7932bf3571e7b8631574daa0db3f
parentd72b2a3f3cb467a6645bd35e4ee2849068263593
UPSTREAM: usb: dwc3: switch trb enqueue/dequeue and first_trb_index to u8

We *know* that we have 1 PAGE (4096 bytes) for our
TRB poll. We also know the size of each TRB and know
that we can fit 256 of them in one PAGE. By using a
u8 type we can make sure that:

enqueue++ % 256;

gets optimized to an increment only.

Change-Id: I80e868bff1c431d8b9efbe1a107bfc127da70038
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit c28f82595dde97dda0b769f78f0faea78acd993b)
drivers/usb/dwc3/core.h