Re: [PATCH 3/3] spi: bcm2835: add module parameter to configure minimum length for dma

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

 



On Sun, Feb 24, 2019 at 04:23:11PM +0000, kernel@xxxxxxxxxxxxxxxx wrote:
> +/* define dma min number of bytes to use in dma mode with value validation */
> +static int dma_min_bytes_limit_set(const char *val,
> +				   const struct kernel_param *kp)
> +{
> +	unsigned int v;
> +
> +	if (kstrtouint(val, 10, &v))
> +		return -EINVAL;
> +	/* value needs to be a multiple of 4 */
> +	if (v % 4) {
> +		pr_err("dma_min_bytes_limit needs to be a multiple of 4\n");
> +		return -EINVAL;
> +	}

Transfers don't need to be a multiple of 4 to be eligible for DMA,
so this check can be dropped.

Thanks,

Lukas



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux