From a7d2fb88fd21aa47002d96e21406c3cebc9ad041 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 28 Jul 2026 08:35:15 +0900 Subject: [PATCH] xhcid/irq_reactor: take trb by mut value in acknowledge fns (fix E0596) acknowledge() and acknowledge_failed_transfer_trbs() call trb.reserved(false) (a &mut self method) on a by-value `trb: Trb` parameter that wasn't declared mut. Bind it `mut trb: Trb` (the parameter is owned, so this is sufficient). Fixes the 2 E0596 errors that failed `cook base`; the 49 warnings are non-fatal. Co-Authored-By: Claude Opus 4.8 (1M context) --- drivers/usb/xhcid/src/xhci/irq_reactor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/xhcid/src/xhci/irq_reactor.rs b/drivers/usb/xhcid/src/xhci/irq_reactor.rs index 254065373a..2b79fe4c88 100644 --- a/drivers/usb/xhcid/src/xhci/irq_reactor.rs +++ b/drivers/usb/xhcid/src/xhci/irq_reactor.rs @@ -435,7 +435,7 @@ impl IrqReactor { .inspect(|req| trace!("Received request: {:X?}", req)), ); } - fn acknowledge(&mut self, trb: Trb) { + fn acknowledge(&mut self, mut trb: Trb) { //TODO: handle TRBs without an attached state trace!("ACK TRB {:X?}", trb); @@ -565,7 +565,7 @@ impl IrqReactor { trb ); } - fn acknowledge_failed_transfer_trbs(&mut self, trb: Trb) { + fn acknowledge_failed_transfer_trbs(&mut self, mut trb: Trb) { let mut index = 0; loop {