linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers
@ 2020-07-23  7:37 Krzysztof Kozlowski
  2020-07-23  7:37 ` [RFT 01/23] memory: omap-gpmc: Remove unneeded asm/mach-types.h inclusion Krzysztof Kozlowski
                   ` (24 more replies)
  0 siblings, 25 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Dear All,

The drivers/memory directory contains generic code (of_memory.c) and a
bunch of drivers.  Changes to generic code were coming usually through
different trees with the driver code.

Over last days, memory drivers grew in numbers but not necessarily in
quality.  They lacked compile testing and code cleanup.  Also lacked
maintainer.

I would be happy to take care about this part.

If there are no objections, the patches could go either to Linus or to
arm-soc (most of drivers are ARM specific).

Driver-specific changes in the patchset were only compile-tested. Tests
are welcome. The generic code was tested on ARMv7 Exynos based boards
with a exynos5422-dmc memory controller driver.

Best regards,
Krzysztof


Krzysztof Kozlowski (23):
  memory: omap-gpmc: Remove unneeded asm/mach-types.h inclusion
  memory: omap-gpmc: Remove unused file-scope phys_base and mem_size
  memory: omap-gpmc: Include <linux/sizes.h> for SZ_16M
  memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts
  memory: Enable compile testing for most of the drivers
  memory: of: Remove unused headers
  memory: of: Remove __func__ in device related messages
  memory: of: Correct indentation
  memory: of: Remove unneeded extern from function declarations
  memory: emif-asm-offsets: Add GPLv2 SPDX license header
  memory: emif: Put constant in comparison on the right side
  memory: emif: Fix whitespace coding style violations
  memory: emif: Silence platform_get_irq() error in driver
  memory: ti-emif-pm: Fix cast to iomem pointer
  memory: renesas-rpc-if: Simplify with PTR_ERR_OR_ZERO
  memory: brcmstb_dpfe: Constify the contents of string
  memory: brcmstb_dpfe: Remove unneeded braces
  memory: mtk-smi: Add argument to function definition
  memory: omap-gpmc: Enclose macro statements in do-while
  memory: omap-gpmc: Fix whitespace issue
  memory: pl172: Add GPLv2 SPDX license header
  memory: tegra: tegra210-emc: Fix indentation
  MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory
    controllers

 MAINTAINERS                                   |  7 +++++
 drivers/memory/Kconfig                        | 31 +++++++++++--------
 drivers/memory/brcmstb_dpfe.c                 |  5 ++-
 drivers/memory/emif-asm-offsets.c             | 10 +-----
 drivers/memory/emif.c                         | 23 ++++++--------
 drivers/memory/mtk-smi.c                      |  2 +-
 drivers/memory/of_memory.c                    | 28 ++++++++---------
 drivers/memory/of_memory.h                    | 21 +++++++------
 drivers/memory/omap-gpmc.c                    | 21 ++++++-------
 drivers/memory/pl172.c                        |  5 +--
 drivers/memory/renesas-rpc-if.c               |  4 +--
 drivers/memory/tegra/tegra210-emc-cc-r21021.c |  2 +-
 drivers/memory/ti-aemif.c                     | 16 +++++-----
 drivers/memory/ti-emif-pm.c                   |  2 +-
 14 files changed, 84 insertions(+), 93 deletions(-)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [RFT 01/23] memory: omap-gpmc: Remove unneeded asm/mach-types.h inclusion
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [RFT 02/23] memory: omap-gpmc: Remove unused file-scope phys_base and mem_size Krzysztof Kozlowski
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

The driver does not use macros from asm/mach-types.h (neither MACH_TYPE
nor machine_is_xxx()).  Removal of this include allows compile testing
on non-ARM architectures.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---

Please kindly test.

---
 drivers/memory/omap-gpmc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index eff26c1b1394..fc08b5292932 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -32,8 +32,6 @@
 
 #include <linux/platform_data/mtd-nand-omap2.h>
 
-#include <asm/mach-types.h>
-
 #define	DEVICE_NAME		"omap-gpmc"
 
 /* GPMC register offsets */
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [RFT 02/23] memory: omap-gpmc: Remove unused file-scope phys_base and mem_size
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
  2020-07-23  7:37 ` [RFT 01/23] memory: omap-gpmc: Remove unneeded asm/mach-types.h inclusion Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 03/23] memory: omap-gpmc: Include <linux/sizes.h> for SZ_16M Krzysztof Kozlowski
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

The file-scope variables phys_base and mem_size are assigned in
gpmc_probe() but never read.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---

Please kindly test.

---
 drivers/memory/omap-gpmc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index fc08b5292932..8ec2ef2aebdd 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -242,7 +242,6 @@ static DEFINE_SPINLOCK(gpmc_mem_lock);
 /* Define chip-selects as reserved by default until probe completes */
 static unsigned int gpmc_cs_num = GPMC_CS_NUM;
 static unsigned int gpmc_nr_waitpins;
-static resource_size_t phys_base, mem_size;
 static unsigned gpmc_capability;
 static void __iomem *gpmc_base;
 
@@ -2357,9 +2356,6 @@ static int gpmc_probe(struct platform_device *pdev)
 	if (res == NULL)
 		return -ENOENT;
 
-	phys_base = res->start;
-	mem_size = resource_size(res);
-
 	gpmc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(gpmc_base))
 		return PTR_ERR(gpmc_base);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 03/23] memory: omap-gpmc: Include <linux/sizes.h> for SZ_16M
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
  2020-07-23  7:37 ` [RFT 01/23] memory: omap-gpmc: Remove unneeded asm/mach-types.h inclusion Krzysztof Kozlowski
  2020-07-23  7:37 ` [RFT 02/23] memory: omap-gpmc: Remove unused file-scope phys_base and mem_size Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [RFT 04/23] memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts Krzysztof Kozlowski
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

The driver uses SZ_16M which is defined in include/linux/sizes.h.  On
ARM it was pulled by other headers but its inclusion is necessary for
compile testing on other architectures.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/omap-gpmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 8ec2ef2aebdd..c158b6cae9a9 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -29,6 +29,7 @@
 #include <linux/of_platform.h>
 #include <linux/omap-gpmc.h>
 #include <linux/pm_runtime.h>
+#include <linux/sizes.h>
 
 #include <linux/platform_data/mtd-nand-omap2.h>
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [RFT 04/23] memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 03/23] memory: omap-gpmc: Include <linux/sizes.h> for SZ_16M Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 05/23] memory: Enable compile testing for most of the drivers Krzysztof Kozlowski
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

SS conflicts with compile test build on i386:

    ../drivers/memory/ti-aemif.c:40:0: warning: "SS" redefined
    In file included from ../arch/x86/include/uapi/asm/ptrace.h:6:0,
                     from ../arch/x86/include/asm/ptrace.h:7,
                     from ../arch/x86/include/asm/math_emu.h:5,
                     from ../arch/x86/include/asm/processor.h:13,
                     from ../include/linux/mutex.h:19,
                     from ../include/linux/notifier.h:14,
                     from ../include/linux/clk.h:14,
                     from ../drivers/memory/ti-aemif.c:12:
    ../arch/x86/include/uapi/asm/ptrace-abi.h:23:0: note: this is the location of the previous definition
     #define SS   16

Use more descriptive name (SSTROBE) to avoid the conflict.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---

Please kindly test.

---
 drivers/memory/ti-aemif.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c
index db526dbf71ee..159a16f5e7d6 100644
--- a/drivers/memory/ti-aemif.c
+++ b/drivers/memory/ti-aemif.c
@@ -27,7 +27,7 @@
 #define WSTROBE_SHIFT	20
 #define WSETUP_SHIFT	26
 #define EW_SHIFT	30
-#define SS_SHIFT	31
+#define SSTROBE_SHIFT	31
 
 #define TA(x)		((x) << TA_SHIFT)
 #define RHOLD(x)	((x) << RHOLD_SHIFT)
@@ -37,7 +37,7 @@
 #define WSTROBE(x)	((x) << WSTROBE_SHIFT)
 #define WSETUP(x)	((x) << WSETUP_SHIFT)
 #define EW(x)		((x) << EW_SHIFT)
-#define SS(x)		((x) << SS_SHIFT)
+#define SSTROBE(x)	((x) << SSTROBE_SHIFT)
 
 #define ASIZE_MAX	0x1
 #define TA_MAX		0x3
@@ -48,7 +48,7 @@
 #define WSTROBE_MAX	0x3f
 #define WSETUP_MAX	0xf
 #define EW_MAX		0x1
-#define SS_MAX		0x1
+#define SSTROBE_MAX	0x1
 #define NUM_CS		4
 
 #define TA_VAL(x)	(((x) & TA(TA_MAX)) >> TA_SHIFT)
@@ -59,7 +59,7 @@
 #define WSTROBE_VAL(x)	(((x) & WSTROBE(WSTROBE_MAX)) >> WSTROBE_SHIFT)
 #define WSETUP_VAL(x)	(((x) & WSETUP(WSETUP_MAX)) >> WSETUP_SHIFT)
 #define EW_VAL(x)	(((x) & EW(EW_MAX)) >> EW_SHIFT)
-#define SS_VAL(x)	(((x) & SS(SS_MAX)) >> SS_SHIFT)
+#define SSTROBE_VAL(x)	(((x) & SSTROBE(SSTROBE_MAX)) >> SSTROBE_SHIFT)
 
 #define NRCSR_OFFSET	0x00
 #define AWCCR_OFFSET	0x04
@@ -67,7 +67,7 @@
 
 #define ACR_ASIZE_MASK	0x3
 #define ACR_EW_MASK	BIT(30)
-#define ACR_SS_MASK	BIT(31)
+#define ACR_SSTROBE_MASK	BIT(31)
 #define ASIZE_16BIT	1
 
 #define CONFIG_MASK	(TA(TA_MAX) | \
@@ -77,7 +77,7 @@
 				WHOLD(WHOLD_MAX) | \
 				WSTROBE(WSTROBE_MAX) | \
 				WSETUP(WSETUP_MAX) | \
-				EW(EW_MAX) | SS(SS_MAX) | \
+				EW(EW_MAX) | SSTROBE(SSTROBE_MAX) | \
 				ASIZE_MAX)
 
 /**
@@ -204,7 +204,7 @@ static int aemif_config_abus(struct platform_device *pdev, int csnum)
 	if (data->enable_ew)
 		set |= ACR_EW_MASK;
 	if (data->enable_ss)
-		set |= ACR_SS_MASK;
+		set |= ACR_SSTROBE_MASK;
 
 	val = readl(aemif->base + offset);
 	val &= ~CONFIG_MASK;
@@ -246,7 +246,7 @@ static void aemif_get_hw_params(struct platform_device *pdev, int csnum)
 	data->wstrobe = aemif_cycles_to_nsec(WSTROBE_VAL(val), clk_rate);
 	data->wsetup = aemif_cycles_to_nsec(WSETUP_VAL(val), clk_rate);
 	data->enable_ew = EW_VAL(val);
-	data->enable_ss = SS_VAL(val);
+	data->enable_ss = SSTROBE_VAL(val);
 	data->asize = val & ASIZE_MAX;
 }
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 05/23] memory: Enable compile testing for most of the drivers
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2020-07-23  7:37 ` [RFT 04/23] memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 06/23] memory: of: Remove unused headers Krzysztof Kozlowski
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Most of the memory controller drivers do not depend on architecture
specific code so can be compile tested to increase build coverage.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/Kconfig | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index efcb4dfaccc2..2c0fe2d75b57 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -27,7 +27,8 @@ config ARM_PL172_MPMC
 config ATMEL_SDRAMC
 	bool "Atmel (Multi-port DDR-)SDRAM Controller"
 	default y
