[PATCH 01/15] usb: xhci: usb: xhci: avoid type conversion of void *
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Feb 19 05:38:21 PST 2024
Original U-Boot commit 3fade88686e71c9acee4cbeb3ae9706bbc845608:
| Author: Heinrich Schuchardt <xypron.glpk at gmx.de>
| AuthorDate: Tue Sep 29 22:03:01 2020 +0200
|
| usb: xhci: avoid type conversion of void *
|
| void * can be assigned to any pointer variable. Avoid
| unnecessary conversions.
|
| Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
removes 8 such instances, of which only one remains in barebox.
So remove that single remaining cast.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/usb/host/xhci-mem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index f975b1c0a931..5ae1512af53a 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -464,8 +464,7 @@ int xhci_alloc_virt_device(struct xhci_ctrl *ctrl, unsigned int slot_id)
return -EEXIST;
}
- ctrl->devs[slot_id] = (struct xhci_virt_device *)
- malloc(sizeof(struct xhci_virt_device));
+ ctrl->devs[slot_id] = malloc(sizeof(struct xhci_virt_device));
if (!ctrl->devs[slot_id]) {
dev_err(ctrl->dev, "Failed to allocate virtual device\n");
--
2.39.2
More information about the barebox
mailing list