Thread (2 messages) 2 messages, 2 authors, 2021-06-15

Re: [PATCH] drivers: drop unused usb_gadget_{map,unmap}_request()

From: Sascha Hauer <s.hauer@pengutronix.de>
Date: 2021-06-15 15:52:07

On Mon, Jun 14, 2021 at 05:28:33PM +0300, Antony Pavlov wrote:
There is no code that is dependent on
usb_gadget_{map,unmap}_request().
My first reaction was: But maybe there *should* be code depending on
that, but
-#ifdef	CONFIG_KERNEL_HAS_DMA
-
-int usb_gadget_map_request(struct usb_gadget *gadget,
-		struct usb_request *req, int is_in)
-{
-	if (req->length == 0)
-		return 0;
-
-	if (req->num_sgs) {
-		int     mapped;
-
-		mapped = dma_map_sg(&gadget->dev, req->sg, req->num_sgs,
-				is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
Trying to use it would at least fail when trying to link this. We don't
have any implementation for dma_map_sg().

So ok to remove this nonfunctional code.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help