-	depends on ARCH_AT91 && OF
+	depends on ARCH_AT91 || COMPILE_TEST
+	depends on OF
 	help
 	  This driver is for Atmel SDRAM Controller or Atmel Multi-port
 	  DDR-SDRAM Controller available on Atmel AT91SAM9 and SAMA5 SoCs.
@@ -37,7 +38,8 @@ config ATMEL_SDRAMC
 config ATMEL_EBI
 	bool "Atmel EBI driver"
 	default y
-	depends on ARCH_AT91 && OF
+	depends on ARCH_AT91 || COMPILE_TEST
+	depends on OF
 	select MFD_SYSCON
 	select MFD_ATMEL_SMC
 	help
@@ -59,7 +61,8 @@ config BT1_L2_CTL
 
 config TI_AEMIF
 	tristate "Texas Instruments AEMIF driver"
-	depends on (ARCH_DAVINCI || ARCH_KEYSTONE) && OF
+	depends on ARCH_DAVINCI || ARCH_KEYSTONE || COMPILE_TEST
+	depends on OF
 	help
 	  This driver is for the AEMIF module available in Texas Instruments
 	  SoCs. AEMIF stands for Asynchronous External Memory Interface and
@@ -70,7 +73,7 @@ config TI_AEMIF
 
 config TI_EMIF
 	tristate "Texas Instruments EMIF driver"
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS || COMPILE_TEST
 	select DDR
 	help
 	  This driver is for the EMIF module available in Texas Instruments
@@ -82,7 +85,7 @@ config TI_EMIF
 	  temperature changes
 
 config OMAP_GPMC
-	bool
+	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
 	select GPIOLIB
 	help
 	  This driver is for the General Purpose Memory Controller (GPMC)
@@ -106,7 +109,8 @@ config OMAP_GPMC_DEBUG
 
 config TI_EMIF_SRAM
 	tristate "Texas Instruments EMIF SRAM driver"
-	depends on (SOC_AM33XX || SOC_AM43XX) && SRAM
+	depends on SOC_AM33XX || SOC_AM43XX || (ARM && COMPILE_TEST)
+	depends on SRAM
 	help
 	  This driver is for the EMIF module available on Texas Instruments
 	  AM33XX and AM43XX SoCs and is required for PM. Certain parts of
@@ -117,7 +121,8 @@ config TI_EMIF_SRAM
 config MVEBU_DEVBUS
 	bool "Marvell EBU Device Bus Controller"
 	default y
-	depends on PLAT_ORION && OF
+	depends on PLAT_ORION || COMPILE_TEST
+	depends on OF
 	help
 	  This driver is for the Device Bus controller available in some
 	  Marvell EBU SoCs such as Discovery (mv78xx0), Orion (88f5xxx) and
@@ -126,7 +131,7 @@ config MVEBU_DEVBUS
 
 config FSL_CORENET_CF
 	tristate "Freescale CoreNet Error Reporting"
-	depends on FSL_SOC_BOOKE
+	depends on FSL_SOC_BOOKE || COMPILE_TEST
 	help
 	  Say Y for reporting of errors from the Freescale CoreNet
 	  Coherency Fabric.  Errors reported include accesses to
@@ -135,7 +140,7 @@ config FSL_CORENET_CF
 	  represents a coherency violation.
 
 config FSL_IFC
-	bool
+	bool "Freescale IFC driver" if COMPILE_TEST
 	depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST
 	depends on HAS_IOMEM
 
@@ -150,7 +155,7 @@ config JZ4780_NEMC
 	  memory devices such as NAND and SRAM.
 
 config MTK_SMI
-	bool
+	bool "Mediatek SoC Memory Controller driver" if COMPILE_TEST
 	depends on ARCH_MEDIATEK || COMPILE_TEST
 	help
 	  This driver is for the Memory Controller module in MediaTek SoCs,
@@ -159,7 +164,7 @@ config MTK_SMI
 
 config DA8XX_DDRCTL
 	bool "Texas Instruments da8xx DDR2/mDDR driver"
-	depends on ARCH_DAVINCI_DA8XX
+	depends on ARCH_DAVINCI_DA8XX || COMPILE_TEST
 	help
 	  This driver is for the DDR2/mDDR Memory Controller present on
 	  Texas Instruments da8xx SoCs. It's used to tweak various memory
@@ -169,14 +174,14 @@ config PL353_SMC
 	tristate "ARM PL35X Static Memory Controller(SMC) driver"
 	default y
 	depends on ARM
-	depends on ARM_AMBA
+	depends on ARM_AMBA || COMPILE_TEST
 	help
 	  This driver is for the ARM PL351/PL353 Static Memory
 	  Controller(SMC) module.
 
 config RENESAS_RPCIF
 	tristate "Renesas RPC-IF driver"
-	depends on ARCH_RENESAS
+	depends on ARCH_RENESAS || COMPILE_TEST
 	select REGMAP_MMIO
 	help
 	  This supports Renesas R-Car Gen3 RPC-IF which provides either SPI
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 06/23] memory: of: Remove unused headers
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 05/23] memory: Enable compile testing for most of the drivers Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 07/23] memory: of: Remove __func__ in device related messages Krzysztof Kozlowski
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

The of_memory.c does not use platform_device nor linked list.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/of_memory.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index 71f26eac7350..cfcb91eeccfb 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -7,8 +7,6 @@
  */
 
 #include <linux/device.h>
-#include <linux/platform_device.h>
-#include <linux/list.h>
 #include <linux/of.h>
 #include <linux/gfp.h>
 #include <linux/export.h>
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 07/23] memory: of: Remove __func__ in device related messages
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 06/23] memory: of: Remove unused headers Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 08/23] memory: of: Correct indentation Krzysztof Kozlowski
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Messages printed by generic of_memory code will still be using device
context so their location/meaning will be known.  Printing __func__ is
not needed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/of_memory.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index cfcb91eeccfb..8a5b654eca6b 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -4,6 +4,7 @@
  *
  * Copyright (C) 2012 Texas Instruments, Inc.
  * Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (C) 2020 Krzysztof Kozlowski <krzk@kernel.org>
  */
 
 #include <linux/device.h>
@@ -54,7 +55,7 @@ const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
 	return min;
 
 default_min_tck:
-	dev_warn(dev, "%s: using default min-tck values\n", __func__);
+	dev_warn(dev, "Using default min-tck values\n");
 	return &lpddr2_jedec_min_tck;
 }
 EXPORT_SYMBOL(of_get_min_tck);
@@ -114,7 +115,7 @@ const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
 		tim_compat = "jedec,lpddr2-timings";
 		break;
 	default:
-		dev_warn(dev, "%s: un-supported memory type\n", __func__);
+		dev_warn(dev, "Unsupported memory type\n");
 	}
 
 	for_each_child_of_node(np_ddr, np_tim)
@@ -143,7 +144,7 @@ const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
 	return timings;
 
 default_timings:
-	dev_warn(dev, "%s: using default timings\n", __func__);
+	dev_warn(dev, "Using default memory timings\n");
 	*nr_frequencies = ARRAY_SIZE(lpddr2_jedec_timings);
 	return lpddr2_jedec_timings;
 }
@@ -191,8 +192,7 @@ const struct lpddr3_min_tck *of_lpddr3_get_min_tck(struct device_node *np,
 	ret |= of_property_read_u32(np, "tMRD-min-tck", &min->tMRD);
 
 	if (ret) {
-		dev_warn(dev, "%s: errors while parsing min-tck values\n",
-			 __func__);
+		dev_warn(dev, "Errors while parsing min-tck values\n");
 		devm_kfree(dev, min);
 		goto default_min_tck;
 	}
@@ -200,7 +200,7 @@ const struct lpddr3_min_tck *of_lpddr3_get_min_tck(struct device_node *np,
 	return min;
 
 default_min_tck:
-	dev_warn(dev, "%s: using default min-tck values\n", __func__);
+	dev_warn(dev, "Using default min-tck values\n");
 	return NULL;
 }
 EXPORT_SYMBOL(of_lpddr3_get_min_tck);
@@ -262,7 +262,7 @@ const struct lpddr3_timings
 		tim_compat = "jedec,lpddr3-timings";
 		break;
 	default:
-		dev_warn(dev, "%s: un-supported memory type\n", __func__);
+		dev_warn(dev, "Unsupported memory type\n");
 	}
 
 	for_each_child_of_node(np_ddr, np_tim)
@@ -291,7 +291,7 @@ const struct lpddr3_timings
 	return timings;
 
 default_timings:
-	dev_warn(dev, "%s: failed to get timings\n", __func__);
+	dev_warn(dev, "Failed to get timings\n");
 	*nr_frequencies = 0;
 	return NULL;
 }
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 08/23] memory: of: Correct indentation
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (6 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 07/23] memory: of: Remove __func__ in device related messages Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 09/23] memory: of: Remove unneeded extern from function declarations Krzysztof Kozlowski
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Correct indentation to match open parenthesis.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/of_memory.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index 8a5b654eca6b..67b811cb2cb9 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -26,7 +26,7 @@
  * default min timings provided by JEDEC.
  */
 const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
-		struct device *dev)
+					    struct device *dev)
 {
 	int			ret = 0;
 	struct lpddr2_min_tck	*min;
@@ -61,7 +61,7 @@ const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
 EXPORT_SYMBOL(of_get_min_tck);
 
 static int of_do_get_timings(struct device_node *np,
-		struct lpddr2_timings *tim)
+			     struct lpddr2_timings *tim)
 {
 	int ret;
 
@@ -83,7 +83,7 @@ static int of_do_get_timings(struct device_node *np,
 	ret |= of_property_read_u32(np, "tZQinit", &tim->tZQinit);
 	ret |= of_property_read_u32(np, "tRAS-max-ns", &tim->tRAS_max_ns);
 	ret |= of_property_read_u32(np, "tDQSCK-max-derated",
-		&tim->tDQSCK_max_derated);
+				    &tim->tDQSCK_max_derated);
 
 	return ret;
 }
@@ -102,7 +102,9 @@ static int of_do_get_timings(struct device_node *np,
  * while populating, returns default timings provided by JEDEC.
  */
 const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
-		struct device *dev, u32 device_type, u32 *nr_frequencies)
+						struct device *dev,
+						u32 device_type,
+						u32 *nr_frequencies)
 {
 	struct lpddr2_timings	*timings = NULL;
 	u32			arr_sz = 0, i = 0;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 09/23] memory: of: Remove unneeded extern from function declarations
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (7 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 08/23] memory: of: Correct indentation Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 10/23] memory: emif-asm-offsets: Add GPLv2 SPDX license header Krzysztof Kozlowski
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Function declarations in headers do not need to come with extern
keyword.  Remove them to make the declaration slightly shorter.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/of_memory.h | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/memory/of_memory.h b/drivers/memory/of_memory.h
index e39ecc4c733d..4a99b232ab0a 100644
--- a/drivers/memory/of_memory.h
+++ b/drivers/memory/of_memory.h
@@ -3,22 +3,23 @@
  * OpenFirmware helpers for memory drivers
  *
  * Copyright (C) 2012 Texas Instruments, Inc.
+ * Copyright (C) 2020 Krzysztof Kozlowski <krzk@kernel.org>
  */
 
 #ifndef __LINUX_MEMORY_OF_REG_H
 #define __LINUX_MEMORY_OF_REG_H
 
 #if defined(CONFIG_OF) && defined(CONFIG_DDR)
-extern const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
-		struct device *dev);
-extern const struct lpddr2_timings
-	*of_get_ddr_timings(struct device_node *np_ddr, struct device *dev,
-	u32 device_type, u32 *nr_frequencies);
-extern const struct lpddr3_min_tck
-	*of_lpddr3_get_min_tck(struct device_node *np, struct device *dev);
-extern const struct lpddr3_timings
-	*of_lpddr3_get_ddr_timings(struct device_node *np_ddr,
-	struct device *dev, u32 device_type, u32 *nr_frequencies);
+const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np,
+					    struct device *dev);
+const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
+						struct device *dev,
+						u32 device_type, u32 *nr_frequencies);
+const struct lpddr3_min_tck *of_lpddr3_get_min_tck(struct device_node *np,
+						   struct device *dev);
+const struct lpddr3_timings *
+of_lpddr3_get_ddr_timings(struct device_node *np_ddr,
+			  struct device *dev, u32 device_type, u32 *nr_frequencies);
 #else
 static inline const struct lpddr2_min_tck
 	*of_get_min_tck(struct device_node *np, struct device *dev)
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 10/23] memory: emif-asm-offsets: Add GPLv2 SPDX license header
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (8 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 09/23] memory: of: Remove unneeded extern from function declarations Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 11/23] memory: emif: Put constant in comparison on the right side Krzysztof Kozlowski
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Add GPLv2 license header and remove GPL boiler plate text.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/emif-asm-offsets.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/memory/emif-asm-offsets.c b/drivers/memory/emif-asm-offsets.c
index db8043019ec6..2ebf94c07ba3 100644
--- a/drivers/memory/emif-asm-offsets.c
+++ b/drivers/memory/emif-asm-offsets.c
@@ -1,16 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * TI AM33XX EMIF PM Assembly Offsets
  *
  * Copyright (C) 2016-2017 Texas Instruments Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 #include <linux/ti-emif-sram.h>
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 11/23] memory: emif: Put constant in comparison on the right side
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (9 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 10/23] memory: emif-asm-offsets: Add GPLv2 SPDX license header Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 12/23] memory: emif: Fix whitespace coding style violations Krzysztof Kozlowski
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Fixes checkpatch warning:

    WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/emif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 58a82eea5850..97bad1588bba 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -282,7 +282,7 @@ static void set_lpmode(struct emif_data *emif, u8 lpmode)
 	 * the EMIF_PWR_MGMT_CTRL[10:8] REG_LP_MODE bit field to 0x4.
 	 */
 	if ((emif->plat_data->ip_rev == EMIF_4D) &&
-	    (EMIF_LP_MODE_PWR_DN == lpmode)) {
+	    (lpmode == EMIF_LP_MODE_PWR_DN)) {
 		WARN_ONCE(1,
 			  "REG_LP_MODE = LP_MODE_PWR_DN(4) is prohibited by"
 			  "erratum i743 switch to LP_MODE_SELF_REFRESH(2)\n");
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 12/23] memory: emif: Fix whitespace coding style violations
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (10 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 11/23] memory: emif: Put constant in comparison on the right side Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 13/23] memory: emif: Silence platform_get_irq() error in driver Krzysztof Kozlowski
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Make the code and printed messages slightly more readable.  Fixes
checkpatch warnings:

    WARNING: quoted string split across lines
    ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/emif.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 97bad1588bba..1241a87081f8 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -284,8 +284,7 @@ static void set_lpmode(struct emif_data *emif, u8 lpmode)
 	if ((emif->plat_data->ip_rev == EMIF_4D) &&
 	    (lpmode == EMIF_LP_MODE_PWR_DN)) {
 		WARN_ONCE(1,
-			  "REG_LP_MODE = LP_MODE_PWR_DN(4) is prohibited by"
-			  "erratum i743 switch to LP_MODE_SELF_REFRESH(2)\n");
+			  "REG_LP_MODE = LP_MODE_PWR_DN(4) is prohibited by erratum i743 switch to LP_MODE_SELF_REFRESH(2)\n");
 		/* rollback LP_MODE to Self-refresh mode */
 		lpmode = EMIF_LP_MODE_SELF_REFRESH;
 	}
