Re: [PATCH v13 5/8] drivers: memory: add DMC driver for Exynos5422

From: Krzysztof Kozlowski
Date: Wed Sep 04 2019 - 14:35:18 EST


On Wed, Aug 21, 2019 at 12:43:00PM +0200, Lukasz Luba wrote:
> This patch adds driver for Exynos5422 Dynamic Memory Controller.
> The driver provides support for dynamic frequency and voltage scaling
> for DMC and DRAM. It supports changing timings of DRAM running with
> different frequency. There is also an algorithm to calculate timigns
> based on memory description provided in DT.
> The patch also contains needed MAINTAINERS file update.
>
> Signed-off-by: Lukasz Luba <l.luba@xxxxxxxxxxxxxxxxxxx>
> ---
> MAINTAINERS | 8 +
> drivers/memory/samsung/Kconfig | 13 +
> drivers/memory/samsung/Makefile | 1 +
> drivers/memory/samsung/exynos5422-dmc.c | 1257 +++++++++++++++++++++++
> 4 files changed, 1279 insertions(+)
> create mode 100644 drivers/memory/samsung/exynos5422-dmc.c

Thanks, applied... or almost. Let's fix it incrementally.

You have two smatch warnings:
CHECK ../drivers/memory/samsung/exynos5422-dmc.c
drivers/memory/samsung/exynos5422-dmc.c:272 exynos5_init_freq_table() warn: passing devm_ allocated variable to kfree. 'dmc->opp'
CHECK ../drivers/memory/jedec_ddr_data.c
drivers/memory/samsung/exynos5422-dmc.c:565 exynos5_dmc_get_volt_freq() warn: passing zero to 'PTR_ERR'

The second looks like false positive, but first seems to be real.

You have also sparse warning to fix:
../drivers/memory/samsung/exynos5422-dmc.c:736:1: warning: symbol 'exynos5_dmc_align_init_freq' was not declared. Should it be static?

Best regards,
Krzysztof