xhci: omit mem read just after allocation of trb
Subsystems (2)
PATCH 1/1 xhci: omit mem read just after allocation of trb
This has been allocated just a few lines earlier with a zalloc(). The value is known and "|=" is a waste of memory cycles.
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-mem.c +1 -1
@@ -57,7 +57,7 @@ static struct xhci_segment *xhci_segment_alloc(struct xhci_hcd *xhci,/* If the cycle state is 0, set the cycle bit to 1 for all the TRBs */ if (cycle_state ==0 ) {for (i =0 ; i <TRBS_PER_SEGMENT ; i++) - seg->trbs[i].link.control |=cpu_to_le32 (TRB_CYCLE ); + seg->trbs[i].link.control =cpu_to_le32 (TRB_CYCLE ); } seg->dma = dma; seg->next =NULL ;
Signature · 1 line
2.34.1
Quoted 5 lines · Oliver Neukum
This has been allocated just a few lines earlier with a
zalloc(). The value is known and "|=" is a waste of memory cycles.Signed-off-by Oliver Neukum <[email protected]>
Thanks
In case Greg wants to pick this up now directly:
Acked-by Mathias Nyman <[email protected]>
Otherwise I'll submit it later with other small changes
-Mathias
Greg KH
maintainerQuoted 11 lines · Mathias Nyman
Quoted 5 lines · Oliver Neukum
This has been allocated just a few lines earlier with a
zalloc(). The value is known and "|=" is a waste of memory cycles.Signed-off-by Oliver Neukum <[email protected]>Thanks
In case Greg wants to pick this up now directly:
Acked-by Mathias Nyman <[email protected]>
Thanks, I'll take it now, it's easy enough to :)