@@ -714,7 +713,7 @@ static u32 get_ext_phy_ctrl_2_intelliphy_4d5(void)
 	u32 fifo_we_slave_ratio;
 
 	fifo_we_slave_ratio =  DIV_ROUND_CLOSEST(
-		EMIF_INTELLI_PHY_DQS_GATE_OPENING_DELAY_PS * 256 , t_ck);
+		EMIF_INTELLI_PHY_DQS_GATE_OPENING_DELAY_PS * 256, t_ck);
 
 	return fifo_we_slave_ratio | fifo_we_slave_ratio << 11 |
 		fifo_we_slave_ratio << 22;
@@ -725,7 +724,7 @@ static u32 get_ext_phy_ctrl_3_intelliphy_4d5(void)
 	u32 fifo_we_slave_ratio;
 
 	fifo_we_slave_ratio =  DIV_ROUND_CLOSEST(
-		EMIF_INTELLI_PHY_DQS_GATE_OPENING_DELAY_PS * 256 , t_ck);
+		EMIF_INTELLI_PHY_DQS_GATE_OPENING_DELAY_PS * 256, t_ck);
 
 	return fifo_we_slave_ratio >> 10 | fifo_we_slave_ratio << 1 |
 		fifo_we_slave_ratio << 12 | fifo_we_slave_ratio << 23;
@@ -736,7 +735,7 @@ static u32 get_ext_phy_ctrl_4_intelliphy_4d5(void)
 	u32 fifo_we_slave_ratio;
 
 	fifo_we_slave_ratio =  DIV_ROUND_CLOSEST(
-		EMIF_INTELLI_PHY_DQS_GATE_OPENING_DELAY_PS * 256 , t_ck);
+		EMIF_INTELLI_PHY_DQS_GATE_OPENING_DELAY_PS * 256, t_ck);
 
 	return fifo_we_slave_ratio >> 9 | fifo_we_slave_ratio << 2 |
 		fifo_we_slave_ratio << 13;
@@ -975,8 +974,7 @@ static irqreturn_t handle_temp_alert(void __iomem *base, struct emif_data *emif)
 				EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART)) {
 		if (emif->temperature_level >= SDRAM_TEMP_HIGH_DERATE_REFRESH) {
 			dev_err(emif->dev,
-				"%s:NOT Extended temperature capable memory."
-				"Converting MR4=0x%02x as shutdown event\n",
+				"%s:NOT Extended temperature capable memory. Converting MR4=0x%02x as shutdown event\n",
 				__func__, emif->temperature_level);
 			/*
 			 * Temperature far too high - do kernel_power_off()
@@ -1318,9 +1316,9 @@ static void __init_or_module of_get_ddr_info(struct device_node *np_emif,
 	if (of_find_property(np_emif, "cal-resistor-per-cs", &len))
 		dev_info->cal_resistors_per_cs = true;
 
-	if (of_device_is_compatible(np_ddr , "jedec,lpddr2-s4"))
+	if (of_device_is_compatible(np_ddr, "jedec,lpddr2-s4"))
 		dev_info->type = DDR_TYPE_LPDDR2_S4;
-	else if (of_device_is_compatible(np_ddr , "jedec,lpddr2-s2"))
+	else if (of_device_is_compatible(np_ddr, "jedec,lpddr2-s2"))
 		dev_info->type = DDR_TYPE_LPDDR2_S2;
 
 	of_property_read_u32(np_ddr, "density", &density);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 13/23] memory: emif: Silence platform_get_irq() error in driver
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (11 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 12/23] memory: emif: Fix whitespace coding style violations Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer Krzysztof Kozlowski
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

The platform_get_irq() already prints error message so there is no need
to do it again in the driver.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/emif.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 1241a87081f8..1bf0656d5e9a 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1561,11 +1561,8 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
 		goto error;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(emif->dev, "%s: error getting IRQ resource - %d\n",
-			__func__, irq);
+	if (irq < 0)
 		goto error;
-	}
 
 	emif_onetime_settings(emif);
 	emif_debugfs_init(emif);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (12 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 13/23] memory: emif: Silence platform_get_irq() error in driver Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  8:48   ` Arnd Bergmann
  2020-07-23  7:37 ` [PATCH 15/23] memory: renesas-rpc-if: Simplify with PTR_ERR_OR_ZERO Krzysztof Kozlowski
                   ` (10 subsequent siblings)
  24 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Cast pointer to iomem memory properly to fix sparse warning:

    drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces)
    drivers/memory/ti-emif-pm.c:251:38:    expected void const volatile [noderef] __iomem *addr
    drivers/memory/ti-emif-pm.c:251:38:    got void *

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/ti-emif-pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
index 9c90f815ad3a..6c747c1e98cb 100644
--- a/drivers/memory/ti-emif-pm.c
+++ b/drivers/memory/ti-emif-pm.c
@@ -248,7 +248,7 @@ MODULE_DEVICE_TABLE(of, ti_emif_of_match);
 static int ti_emif_resume(struct device *dev)
 {
 	unsigned long tmp =
-			__raw_readl((void *)emif_instance->ti_emif_sram_virt);
+			__raw_readl((void __iomem *)emif_instance->ti_emif_sram_virt);
 
 	/*
 	 * Check to see if what we are copying is already present in the
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 15/23] memory: renesas-rpc-if: Simplify with PTR_ERR_OR_ZERO
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (13 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 16/23] memory: brcmstb_dpfe: Constify the contents of string Krzysztof Kozlowski
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Use PTR_ERR_OR_ZERO to make the code a little bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/renesas-rpc-if.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
index 88f51ec8f1d1..f2a33a1af836 100644
--- a/drivers/memory/renesas-rpc-if.c
+++ b/drivers/memory/renesas-rpc-if.c
@@ -199,10 +199,8 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
 		rpc->dirmap = NULL;
 
 	rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
-	if (IS_ERR(rpc->rstc))
-		return PTR_ERR(rpc->rstc);
 
-	return 0;
+	return PTR_ERR_OR_ZERO(rpc->rstc);
 }
 EXPORT_SYMBOL(rpcif_sw_init);
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 16/23] memory: brcmstb_dpfe: Constify the contents of string
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (14 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 15/23] memory: renesas-rpc-if: Simplify with PTR_ERR_OR_ZERO Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23 17:11   ` Florian Fainelli
  2020-07-23  7:37 ` [PATCH 17/23] memory: brcmstb_dpfe: Remove unneeded braces Krzysztof Kozlowski
                   ` (8 subsequent siblings)
  24 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

The string itself can be made const for safety.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/brcmstb_dpfe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c
index 82b415be18d1..5942380f343b 100644
--- a/drivers/memory/brcmstb_dpfe.c
+++ b/drivers/memory/brcmstb_dpfe.c
@@ -188,7 +188,7 @@ struct brcmstb_dpfe_priv {
 	struct mutex lock;
 };
 
-static const char *error_text[] = {
+static const char * const error_text[] = {
 	"Success", "Header code incorrect", "Unknown command or argument",
 	"Incorrect checksum", "Malformed command", "Timed out",
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 17/23] memory: brcmstb_dpfe: Remove unneeded braces
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (15 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 16/23] memory: brcmstb_dpfe: Constify the contents of string Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23 17:11   ` Florian Fainelli
  2020-07-23  7:37 ` [PATCH 18/23] memory: mtk-smi: Add argument to function definition Krzysztof Kozlowski
                   ` (7 subsequent siblings)
  24 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Single statement blocks don't need braces.  Fixes checkpatch warning:

    WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/brcmstb_dpfe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c
index 5942380f343b..604f0e3fb112 100644
--- a/drivers/memory/brcmstb_dpfe.c
+++ b/drivers/memory/brcmstb_dpfe.c
@@ -379,9 +379,8 @@ static void __iomem *get_msg_ptr(struct brcmstb_dpfe_priv *priv, u32 response,
 	void __iomem *ptr = NULL;
 
 	/* There is no need to use this function for API v3 or later. */
-	if (unlikely(priv->dpfe_api->version >= 3)) {
+	if (unlikely(priv->dpfe_api->version >= 3))
 		return NULL;
-	}
 
 	msg_type = (response >> DRAM_MSG_TYPE_OFFSET) & DRAM_MSG_TYPE_MASK;
 	offset = (response >> DRAM_MSG_ADDR_OFFSET) & DRAM_MSG_ADDR_MASK;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 18/23] memory: mtk-smi: Add argument to function definition
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (16 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 17/23] memory: brcmstb_dpfe: Remove unneeded braces Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  8:50   ` Arnd Bergmann
  2020-07-23  7:37 ` [PATCH 19/23] memory: omap-gpmc: Enclose macro statements in do-while Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  24 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Fix checkpatch warning:
    WARNING: function definition argument 'struct device *' should also have an identifier name

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/mtk-smi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
index 109c7e51d551..c21262502581 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -60,7 +60,7 @@ struct mtk_smi_common_plat {
 
 struct mtk_smi_larb_gen {
 	int port_in_larb[MTK_LARB_NR_MAX + 1];
-	void (*config_port)(struct device *);
+	void (*config_port)(struct device *dev);
 	unsigned int			larb_direct_to_common_mask;
 	bool				has_gals;
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 19/23] memory: omap-gpmc: Enclose macro statements in do-while
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (17 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 18/23] memory: mtk-smi: Add argument to function definition Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  9:09   ` Arnd Bergmann
  2020-07-23  7:37 ` [PATCH 20/23] memory: omap-gpmc: Fix whitespace issue Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  24 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

do-while is a preferred way for complex macros because of safety
reasons.  This fixes checkpatch error:

    ERROR: Macros starting with if should be enclosed by a do - while
        loop to avoid possible if/else logic defects

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/omap-gpmc.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index c158b6cae9a9..bb85aa56d247 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -635,10 +635,12 @@ static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, int max
 	return 0;
 }
 
-#define GPMC_SET_ONE_CD_MAX(reg, st, end, max, field, cd)  \
-	if (set_gpmc_timing_reg(cs, (reg), (st), (end), (max), \
-	    t->field, (cd), #field) < 0)                       \
-		return -1
+#define GPMC_SET_ONE_CD_MAX(reg, st, end, max, field, cd)		\
+	do {								\
+		if (set_gpmc_timing_reg(cs, (reg), (st), (end), (max),	\
+		    t->field, (cd), #field) < 0)			\
+			return -1;					\
+	} while (0)
 
 #define GPMC_SET_ONE(reg, st, end, field) \
 	GPMC_SET_ONE_CD_MAX(reg, st, end, 0, field, GPMC_CD_FCLK)
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 20/23] memory: omap-gpmc: Fix whitespace issue
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (18 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 19/23] memory: omap-gpmc: Enclose macro statements in do-while Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  9:11   ` Arnd Bergmann
  2020-07-23  7:37 ` [PATCH 21/23] memory: pl172: Add GPLv2 SPDX license header Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  24 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Fix minor whitespace issues.  No functional changes.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/omap-gpmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index bb85aa56d247..dc10f55a3162 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -958,7 +958,7 @@ static int gpmc_cs_remap(int cs, u32 base)
 	 * Make sure we ignore any device offsets from the GPMC partition
 	 * allocated for the chip select and that the new base confirms
 	 * to the GPMC 16MB minimum granularity.
-	 */ 
+	 */
 	base &= ~(SZ_16M - 1);
 
 	gpmc_cs_get_memconf(cs, &old_base, &size);
@@ -1756,7 +1756,7 @@ static int gpmc_calc_common_timings(struct gpmc_timings *gpmc_t,
 /* TODO: remove this function once all peripherals are confirmed to
  * work with generic timing. Simultaneously gpmc_cs_set_timings()
  * has to be modified to handle timings in ps instead of ns
-*/
+ */
 static void gpmc_convert_ps_to_ns(struct gpmc_timings *t)
 {
 	t->cs_on /= 1000;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 21/23] memory: pl172: Add GPLv2 SPDX license header
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (19 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 20/23] memory: omap-gpmc: Fix whitespace issue Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 22/23] memory: tegra: tegra210-emc: Fix indentation Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Add GPLv2 license header and remove GPL boiler plate text.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/pl172.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/memory/pl172.c b/drivers/memory/pl172.c
index ff57195b4e37..084891eb29cc 100644
--- a/drivers/memory/pl172.c
+++ b/drivers/memory/pl172.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Memory controller driver for ARM PrimeCell PL172
  * PrimeCell MultiPort Memory Controller (PL172)
@@ -6,10 +7,6 @@
  *
  * Based on:
  * TI AEMIF driver, Copyright (C) 2010 - 2013 Texas Instruments Inc.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
  */
 
 #include <linux/amba/bus.h>
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 22/23] memory: tegra: tegra210-emc: Fix indentation
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (20 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 21/23] memory: pl172: Add GPLv2 SPDX license header Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23  7:37 ` [PATCH 23/23] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

Use tabs instead of spaces for indentation.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/tegra/tegra210-emc-cc-r21021.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/memory/tegra/tegra210-emc-cc-r21021.c b/drivers/memory/tegra/tegra210-emc-cc-r21021.c
index ff55a17896fa..d60bdea3af3f 100644
--- a/drivers/memory/tegra/tegra210-emc-cc-r21021.c
+++ b/drivers/memory/tegra/tegra210-emc-cc-r21021.c
@@ -1044,7 +1044,7 @@ static void tegra210_emc_r21021_set_clock(struct tegra210_emc *emc, u32 clksrc)
 			   !opt_cc_short_zcal && opt_short_zcal) {
 			value = (value & ~(EMC_ZCAL_WAIT_CNT_ZCAL_WAIT_CNT_MASK <<
 					   EMC_ZCAL_WAIT_CNT_ZCAL_WAIT_CNT_SHIFT)) |
-			        ((zq_wait_long & EMC_ZCAL_WAIT_CNT_ZCAL_WAIT_CNT_MASK) <<
+				((zq_wait_long & EMC_ZCAL_WAIT_CNT_ZCAL_WAIT_CNT_MASK) <<
 						 EMC_MRS_WAIT_CNT_SHORT_WAIT_SHIFT);
 		} else if (offset == EMC_ZCAL_INTERVAL && opt_zcal_en_cc) {
 			value = 0; /* EMC_ZCAL_INTERVAL reset value. */
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [PATCH 23/23] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (21 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 22/23] memory: tegra: tegra210-emc: Fix indentation Krzysztof Kozlowski
@ 2020-07-23  7:37 ` Krzysztof Kozlowski
  2020-07-23 17:12   ` Florian Fainelli
  2020-07-23  7:46 ` [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Greg Kroah-Hartman
  2020-07-23  9:31 ` Arnd Bergmann
  24 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  7:37 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, arm, soc, Krzysztof Kozlowski,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

The specific drivers in drivers/memory usually go via architecture (e.g.
ARM SoC) maintainers but the generic parts (of_memory.[ch]) lacked any
care.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index f4557bc43bd5..cba0ed77775b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11158,6 +11158,13 @@ F:	Documentation/core-api/boot-time-mm.rst
 F:	include/linux/memblock.h
 F:	mm/memblock.c
 
+MEMORY CONTROLLER DRIVERS
+M:	Krzysztof Kozlowski <krzk@kernel.org>
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/memory-controllers/
+F:	drivers/memory/
+
 MEMORY FREQUENCY SCALING DRIVERS FOR NVIDIA TEGRA
 M:	Dmitry Osipenko <digetx@gmail.com>
 L:	linux-pm@vger.kernel.org
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* Re: [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (22 preceding siblings ...)
  2020-07-23  7:37 ` [PATCH 23/23] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers Krzysztof Kozlowski
@ 2020-07-23  7:46 ` Greg Kroah-Hartman
  2020-07-23  9:31 ` Arnd Bergmann
  24 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2020-07-23  7:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, linux-tegra, Arnd Bergmann, linux-omap,
	Tony Lindgren, linux-mediatek, linux-kernel, Vladimir Zapolskiy,
	Matthias Brugger, soc, arm, bcm-kernel-feedback-list,
	Markus Mayer, Santosh Shilimkar, Olof Johansson, Thierry Reding,
	Andrew Morton, Jonathan Hunter, Linus Torvalds, linux-arm-kernel,
	Roger Quadros

On Thu, Jul 23, 2020 at 09:37:21AM +0200, Krzysztof Kozlowski wrote:
> Dear All,
> 
> The drivers/memory directory contains generic code (of_memory.c) and a
> bunch of drivers.  Changes to generic code were coming usually through
> different trees with the driver code.
> 
> Over last days, memory drivers grew in numbers but not necessarily in
> quality.  They lacked compile testing and code cleanup.  Also lacked
> maintainer.
> 
> I would be happy to take care about this part.

No objection from me, thanks for steping up to do this.

> If there are no objections, the patches could go either to Linus or to
> arm-soc (most of drivers are ARM specific).

None from me!

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer
  2020-07-23  7:37 ` [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer Krzysztof Kozlowski
@ 2020-07-23  8:48   ` Arnd Bergmann
  2020-07-23  9:02     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 44+ messages in thread
From: Arnd Bergmann @ 2020-07-23  8:48 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Cast pointer to iomem memory properly to fix sparse warning:
>
>     drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces)
>     drivers/memory/ti-emif-pm.c:251:38:    expected void const volatile [noderef] __iomem *addr
>     drivers/memory/ti-emif-pm.c:251:38:    got void *
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/memory/ti-emif-pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
> index 9c90f815ad3a..6c747c1e98cb 100644
> --- a/drivers/memory/ti-emif-pm.c
> +++ b/drivers/memory/ti-emif-pm.c
> @@ -248,7 +248,7 @@ MODULE_DEVICE_TABLE(of, ti_emif_of_match);
>  static int ti_emif_resume(struct device *dev)
>  {
>         unsigned long tmp =
> -                       __raw_readl((void *)emif_instance->ti_emif_sram_virt);
> +                       __raw_readl((void __iomem *)emif_instance->ti_emif_sram_virt);
>

Maybe this shouldn't even be __raw_readl(), but instead READ_ONCE()?

The other accesses in this file don't use MMIO wrappers either but just treat
it as a pointer. The effect would be the same though.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 18/23] memory: mtk-smi: Add argument to function definition
  2020-07-23  7:37 ` [PATCH 18/23] memory: mtk-smi: Add argument to function definition Krzysztof Kozlowski
@ 2020-07-23  8:50   ` Arnd Bergmann
  2020-07-23  8:55     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 44+ messages in thread
From: Arnd Bergmann @ 2020-07-23  8:50 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Fix checkpatch warning:
>     WARNING: function definition argument 'struct device *' should also have an identifier name
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Is this a bug in checkpatch? I don't see why it should warn about this,
as there is no function definition here.

Your change is clearly harmless, but I wonder if we should fix
checkpatch instead.

      Arnd

> ---
>  drivers/memory/mtk-smi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
> index 109c7e51d551..c21262502581 100644
> --- a/drivers/memory/mtk-smi.c
> +++ b/drivers/memory/mtk-smi.c
> @@ -60,7 +60,7 @@ struct mtk_smi_common_plat {
>
>  struct mtk_smi_larb_gen {
>         int port_in_larb[MTK_LARB_NR_MAX + 1];
> -       void (*config_port)(struct device *);
> +       void (*config_port)(struct device *dev);
>         unsigned int                    larb_direct_to_common_mask;
>         bool                            has_gals;
>  };
> --
> 2.17.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 18/23] memory: mtk-smi: Add argument to function definition
  2020-07-23  8:50   ` Arnd Bergmann
@ 2020-07-23  8:55     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  8:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 10:50:08AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Fix checkpatch warning:
> >     WARNING: function definition argument 'struct device *' should also have an identifier name
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> Is this a bug in checkpatch? I don't see why it should warn about this,
> as there is no function definition here.
> 
> Your change is clearly harmless, but I wonder if we should fix
> checkpatch instead.

Good point. If this were not a warning, I would ignore it. However still
the common practice is to add arguments to such type definitions as it
helps to describe the type.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer
  2020-07-23  8:48   ` Arnd Bergmann
@ 2020-07-23  9:02     ` Krzysztof Kozlowski
  2020-07-23  9:14       ` Arnd Bergmann
  0 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  9:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 10:48:19AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Cast pointer to iomem memory properly to fix sparse warning:
> >
> >     drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces)
> >     drivers/memory/ti-emif-pm.c:251:38:    expected void const volatile [noderef] __iomem *addr
> >     drivers/memory/ti-emif-pm.c:251:38:    got void *
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> >  drivers/memory/ti-emif-pm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
> > index 9c90f815ad3a..6c747c1e98cb 100644
> > --- a/drivers/memory/ti-emif-pm.c
> > +++ b/drivers/memory/ti-emif-pm.c
> > @@ -248,7 +248,7 @@ MODULE_DEVICE_TABLE(of, ti_emif_of_match);
> >  static int ti_emif_resume(struct device *dev)
> >  {
> >         unsigned long tmp =
> > -                       __raw_readl((void *)emif_instance->ti_emif_sram_virt);
> > +                       __raw_readl((void __iomem *)emif_instance->ti_emif_sram_virt);
> >
> 
> Maybe this shouldn't even be __raw_readl(), but instead READ_ONCE()?

Won't readl() be enough? Indeed it looks problematic.

> 
> The other accesses in this file don't use MMIO wrappers either but just treat
> it as a pointer. The effect would be the same though.

I think all the reads and writes are with readl() and writel().

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 19/23] memory: omap-gpmc: Enclose macro statements in do-while
  2020-07-23  7:37 ` [PATCH 19/23] memory: omap-gpmc: Enclose macro statements in do-while Krzysztof Kozlowski
@ 2020-07-23  9:09   ` Arnd Bergmann
  2020-07-23 10:16     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 44+ messages in thread
From: Arnd Bergmann @ 2020-07-23  9:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> do-while is a preferred way for complex macros because of safety
> reasons.  This fixes checkpatch error:
>
>     ERROR: Macros starting with if should be enclosed by a do - while
>         loop to avoid possible if/else logic defects
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

This is an improvement, but the macro still has other issues that
are just as bad as the one you address:

- Using the # operator to avoid the "" in the invocation seems confusing
- it implicitly uses the 'cs' and 't' variables of the calling function instead
  of passing them as arguments.
- it calls 'return -1' in a function that otherwise uses errno-style
  return codes, so this gets interpreted as EPERM "Operation not
  permitted".

I would probably just open-code the entire thing and remove the
macro like:

ret = 0;
ret |= set_gpmc_timing_reg(cs, GPMC_CS_CONFIG2,  0,  3, 0, t->cs_on,
GPMC_CD_FCLK, "cs_on");
ret |= set_gpmc_timing_reg(cs, GPMC_CS_CONFIG2,  8,  12, 0,
t->cs_rd_off, GPMC_CD_FCLK, "cs_rd_off");
ret |= set_gpmc_timing_reg(cs, GPMC_CS_CONFIG2,  16,  20, 0,
t->cs_wr_off, GPMC_CD_FCLK, "cs_wr_off);
...
if (ret)
     return -ENXIO;

Of maybe leave the macro, but remove the if/return part and use
the "ret |= GPMC_SET_ONE(...)" trick to avoid some of the problems.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 20/23] memory: omap-gpmc: Fix whitespace issue
  2020-07-23  7:37 ` [PATCH 20/23] memory: omap-gpmc: Fix whitespace issue Krzysztof Kozlowski
@ 2020-07-23  9:11   ` Arnd Bergmann
  2020-07-23 10:08     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 44+ messages in thread
From: Arnd Bergmann @ 2020-07-23  9:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:

> @@ -1756,7 +1756,7 @@ static int gpmc_calc_common_timings(struct gpmc_timings *gpmc_t,
>  /* TODO: remove this function once all peripherals are confirmed to
>   * work with generic timing. Simultaneously gpmc_cs_set_timings()
>   * has to be modified to handle timings in ps instead of ns
> -*/
> + */

This still doesn't follow the normal coding style for multi-line comments.

I don't think it's worth fixing, but if you think it should be changed, then
make it

     /*
      * mult-line comment
      * ...
      */

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer
  2020-07-23  9:02     ` Krzysztof Kozlowski
@ 2020-07-23  9:14       ` Arnd Bergmann
  2020-07-23 10:01         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 44+ messages in thread
From: Arnd Bergmann @ 2020-07-23  9:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 11:02 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Jul 23, 2020 at 10:48:19AM +0200, Arnd Bergmann wrote:
> > On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > >
> > > Cast pointer to iomem memory properly to fix sparse warning:
> > >
> > >     drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces)
> > >     drivers/memory/ti-emif-pm.c:251:38:    expected void const volatile [noderef] __iomem *addr
> > >     drivers/memory/ti-emif-pm.c:251:38:    got void *
> > >
> > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > > ---
> > >  drivers/memory/ti-emif-pm.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
> > > index 9c90f815ad3a..6c747c1e98cb 100644
> > > --- a/drivers/memory/ti-emif-pm.c
> > > +++ b/drivers/memory/ti-emif-pm.c
> > > @@ -248,7 +248,7 @@ MODULE_DEVICE_TABLE(of, ti_emif_of_match);
> > >  static int ti_emif_resume(struct device *dev)
> > >  {
> > >         unsigned long tmp =
> > > -                       __raw_readl((void *)emif_instance->ti_emif_sram_virt);
> > > +                       __raw_readl((void __iomem *)emif_instance->ti_emif_sram_virt);
> > >
> >
> > Maybe this shouldn't even be __raw_readl(), but instead READ_ONCE()?
>
> Won't readl() be enough? Indeed it looks problematic.

readl() won't work on big-endian kernels, since this is a byte comparison.

> > The other accesses in this file don't use MMIO wrappers either but just treat
> > it as a pointer. The effect would be the same though.
>
> I think all the reads and writes are with readl() and writel().

I actually see only one other access:

        copy_addr = sram_exec_copy(emif_data->sram_pool_code,
                                   (void *)emif_data->ti_emif_sram_virt,
                                   &ti_emif_sram, ti_emif_sram_sz);

and this one ends up in a memcpy() that does not perform any byte
swapping or barriers.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers
  2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
                   ` (23 preceding siblings ...)
  2020-07-23  7:46 ` [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Greg Kroah-Hartman
@ 2020-07-23  9:31 ` Arnd Bergmann
  2020-07-23  9:52   ` Krzysztof Kozlowski
  24 siblings, 1 reply; 44+ messages in thread
From: Arnd Bergmann @ 2020-07-23  9:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 9:37 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Dear All,
>
> The drivers/memory directory contains generic code (of_memory.c) and a
> bunch of drivers.  Changes to generic code were coming usually through
> different trees with the driver code.
>
> Over last days, memory drivers grew in numbers but not necessarily in
> quality.  They lacked compile testing and code cleanup.  Also lacked
> maintainer.
>
> I would be happy to take care about this part.
>
> If there are no objections, the patches could go either to Linus or to
> arm-soc (most of drivers are ARM specific).
>
> Driver-specific changes in the patchset were only compile-tested. Tests
> are welcome. The generic code was tested on ARMv7 Exynos based boards
> with a exynos5422-dmc memory controller driver.

Overall this looks great, I had a look through the patches and commented
on the few things that seemed slightly odd though harmless.

Thanks for picking up the subsystem. How do you want to proceed
in the long run? I suppose you can send a pull request to soc@kernel.org
to be picked up for the coming merge window as the normal way, since
you are not yet listed as the maintained until the end of the series.

Afterwards you could either send the pull requests to Linus directly,
or send them to the soc team (or to Greg) as well, the way we handle
a couple of other subsystems like drivers/reset and drivers/tee that
usually only have a handful of patches per release.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers
  2020-07-23  9:31 ` Arnd Bergmann
@ 2020-07-23  9:52   ` Krzysztof Kozlowski
  2020-07-23 10:14     ` Arnd Bergmann
  0 siblings, 1 reply; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23  9:52 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 11:31:02AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 23, 2020 at 9:37 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Dear All,
> >
> > The drivers/memory directory contains generic code (of_memory.c) and a
> > bunch of drivers.  Changes to generic code were coming usually through
> > different trees with the driver code.
> >
> > Over last days, memory drivers grew in numbers but not necessarily in
> > quality.  They lacked compile testing and code cleanup.  Also lacked
> > maintainer.
> >
> > I would be happy to take care about this part.
> >
> > If there are no objections, the patches could go either to Linus or to
> > arm-soc (most of drivers are ARM specific).
> >
> > Driver-specific changes in the patchset were only compile-tested. Tests
> > are welcome. The generic code was tested on ARMv7 Exynos based boards
> > with a exynos5422-dmc memory controller driver.
> 
> Overall this looks great, I had a look through the patches and commented
> on the few things that seemed slightly odd though harmless.
> 
> Thanks for picking up the subsystem. How do you want to proceed
> in the long run? I suppose you can send a pull request to soc@kernel.org
> to be picked up for the coming merge window as the normal way, since
> you are not yet listed as the maintained until the end of the series.
> 
> Afterwards you could either send the pull requests to Linus directly,
> or send them to the soc team (or to Greg) as well, the way we handle
> a couple of other subsystems like drivers/reset and drivers/tee that
> usually only have a handful of patches per release.

Most of the drivers are for ARM architecture so arm-soc seems like the
way to do it.  However BT1_L2_CTL and JZ4780_NEMC are MIPS specific and
maybe more would come in the future.  Are you fine taking them as well?

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer
  2020-07-23  9:14       ` Arnd Bergmann
@ 2020-07-23 10:01         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23 10:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 11:14:02AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 23, 2020 at 11:02 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > On Thu, Jul 23, 2020 at 10:48:19AM +0200, Arnd Bergmann wrote:
> > > On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > > >
> > > > Cast pointer to iomem memory properly to fix sparse warning:
> > > >
> > > >     drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces)
> > > >     drivers/memory/ti-emif-pm.c:251:38:    expected void const volatile [noderef] __iomem *addr
> > > >     drivers/memory/ti-emif-pm.c:251:38:    got void *
> > > >
> > > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > > > ---
> > > >  drivers/memory/ti-emif-pm.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c
> > > > index 9c90f815ad3a..6c747c1e98cb 100644
> > > > --- a/drivers/memory/ti-emif-pm.c
> > > > +++ b/drivers/memory/ti-emif-pm.c
> > > > @@ -248,7 +248,7 @@ MODULE_DEVICE_TABLE(of, ti_emif_of_match);
> > > >  static int ti_emif_resume(struct device *dev)
> > > >  {
> > > >         unsigned long tmp =
> > > > -                       __raw_readl((void *)emif_instance->ti_emif_sram_virt);
> > > > +                       __raw_readl((void __iomem *)emif_instance->ti_emif_sram_virt);
> > > >
> > >
> > > Maybe this shouldn't even be __raw_readl(), but instead READ_ONCE()?
> >
> > Won't readl() be enough? Indeed it looks problematic.
> 
> readl() won't work on big-endian kernels, since this is a byte comparison.

Ah, right.

> 
> > > The other accesses in this file don't use MMIO wrappers either but just treat
> > > it as a pointer. The effect would be the same though.
> >
> > I think all the reads and writes are with readl() and writel().
> 
> I actually see only one other access:
> 
>         copy_addr = sram_exec_copy(emif_data->sram_pool_code,
>                                    (void *)emif_data->ti_emif_sram_virt,
>                                    &ti_emif_sram, ti_emif_sram_sz);
> 
> and this one ends up in a memcpy() that does not perform any byte
> swapping or barriers.

At least the barrier would come through mutex in sram_exec_copy() and
later spin locks for page table manipulation.

Anyway, I do not have the HW to test the changes or to confirm whether
this is real issue.  I guess the driver author/owner should follow up on
this report.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 20/23] memory: omap-gpmc: Fix whitespace issue
  2020-07-23  9:11   ` Arnd Bergmann
@ 2020-07-23 10:08     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23 10:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 11:11:08AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
> > @@ -1756,7 +1756,7 @@ static int gpmc_calc_common_timings(struct gpmc_timings *gpmc_t,
> >  /* TODO: remove this function once all peripherals are confirmed to
> >   * work with generic timing. Simultaneously gpmc_cs_set_timings()
> >   * has to be modified to handle timings in ps instead of ns
> > -*/
> > + */
> 
> This still doesn't follow the normal coding style for multi-line comments.
> 
> I don't think it's worth fixing, but if you think it should be changed, then
> make it
> 
>      /*
>       * mult-line comment
>       * ...
>       */

Sure, thanks for feedback.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers
  2020-07-23  9:52   ` Krzysztof Kozlowski
@ 2020-07-23 10:14     ` Arnd Bergmann
  0 siblings, 0 replies; 44+ messages in thread
From: Arnd Bergmann @ 2020-07-23 10:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 11:52 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Jul 23, 2020 at 11:31:02AM +0200, Arnd Bergmann wrote:
> > On Thu, Jul 23, 2020 at 9:37 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Afterwards you could either send the pull requests to Linus directly,
> > or send them to the soc team (or to Greg) as well, the way we handle
> > a couple of other subsystems like drivers/reset and drivers/tee that
> > usually only have a handful of patches per release.
>
> Most of the drivers are for ARM architecture so arm-soc seems like the
> way to do it.  However BT1_L2_CTL and JZ4780_NEMC are MIPS specific and
> maybe more would come in the future.  Are you fine taking them as well?

Yes, that's not a problem at all. Most other architectures are ramping down
anyway, both on the maintainership side and on newly supported hardware,
so we are picking those up where necessary. I also merged a couple of
drivers for the MIPS based Baikal SoCs recently.

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 19/23] memory: omap-gpmc: Enclose macro statements in do-while
  2020-07-23  9:09   ` Arnd Bergmann
@ 2020-07-23 10:16     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-23 10:16 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Florian Fainelli, open list:TEGRA ARCHITECTURE SUPPORT,
	linux-omap, Tony Lindgren, Greg Kroah-Hartman,
	moderated list:ARM/Mediatek SoC...,
	linux-kernel, Vladimir Zapolskiy, Matthias Brugger, SoC Team,
	arm-soc, bcm-kernel-feedback-list, Markus Mayer,
	Santosh Shilimkar, Olof Johansson, Thierry Reding, Andrew Morton,
	Jonathan Hunter, Linus Torvalds, Linux ARM, Roger Quadros

On Thu, Jul 23, 2020 at 11:09:40AM +0200, Arnd Bergmann wrote:
> On Thu, Jul 23, 2020 at 9:39 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > do-while is a preferred way for complex macros because of safety
> > reasons.  This fixes checkpatch error:
> >
> >     ERROR: Macros starting with if should be enclosed by a do - while
> >         loop to avoid possible if/else logic defects
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> This is an improvement, but the macro still has other issues that
> are just as bad as the one you address:
> 
> - Using the # operator to avoid the "" in the invocation seems confusing

I guess it was useful for debugging.

> - it implicitly uses the 'cs' and 't' variables of the calling function instead
>   of passing them as arguments.

Actually another reason to convert it to just a function.

> - it calls 'return -1' in a function that otherwise uses errno-style
>   return codes, so this gets interpreted as EPERM "Operation not
>   permitted".

The users of this macro also do it (gpmc_cs_set_timings()) so this
wrong practice is consistent with the driver. :)

> 
> I would probably just open-code the entire thing and remove the
> macro like:
> 
> ret = 0;
> ret |= set_gpmc_timing_reg(cs, GPMC_CS_CONFIG2,  0,  3, 0, t->cs_on,
> GPMC_CD_FCLK, "cs_on");
> ret |= set_gpmc_timing_reg(cs, GPMC_CS_CONFIG2,  8,  12, 0,
> t->cs_rd_off, GPMC_CD_FCLK, "cs_rd_off");
> ret |= set_gpmc_timing_reg(cs, GPMC_CS_CONFIG2,  16,  20, 0,
> t->cs_wr_off, GPMC_CD_FCLK, "cs_wr_off);
> ...
> if (ret)
>      return -ENXIO;a

I like this approach because it also removes the 'return' from macro
which is not desired.

> 
> Of maybe leave the macro, but remove the if/return part and use
> the "ret |= GPMC_SET_ONE(...)" trick to avoid some of the problems.

I could probably then keep it as a function.  This would be the safest
and remove most of the problems here.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 16/23] memory: brcmstb_dpfe: Constify the contents of string
  2020-07-23  7:37 ` [PATCH 16/23] memory: brcmstb_dpfe: Constify the contents of string Krzysztof Kozlowski
@ 2020-07-23 17:11   ` Florian Fainelli
  2020-07-23 17:15     ` Markus Mayer
  0 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2020-07-23 17:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Arnd Bergmann, Olof Johansson, arm, soc,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

On 7/23/20 12:37 AM, Krzysztof Kozlowski wrote:
> The string itself can be made const for safety.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 17/23] memory: brcmstb_dpfe: Remove unneeded braces
  2020-07-23  7:37 ` [PATCH 17/23] memory: brcmstb_dpfe: Remove unneeded braces Krzysztof Kozlowski
@ 2020-07-23 17:11   ` Florian Fainelli
  2020-07-23 17:15     ` Markus Mayer
  0 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2020-07-23 17:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Arnd Bergmann, Olof Johansson, arm, soc,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

On 7/23/20 12:37 AM, Krzysztof Kozlowski wrote:
> Single statement blocks don't need braces.  Fixes checkpatch warning:
> 
>     WARNING: braces {} are not necessary for single statement blocks
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 23/23] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers
  2020-07-23  7:37 ` [PATCH 23/23] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers Krzysztof Kozlowski
@ 2020-07-23 17:12   ` Florian Fainelli
  2020-07-24  7:15     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 44+ messages in thread
From: Florian Fainelli @ 2020-07-23 17:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Arnd Bergmann, Olof Johansson, arm, soc,
	Markus Mayer, bcm-kernel-feedback-list, Florian Fainelli,
	Santosh Shilimkar, Matthias Brugger, Roger Quadros,
	Tony Lindgren, Vladimir Zapolskiy, Thierry Reding,
	Jonathan Hunter, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-omap, linux-tegra
  Cc: Greg Kroah-Hartman, Andrew Morton, Linus Torvalds

On 7/23/20 12:37 AM, Krzysztof Kozlowski wrote:
> The specific drivers in drivers/memory usually go via architecture (e.g.
> ARM SoC) maintainers but the generic parts (of_memory.[ch]) lacked any
> care.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

What does this mean for specific drivers? For instance I tend to send
updates to brcmstb_dpfe.c through the Broadcom ARM SoC pull requests,
shall I continue to do this, or are you going to send memory controller
subsystem pull requests including that file in the future?
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 17/23] memory: brcmstb_dpfe: Remove unneeded braces
  2020-07-23 17:11   ` Florian Fainelli
@ 2020-07-23 17:15     ` Markus Mayer
  0 siblings, 0 replies; 44+ messages in thread
