All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage
@ 2018-07-18  8:56 Boris Brezillon
  2018-07-18  8:56 ` [PATCH v3 1/4] mtd: rawnand: s3c2410: Allow selection of this driver when COMPILE_TEST=y Boris Brezillon
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-07-18  8:56 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Arnd Bergmann

Hello,

This is an attempt at adding "depends || COMPILE_TEST" to all NAND
drivers that have no compile-time dependencies on arch
features/headers.

This will hopefully help us (NAND/MTD maintainers) in detecting build
issues earlier. Unfortunately we still have a few drivers that can't
easily be modified to be arch independent.

Regards,

Boris

Changes in v2:
- Fix a few problems reported by kbuild robots and Stephen Rothwell

Changes in v3:
- Drop depends on !IA64 since Arnd has added {read,write}s{b,w,l}()
  accessors to this arch
- Make sure the orion driver compiles when __LINUX_ARM_ARCH__ is not
  defined

Boris Brezillon (4):
  mtd: rawnand: s3c2410: Allow selection of this driver when
    COMPILE_TEST=y
  mtd: rawnand: orion: Avoid direct inclusion of asm headers
  mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not
    defined
  mtd: rawnand: orion: Allow selection of this driver when
    COMPILE_TEST=y

 drivers/mtd/nand/raw/Kconfig      | 6 ++++--
 drivers/mtd/nand/raw/orion_nand.c | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)

-- 
2.14.1

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

* [PATCH v3 1/4] mtd: rawnand: s3c2410: Allow selection of this driver when COMPILE_TEST=y
  2018-07-18  8:56 [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Boris Brezillon
@ 2018-07-18  8:56 ` Boris Brezillon
  2018-07-18  8:56 ` [PATCH v3 2/4] mtd: rawnand: orion: Avoid direct inclusion of asm headers Boris Brezillon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-07-18  8:56 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Arnd Bergmann

It just makes NAND maintainers' life easier by allowing them to
compile-test this driver without having ARCH_S3C24XX or ARCH_S3C64XX
enabled.

We add a dependency on HAS_IOMEM to make sure the driver compiles
correctly.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 drivers/mtd/nand/raw/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index b6738ece16f1..03314ab8cd4d 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -119,7 +119,8 @@ config MTD_NAND_AU1550
 
 config MTD_NAND_S3C2410
 	tristate "NAND Flash support for Samsung S3C SoCs"
-	depends on ARCH_S3C24XX || ARCH_S3C64XX
+	depends on ARCH_S3C24XX || ARCH_S3C64XX || COMPILE_TEST
+	depends on HAS_IOMEM
 	help
 	  This enables the NAND flash controller on the S3C24xx and S3C64xx
 	  SoCs
-- 
2.14.1

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

* [PATCH v3 2/4] mtd: rawnand: orion: Avoid direct inclusion of asm headers
  2018-07-18  8:56 [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Boris Brezillon
  2018-07-18  8:56 ` [PATCH v3 1/4] mtd: rawnand: s3c2410: Allow selection of this driver when COMPILE_TEST=y Boris Brezillon
@ 2018-07-18  8:56 ` Boris Brezillon
  2018-07-18  8:56 ` [PATCH v3 3/4] mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not defined Boris Brezillon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-07-18  8:56 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Arnd Bergmann

