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

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

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



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

  Powered by Linux