From: Markus Mayer @ 2020-07-23 17:15 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-omap, linux-tegra, Arnd Bergmann, Tony Lindgren,
	Greg Kroah-Hartman, linux-mediatek, Linux Kernel,
	Krzysztof Kozlowski, Vladimir Zapolskiy, Matthias Brugger, soc,
	arm, BCM Kernel Feedback, Santosh Shilimkar, Olof Johansson,
	Thierry Reding, Andrew Morton, Jonathan Hunter, Linus Torvalds,
	Linux ARM Kernel, Roger Quadros

On Thu, 23 Jul 2020 at 10:11, Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> On 7/23/20 12:37 AM, Krzysztof Kozlowski wrote:
> > Single statement blocks don't need braces.  Fixes checkpatch warning:
> >
> >     WARNING: braces {} are not necessary for single statement blocks
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Acked-by: Markus Mayer <mmayer@broadcom.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 16/23] memory: brcmstb_dpfe: Constify the contents of string
  2020-07-23 17:11   ` Florian Fainelli
@ 2020-07-23 17:15     ` Markus Mayer
  0 siblings, 0 replies; 44+ messages in thread
From: Markus Mayer @ 2020-07-23 17:15 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-omap, linux-tegra, Arnd Bergmann, Tony Lindgren,
	Greg Kroah-Hartman, linux-mediatek, Linux Kernel,
	Krzysztof Kozlowski, Vladimir Zapolskiy, Matthias Brugger, soc,
	arm, BCM Kernel Feedback, Santosh Shilimkar, Olof Johansson,
	Thierry Reding, Andrew Morton, Jonathan Hunter, Linus Torvalds,
	Linux ARM Kernel, Roger Quadros

On Thu, 23 Jul 2020 at 10:11, Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> On 7/23/20 12:37 AM, Krzysztof Kozlowski wrote:
> > The string itself can be made const for safety.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Acked-by: Markus Mayer <mmayer@broadcom.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [PATCH 23/23] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers
  2020-07-23 17:12   ` Florian Fainelli
@ 2020-07-24  7:15     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 44+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-24  7:15 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-omap, linux-tegra, Arnd Bergmann, Tony Lindgren,
	Greg Kroah-Hartman, linux-mediatek, linux-kernel,
	Vladimir Zapolskiy, Matthias Brugger, soc, arm,
	bcm-kernel-feedback-list, Markus Mayer, Santosh Shilimkar,
	Olof Johansson, Thierry Reding, Andrew Morton, Jonathan Hunter,
	Linus Torvalds, linux-arm-kernel, Roger Quadros

On Thu, Jul 23, 2020 at 10:12:36AM -0700, Florian Fainelli wrote:
> On 7/23/20 12:37 AM, Krzysztof Kozlowski wrote:
> > The specific drivers in drivers/memory usually go via architecture (e.g.
> > ARM SoC) maintainers but the generic parts (of_memory.[ch]) lacked any
> > care.
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> What does this mean for specific drivers? For instance I tend to send
> updates to brcmstb_dpfe.c through the Broadcom ARM SoC pull requests,
> shall I continue to do this, or are you going to send memory controller
> subsystem pull requests including that file in the future?

If that's okay, I intend to take the drivers patches as well. I will
rephrase the commit message.

Thanks for the feddback.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2020-07-24  7:17 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23  7:37 [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Krzysztof Kozlowski
2020-07-23  7:37 ` [RFT 01/23] memory: omap-gpmc: Remove unneeded asm/mach-types.h inclusion Krzysztof Kozlowski
2020-07-23  7:37 ` [RFT 02/23] memory: omap-gpmc: Remove unused file-scope phys_base and mem_size Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 03/23] memory: omap-gpmc: Include <linux/sizes.h> for SZ_16M Krzysztof Kozlowski
2020-07-23  7:37 ` [RFT 04/23] memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 05/23] memory: Enable compile testing for most of the drivers Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 06/23] memory: of: Remove unused headers Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 07/23] memory: of: Remove __func__ in device related messages Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 08/23] memory: of: Correct indentation Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 09/23] memory: of: Remove unneeded extern from function declarations Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 10/23] memory: emif-asm-offsets: Add GPLv2 SPDX license header Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 11/23] memory: emif: Put constant in comparison on the right side Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 12/23] memory: emif: Fix whitespace coding style violations Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 13/23] memory: emif: Silence platform_get_irq() error in driver Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 14/23] memory: ti-emif-pm: Fix cast to iomem pointer Krzysztof Kozlowski
2020-07-23  8:48   ` Arnd Bergmann
2020-07-23  9:02     ` Krzysztof Kozlowski
2020-07-23  9:14       ` Arnd Bergmann
2020-07-23 10:01         ` Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 15/23] memory: renesas-rpc-if: Simplify with PTR_ERR_OR_ZERO Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 16/23] memory: brcmstb_dpfe: Constify the contents of string Krzysztof Kozlowski
2020-07-23 17:11   ` Florian Fainelli
2020-07-23 17:15     ` Markus Mayer
2020-07-23  7:37 ` [PATCH 17/23] memory: brcmstb_dpfe: Remove unneeded braces Krzysztof Kozlowski
2020-07-23 17:11   ` Florian Fainelli
2020-07-23 17:15     ` Markus Mayer
2020-07-23  7:37 ` [PATCH 18/23] memory: mtk-smi: Add argument to function definition Krzysztof Kozlowski
2020-07-23  8:50   ` Arnd Bergmann
2020-07-23  8:55     ` Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 19/23] memory: omap-gpmc: Enclose macro statements in do-while Krzysztof Kozlowski
2020-07-23  9:09   ` Arnd Bergmann
2020-07-23 10:16     ` Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 20/23] memory: omap-gpmc: Fix whitespace issue Krzysztof Kozlowski
2020-07-23  9:11   ` Arnd Bergmann
2020-07-23 10:08     ` Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 21/23] memory: pl172: Add GPLv2 SPDX license header Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 22/23] memory: tegra: tegra210-emc: Fix indentation Krzysztof Kozlowski
2020-07-23  7:37 ` [PATCH 23/23] MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers Krzysztof Kozlowski
2020-07-23 17:12   ` Florian Fainelli
2020-07-24  7:15     ` Krzysztof Kozlowski
2020-07-23  7:46 ` [RFC PATCH 00/23] memory: Cleanup, improve and compile test memory drivers Greg Kroah-Hartman
2020-07-23  9:31 ` Arnd Bergmann
2020-07-23  9:52   ` Krzysztof Kozlowski
2020-07-23 10:14     ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).