Re: [LINUX PATCH v12 2/2] memory: pl353: Add driver for arm pl353 static memory controller

From: Michal Simek
Date: Wed Dec 05 2018 - 09:47:21 EST


On 29. 11. 18 13:57, Naga Sureshkumar Relli wrote:
> Add driver for arm pl353 static memory controller. This controller is used in
> Xilinx Zynq SoC for interfacing the NAND and NOR/SRAM memory devices.
>
> Signed-off-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xxxxxxxxxx>
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
> drivers/memory/Kconfig | 9 +
> drivers/memory/Makefile | 1 +
> drivers/memory/pl353-smc.c | 468 +++++++++++++++++++++++++++++++++++++++++++++
> include/linux/pl353-smc.h | 30 +++
> 4 files changed, 508 insertions(+)
> create mode 100644 drivers/memory/pl353-smc.c
> create mode 100644 include/linux/pl353-smc.h
>

Missing changelog which was there in v11
https://lore.kernel.org/patchwork/patch/961604/

> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 63389f0..2d91b00 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -145,6 +145,15 @@ config DA8XX_DDRCTL
> Texas Instruments da8xx SoCs. It's used to tweak various memory
> controller configuration options.
>
> +config PL353_SMC
> + tristate "ARM PL35X Static Memory Controller(SMC) driver"
> + default y
> + depends on ARM
> + depends on ARM_AMBA
> + help
> + This driver is for the ARM PL351/PL353 Static Memory
> + Controller(SMC) module.
> +
> source "drivers/memory/samsung/Kconfig"
> source "drivers/memory/tegra/Kconfig"
>
> diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile
> index a01ab3e..90161de 100644
> --- a/drivers/memory/Makefile
> +++ b/drivers/memory/Makefile
> @@ -19,6 +19,7 @@ obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.o
> obj-$(CONFIG_JZ4780_NEMC) += jz4780-nemc.o
> obj-$(CONFIG_MTK_SMI) += mtk-smi.o
> obj-$(CONFIG_DA8XX_DDRCTL) += da8xx-ddrctl.o
> +obj-$(CONFIG_PL353_SMC) += pl353-smc.o
>
> obj-$(CONFIG_SAMSUNG_MC) += samsung/
> obj-$(CONFIG_TEGRA_MC) += tegra/
> diff --git a/drivers/memory/pl353-smc.c b/drivers/memory/pl353-smc.c
> new file mode 100644
> index 0000000..6738a84
> --- /dev/null
> +++ b/drivers/memory/pl353-smc.c
> @@ -0,0 +1,468 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * ARM PL353 SMC driver
> + *
> + * Copyright (C) 2012 - 2018 Xilinx, Inc
> + * Author: Punnaiah Choudary Kalluri <punnaiah@xxxxxxxxxx>
> + * Author: Naga Sureshkumar Relli <nagasure@xxxxxxxxxx>
> + *

remove line above.

and then fix these two

CHECK: Please use a blank line after function/struct/union/enum declarations
#359: FILE: drivers/memory/pl353-smc.c:299:
+}
+static struct amba_driver pl353_smc_driver;

CHECK: Alignment should match open parenthesis
#369: FILE: drivers/memory/pl353-smc.c:309:
+void pl353_smc_init_nand_interface(struct amba_device *adev,
+ struct device_node *nand_node)

total: 0 errors, 2 warnings, 2 checks, 520 lines checked

NOTE: For some of the reported defects, checkpatch may be able to

and also
this doesn't right too.

drivers/memory/pl353-smc.c:308:6: warning: symbol
'pl353_smc_init_nand_interface' was not declared. Should it be static?
CC drivers/memory/pl353-smc.o
drivers/memory/pl353-smc.c:308:6: warning: no previous prototype for
âpl353_smc_init_nand_interfaceâ [-Wmissing-prototypes]
void pl353_smc_init_nand_interface(struct amba_device *adev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/memory/pl353-smc.c:439:34: warning: âpl353_smc_of_matchâ defined
but not used [-Wunused-const-variable=]
static const struct of_device_id pl353_smc_of_match[] = {

Thanks,
Michal