Re: [PATCH] mmc: omap_hsmmc: fix DMA API warning

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

 



Hi,

* Russell King <rmk+kernel@xxxxxxxxxxxxxxx> [181211 14:41]:
> @@ -1939,6 +1938,17 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
>  		goto err_irq;
>  	}
>  
> +	/*
> +	 * Limit the maximum segment size to the lower of the request size
> +	 * and the DMA engine device segment size limits.  In reality, with
> +	 * 32-bit transfers, the DMA engine can do longer segments than this
> +	 * but there is no way to represent that in the DMA model - if we
> +	 * increase this figure here, we get warnings from the DMA API debug.
> +	 */
> +	mmc->max_seg_size = min(mmc->max_req_size,
> +				min(dma_get_max_seg_size(host->rx_chan->device->dev),
> +				    dma_get_max_seg_size(host->tx_chan->device->dev)));
> +

Looks like using min3() here would be handy?

Regards,

Tony



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux