Re: [PATCH v5 09/39] dma: cirrus: add DT support for Cirrus EP93xx

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

 



On Wed, Nov 22, 2023 at 11:59:47AM +0300, Nikita Shubin wrote:
> - drop subsys_initcall code
> - drop platform probe
> - add OF ID match table with data
> - add of_probe for device tree
> - add xlate for m2m/m2p
> - drop platform structs usage

It's not the best commit message (e.g., unaligned with verb "add"
in the Subject).

...

> +		edmac->clk = of_clk_get(np, i);

Why devm_clk_get() can't be used?

>  		if (IS_ERR(edmac->clk)) {
> +			dev_warn(&pdev->dev, "failed to get clock\n");
>  			continue;
>  		}

...

> +	if (direction != DMA_MEM_TO_DEV && direction != DMA_DEV_TO_MEM)
> +		return NULL;

is_slave_direction() ?

...

> +	dev_info(edma->dma_dev.dev, "%s: port=%d", __func__, port);

info level?! Wouldn't be noisy a bit?

...

> +	if (direction != DMA_MEM_TO_DEV && direction != DMA_DEV_TO_MEM)
> +		return NULL;

As per above.

...

> +	dev_info(dma_dev->dev, "EP93xx M2%s DMA ready\n",
> +			       edma->m2m ? "M" : "P");

One line?

...

> +		if (!IS_ERR_OR_NULL(edmac->clk))
> +			clk_put(edmac->clk);

CLK framework is at least NULL aware. Perhaps you can make sure it's never
IS_ERR() and drop this conditional altogether.

...

> -
> +module_platform_driver(ep93xx_dma_driver);

+ blank line.

>  MODULE_AUTHOR("Mika Westerberg <mika.westerberg@xxxxxx>");
>  MODULE_DESCRIPTION("EP93xx DMA driver");

...

> --- a/include/linux/platform_data/dma-ep93xx.h
> +++ b/include/linux/platform_data/dma-ep93xx.h
> @@ -5,6 +5,7 @@
>  #include <linux/types.h>
>  #include <linux/dmaengine.h>
>  #include <linux/dma-mapping.h>
> +#include <linux/property.h>

Can this be a bit more ordered, like put before types.h (at least from the
context I see here)?

Also you missing device.h and string.h according to the new function
implementation.

-- 
With Best Regards,
Andy Shevchenko






[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 PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux