[PATCH 01/15] usb: xhci: usb: xhci: avoid type conversion of void *

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Original U-Boot commit 3fade88686e71c9acee4cbeb3ae9706bbc845608:

| Author:     Heinrich Schuchardt <xypron.glpk@xxxxxx>
| 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@xxxxxx>

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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux