* [PATCH] xhci: omit mem read just after allocation of trb
@ 2022-02-17 13:35 Oliver Neukum
2022-02-18 8:26 ` Mathias Nyman
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Neukum @ 2022-02-17 13:35 UTC (permalink / raw)
To: mathias.nyman, linux-usb; +Cc: 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 <oneukum@suse.com>
---
drivers/usb/host/xhci-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 0e312066c5c6..99a3ce689235 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -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;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xhci: omit mem read just after allocation of trb
2022-02-17 13:35 [PATCH] xhci: omit mem read just after allocation of trb Oliver Neukum
@ 2022-02-18 8:26 ` Mathias Nyman
2022-02-24 10:19 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Mathias Nyman @ 2022-02-18 8:26 UTC (permalink / raw)
To: Oliver Neukum, mathias.nyman, linux-usb; +Cc: Greg KH
On 17.2.2022 15.35, Oliver Neukum wrote:
> 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 <oneukum@suse.com>
Thanks
In case Greg wants to pick this up now directly:
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Otherwise I'll submit it later with other small changes
-Mathias
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xhci: omit mem read just after allocation of trb
2022-02-18 8:26 ` Mathias Nyman
@ 2022-02-24 10:19 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-02-24 10:19 UTC (permalink / raw)
To: Mathias Nyman; +Cc: Oliver Neukum, mathias.nyman, linux-usb
On Fri, Feb 18, 2022 at 10:26:45AM +0200, Mathias Nyman wrote:
> On 17.2.2022 15.35, Oliver Neukum wrote:
> > 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 <oneukum@suse.com>
>
> Thanks
>
> In case Greg wants to pick this up now directly:
> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Thanks, I'll take it now, it's easy enough to :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-24 10:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17 13:35 [PATCH] xhci: omit mem read just after allocation of trb Oliver Neukum
2022-02-18 8:26 ` Mathias Nyman
2022-02-24 10:19 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).