projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
505bdbc
)
xhci: Use ilog2() rather than __ffs() for calculating SEGMENT_SHIFT
author
David Howells
<
[email protected]
>
Thu, 28 Mar 2013 18:48:28 +0000
(18:48 +0000)
committer
Sarah Sharp
<
[email protected]
>
Wed, 3 Apr 2013 17:28:31 +0000
(10:28 -0700)
Use ilog2() rather than __ffs() for calculating SEGMENT_SHIFT as ilog2() can
be worked out at compile time, whereas __ffs() must be calculated at runtime.
Signed-off-by: David Howells <
[email protected]
>
cc: Sarah Sharp <
[email protected]
>
cc: Greg Kroah-Hartman <
[email protected]
>
cc:
[email protected]
Signed-off-by: Sarah Sharp <
[email protected]
>
drivers/usb/host/xhci.h
patch
|
blob
|
history
diff --git
a/drivers/usb/host/xhci.h
b/drivers/usb/host/xhci.h
index 63582719e0fb26cafb4d19f5248c2b5f9aa8a43a..ca550ddb0b1d96aa7338fe00f403a202b57ef40a 100644
(file)
--- a/
drivers/usb/host/xhci.h
+++ b/
drivers/usb/host/xhci.h
@@
-1239,7
+1239,7
@@
union xhci_trb {
/* Allow two commands + a link TRB, along with any reserved command TRBs */
#define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3)
#define SEGMENT_SIZE (TRBS_PER_SEGMENT*16)
-#define SEGMENT_SHIFT (
__ffs
(SEGMENT_SIZE))
+#define SEGMENT_SHIFT (
ilog2
(SEGMENT_SIZE))
/* TRB buffer pointers can't cross 64KB boundaries */
#define TRB_MAX_BUFF_SHIFT 16
#define TRB_MAX_BUFF_SIZE (1 << TRB_MAX_BUFF_SHIFT)