Include linux/sizes.h instead of asm/sizes.h to make code completely
arch independent.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 drivers/mtd/nand/raw/orion_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c
index 1a4828442675..27cc902545f3 100644
--- a/drivers/mtd/nand/raw/orion_nand.c
+++ b/drivers/mtd/nand/raw/orion_nand.c
@@ -18,7 +18,7 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
-#include <asm/sizes.h>
+#include <linux/sizes.h>
 #include <linux/platform_data/mtd-orion_nand.h>
 
 struct orion_nand_info {
-- 
2.14.1

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

* [PATCH v3 3/4] mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not defined
  2018-07-18  8:56 [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Boris Brezillon
  2018-07-18  8:56 ` [PATCH v3 1/4] mtd: rawnand: s3c2410: Allow selection of this driver when COMPILE_TEST=y Boris Brezillon
  2018-07-18  8:56 ` [PATCH v3 2/4] mtd: rawnand: orion: Avoid direct inclusion of asm headers Boris Brezillon
@ 2018-07-18  8:56 ` Boris Brezillon
  2018-07-18  8:56 ` [PATCH v3 4/4] mtd: rawnand: orion: Allow selection of this driver when COMPILE_TEST=y Boris Brezillon
  2018-07-18 21:40 ` [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Miquel Raynal
  4 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-07-18  8:56 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Arnd Bergmann

Make sure __LINUX_ARM_ARCH__ is defined before testing its value.
This is needed if we want to allow selection of this driver when
COMPILE_TEST=y.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 drivers/mtd/nand/raw/orion_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c
index 27cc902545f3..52d435285a3f 100644
--- a/drivers/mtd/nand/raw/orion_nand.c
+++ b/drivers/mtd/nand/raw/orion_nand.c
@@ -52,7 +52,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
 {
 	struct nand_chip *chip = mtd_to_nand(mtd);
 	void __iomem *io_base = chip->IO_ADDR_R;
-#if __LINUX_ARM_ARCH__ >= 5
+#if defined(__LINUX_ARM_ARCH__) && __LINUX_ARM_ARCH__ >= 5
 	uint64_t *buf64;
 #endif
 	int i = 0;
@@ -61,7 +61,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
 		*buf++ = readb(io_base);
 		len--;
 	}
-#if __LINUX_ARM_ARCH__ >= 5
+#if defined(__LINUX_ARM_ARCH__) && __LINUX_ARM_ARCH__ >= 5
 	buf64 = (uint64_t *)buf;
 	while (i < len/8) {
 		/*
-- 
2.14.1

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

* [PATCH v3 4/4] mtd: rawnand: orion: Allow selection of this driver when COMPILE_TEST=y
  2018-07-18  8:56 [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Boris Brezillon
                   ` (2 preceding siblings ...)
  2018-07-18  8:56 ` [PATCH v3 3/4] mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not defined Boris Brezillon
@ 2018-07-18  8:56 ` Boris Brezillon
  2018-07-18 21:40 ` [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Miquel Raynal
  4 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-07-18  8:56 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Arnd Bergmann

It just makes NAND maintainers' life easier by allowing them to
compile-test this driver without having PLAT_ORION enabled.

We add a dependency on HAS_IOMEM to make sure the driver compiles
correctly.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 drivers/mtd/nand/raw/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 03314ab8cd4d..f944cf0d1017 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -382,7 +382,8 @@ config MTD_NAND_PLATFORM
 
 config MTD_NAND_ORION
 	tristate "NAND Flash support for Marvell Orion SoC"
-	depends on PLAT_ORION
+	depends on PLAT_ORION || COMPILE_TEST
+	depends on HAS_IOMEM
 	help
 	  This enables the NAND flash controller on Orion machines.
 
-- 
2.14.1

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

* Re: [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage
  2018-07-18  8:56 [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Boris Brezillon
                   ` (3 preceding siblings ...)
  2018-07-18  8:56 ` [PATCH v3 4/4] mtd: rawnand: orion: Allow selection of this driver when COMPILE_TEST=y Boris Brezillon
@ 2018-07-18 21:40 ` Miquel Raynal
  2018-08-01  8:35   ` Miquel Raynal
  4 siblings, 1 reply; 7+ messages in thread
From: Miquel Raynal @ 2018-07-18 21:40 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Richard Weinberger, linux-mtd, David Woodhouse, Brian Norris,
	Marek Vasut, Arnd Bergmann

Hi Boris,

Boris Brezillon <boris.brezillon@bootlin.com> wrote on Wed, 18 Jul 2018
10:56:48 +0200:

> Hello,
> 
> This is an attempt at adding "depends || COMPILE_TEST" to all NAND
> drivers that have no compile-time dependencies on arch
> features/headers.
> 
> This will hopefully help us (NAND/MTD maintainers) in detecting build
> issues earlier. Unfortunately we still have a few drivers that can't
> easily be modified to be arch independent.
> 
> Regards,
> 
> Boris
> 
> Changes in v2:
> - Fix a few problems reported by kbuild robots and Stephen Rothwell
> 
> Changes in v3:
> - Drop depends on !IA64 since Arnd has added {read,write}s{b,w,l}()
>   accessors to this arch
> - Make sure the orion driver compiles when __LINUX_ARM_ARCH__ is not
>   defined
> 
> Boris Brezillon (4):
>   mtd: rawnand: s3c2410: Allow selection of this driver when
>     COMPILE_TEST=y
>   mtd: rawnand: orion: Avoid direct inclusion of asm headers
>   mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not
>     defined
>   mtd: rawnand: orion: Allow selection of this driver when
>     COMPILE_TEST=y
> 
>  drivers/mtd/nand/raw/Kconfig      | 6 ++++--
>  drivers/mtd/nand/raw/orion_nand.c | 6 +++---
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 

Series applied to nand/next, thanks for this work that will speed up
our local tests.

Miquèl

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

* Re: [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage
  2018-07-18 21:40 ` [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Miquel Raynal
@ 2018-08-01  8:35   ` Miquel Raynal
  0 siblings, 0 replies; 7+ messages in thread
From: Miquel Raynal @ 2018-08-01  8:35 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Richard Weinberger, linux-mtd, David Woodhouse, Brian Norris,
	Marek Vasut, Arnd Bergmann

Hello,

Miquel Raynal <miquel.raynal@bootlin.com> wrote on Wed, 18 Jul 2018
23:40:10 +0200:

> Hi Boris,
> 
> Boris Brezillon <boris.brezillon@bootlin.com> wrote on Wed, 18 Jul 2018
> 10:56:48 +0200:
> 
> > Hello,
> > 
> > This is an attempt at adding "depends || COMPILE_TEST" to all NAND
> > drivers that have no compile-time dependencies on arch
> > features/headers.
> > 
> > This will hopefully help us (NAND/MTD maintainers) in detecting build
> > issues earlier. Unfortunately we still have a few drivers that can't
> > easily be modified to be arch independent.
> > 
> > Regards,
> > 
> > Boris
> > 
> > Changes in v2:
> > - Fix a few problems reported by kbuild robots and Stephen Rothwell
> > 
> > Changes in v3:
> > - Drop depends on !IA64 since Arnd has added {read,write}s{b,w,l}()
> >   accessors to this arch
> > - Make sure the orion driver compiles when __LINUX_ARM_ARCH__ is not
> >   defined
> > 
> > Boris Brezillon (4):
> >   mtd: rawnand: s3c2410: Allow selection of this driver when
> >     COMPILE_TEST=y
> >   mtd: rawnand: orion: Avoid direct inclusion of asm headers
> >   mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not
> >     defined
> >   mtd: rawnand: orion: Allow selection of this driver when
> >     COMPILE_TEST=y
> > 
> >  drivers/mtd/nand/raw/Kconfig      | 6 ++++--
> >  drivers/mtd/nand/raw/orion_nand.c | 6 +++---
> >  2 files changed, 7 insertions(+), 5 deletions(-)
> >   
> 
> Series applied to nand/next, thanks for this work that will speed up
> our local tests.

As we received build robots complaints about both orion and s3c
drivers, I removed both patches to avoid build issues:

mtd: rawnand: s3c2410: Allow selection of this driver when COMPILE_TEST=y
mtd: rawnand: orion: Allow selection of this driver when COMPILE_TEST=y

Let's fix the issues and include them in the next release.

Thanks,
Miquèl

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

end of thread, other threads:[~2018-08-01  8:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18  8:56 [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Boris Brezillon
2018-07-18  8:56 ` [PATCH v3 1/4] mtd: rawnand: s3c2410: Allow selection of this driver when COMPILE_TEST=y Boris Brezillon
2018-07-18  8:56 ` [PATCH v3 2/4] mtd: rawnand: orion: Avoid direct inclusion of asm headers Boris Brezillon
2018-07-18  8:56 ` [PATCH v3 3/4] mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not defined Boris Brezillon
2018-07-18  8:56 ` [PATCH v3 4/4] mtd: rawnand: orion: Allow selection of this driver when COMPILE_TEST=y Boris Brezillon
2018-07-18 21:40 ` [PATCH v3 0/4] mtd: rawnand: Improve compile-test coverage Miquel Raynal
2018-08-01  8:35   ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.