Thread (11 messages) 11 messages, 5 authors, 2021-03-25
STALE1942d

[PATCH v1 1/6] usb: gadget: pch_udc: Drop unneeded cpu_to_le32() call

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-03-22 21:12:47
Also in: lkml
Subsystem: the rest, usb subsystem · Maintainers: Linus Torvalds, Greg Kroah-Hartman

Either way ~0 will be in the correct byte order,
hence drop unneeded cpu_to_le32() call. Moreover,
it makes sparse happy, otherwise it complains:

pch_udc.c:1813:27: warning: incorrect type in assignment (different base types)
pch_udc.c:1813:27:    expected unsigned int [usertype] dataptr
pch_udc.c:1813:27:    got restricted __le32 [usertype]

Fixes: f646cf94520e ("USB device driver of Topcliff PCH")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/usb/gadget/udc/pch_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c
index a3c1fc924268..2e2dca391007 100644
--- a/drivers/usb/gadget/udc/pch_udc.c
+++ b/drivers/usb/gadget/udc/pch_udc.c
@@ -1756,7 +1756,7 @@ static struct usb_request *pch_udc_alloc_request(struct usb_ep *usbep,
 	}
 	/* prevent from using desc. - set HOST BUSY */
 	dma_desc->status |= PCH_UDC_BS_HST_BSY;
-	dma_desc->dataptr = cpu_to_le32(DMA_ADDR_INVALID);
+	dma_desc->dataptr = DMA_ADDR_INVALID;
 	req->td_data = dma_desc;
 	req->td_data_last = dma_desc;
 	req->chain_len = 1;
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help