linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select
@ 2019-04-10 19:58 Anders Roxell
  2019-04-10 19:58 ` [PATCH 2/2] mtd: nand: raw: fix build dependency Anders Roxell
  2019-04-16 21:53 ` [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Miquel Raynal
  0 siblings, 2 replies; 5+ messages in thread
From: Anders Roxell @ 2019-04-10 19:58 UTC (permalink / raw)
  To: dwmw2, computersforpeace, bbrezillon, marek.vasut, richard
  Cc: Anders Roxell, linux-mtd, linux-kernel

Config fragments should not have the prefix 'CONFIG_'.

Rework to remove the prefix 'CONFIG_' from 'CONFIG_MTD_NAND_ECC_SW_BCH'.

Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/mtd/devices/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 7fcdaf6c279d..f9258d666846 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -207,7 +207,7 @@ comment "Disk-On-Chip Device Drivers"
 config MTD_DOCG3
 	tristate "M-Systems Disk-On-Chip G3"
 	select BCH
-	select BCH_CONST_PARAMS if !CONFIG_MTD_NAND_ECC_SW_BCH
+	select BCH_CONST_PARAMS if !MTD_NAND_ECC_SW_BCH
 	select BITREVERSE
 	help
 	  This provides an MTD device driver for the M-Systems DiskOnChip
-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [PATCH 2/2] mtd: nand: raw: fix build dependency
  2019-04-10 19:58 [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Anders Roxell
@ 2019-04-10 19:58 ` Anders Roxell
  2019-04-16 21:53 ` [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Miquel Raynal
  1 sibling, 0 replies; 5+ messages in thread
From: Anders Roxell @ 2019-04-10 19:58 UTC (permalink / raw)
  To: dwmw2, computersforpeace, bbrezillon, marek.vasut, richard
  Cc: Anders Roxell, linux-mtd, linux-kernel

When enable CONFIG_MTD_NAND_ECC_SW_BCH as a module, the
MTD_NAND_ECC_SW_BCH depends on MTD_NAND, but the module controlled by
MTD_NAND links against the module controlled by MTD_NAND_ECC_SW_BCH.
This leads to the following link failure.

aarch64-linux-gnu-ld: drivers/mtd/nand/raw/nand_base.o: in function `nand_cleanup':
../drivers/mtd/nand/raw/nand_base.c:5886: undefined reference to `nand_bch_free'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5886:(.text+0x9928): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nand_bch_free'
aarch64-linux-gnu-ld: drivers/mtd/nand/raw/nand_base.o: in function `nand_set_ecc_soft_ops':
../drivers/mtd/nand/raw/nand_base.c:5093: undefined reference to `nand_bch_calculate_ecc'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5093:(.text+0xe914): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `nand_bch_calculate_ecc'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5093: undefined reference to `nand_bch_calculate_ecc'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5094: undefined reference to `nand_bch_correct_data'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5094:(.text+0xe934): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `nand_bch_correct_data'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5094: undefined reference to `nand_bch_correct_data'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5148: undefined reference to `nand_bch_init'
aarch64-linux-gnu-ld: ../drivers/mtd/nand/raw/nand_base.c:5148:(.text+0xebbc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nand_bch_init'

Rework CONFIG_MTD_NAND_ECC_SW_BCH from tristate to bool,
and then link the nand_bch.o file into nand.ko if its enabled.

Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/mtd/nand/raw/Kconfig  | 2 +-
 drivers/mtd/nand/raw/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 615d738be411..0500c42f31cb 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -22,7 +22,7 @@ menuconfig MTD_RAW_NAND
 if MTD_RAW_NAND
 
 config MTD_NAND_ECC_SW_BCH
-	tristate "Support software BCH ECC"
+	bool "Support software BCH ECC"
 	select BCH
 	default n
 	help
diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile
index 8bc6faaa3bc7..efaf5cd25edc 100644
--- a/drivers/mtd/nand/raw/Makefile
+++ b/drivers/mtd/nand/raw/Makefile
@@ -2,7 +2,7 @@
 
 obj-$(CONFIG_MTD_RAW_NAND)		+= nand.o
 obj-$(CONFIG_MTD_NAND_ECC_SW_HAMMING)	+= nand_ecc.o
-obj-$(CONFIG_MTD_NAND_ECC_SW_BCH)	+= nand_bch.o
+nand-$(CONFIG_MTD_NAND_ECC_SW_BCH)	+= nand_bch.o
 obj-$(CONFIG_MTD_SM_COMMON) 		+= sm_common.o
 
 obj-$(CONFIG_MTD_NAND_CAFE)		+= cafe_nand.o
-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select
  2019-04-10 19:58 [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Anders Roxell
  2019-04-10 19:58 ` [PATCH 2/2] mtd: nand: raw: fix build dependency Anders Roxell
@ 2019-04-16 21:53 ` Miquel Raynal
  2019-04-18  4:39   ` Anders Roxell
  1 sibling, 1 reply; 5+ messages in thread
From: Miquel Raynal @ 2019-04-16 21:53 UTC (permalink / raw)
  To: Anders Roxell
  Cc: bbrezillon, richard, linux-kernel, marek.vasut, linux-mtd,
	computersforpeace, dwmw2

Hi Anders,

Anders Roxell <anders.roxell@linaro.org> wrote on Wed, 10 Apr 2019
21:58:51 +0200:

> Config fragments should not have the prefix 'CONFIG_'.
> 
> Rework to remove the prefix 'CONFIG_' from 'CONFIG_MTD_NAND_ECC_SW_BCH'.
> 
> Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---

Thanks for both patches, do you mind if I squash these with the faulty
commits which are still in nand/next?

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select
  2019-04-16 21:53 ` [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Miquel Raynal
@ 2019-04-18  4:39   ` Anders Roxell
  2019-04-18 16:24     ` Miquel Raynal
  0 siblings, 1 reply; 5+ messages in thread
From: Anders Roxell @ 2019-04-18  4:39 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: bbrezillon, richard, Linux Kernel Mailing List, marek.vasut,
	linux-mtd, computersforpeace, dwmw2

On Tue, 16 Apr 2019 at 23:53, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Anders,
>
> Anders Roxell <anders.roxell@linaro.org> wrote on Wed, 10 Apr 2019
> 21:58:51 +0200:
>
> > Config fragments should not have the prefix 'CONFIG_'.
> >
> > Rework to remove the prefix 'CONFIG_' from 'CONFIG_MTD_NAND_ECC_SW_BCH'.
> >
> > Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm")
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> > ---
>
> Thanks for both patches, do you mind if I squash these with the faulty
> commits which are still in nand/next?

That is fine by me.

Cheers,
Anders

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select
  2019-04-18  4:39   ` Anders Roxell
@ 2019-04-18 16:24     ` Miquel Raynal
  0 siblings, 0 replies; 5+ messages in thread
From: Miquel Raynal @ 2019-04-18 16:24 UTC (permalink / raw)
  To: Anders Roxell
  Cc: bbrezillon, richard, Linux Kernel Mailing List, marek.vasut,
	linux-mtd, computersforpeace, dwmw2

Hi Anders,

Anders Roxell <anders.roxell@linaro.org> wrote on Thu, 18 Apr 2019
06:39:06 +0200:

> On Tue, 16 Apr 2019 at 23:53, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > Hi Anders,
> >
> > Anders Roxell <anders.roxell@linaro.org> wrote on Wed, 10 Apr 2019
> > 21:58:51 +0200:
> >  
> > > Config fragments should not have the prefix 'CONFIG_'.
> > >
> > > Rework to remove the prefix 'CONFIG_' from 'CONFIG_MTD_NAND_ECC_SW_BCH'.
> > >
> > > Fixes: 51ef1d0b2095 ("mtd: nand: Clarify Kconfig entry for software BCH ECC algorithm")
> > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> > > ---  
> >
> > Thanks for both patches, do you mind if I squash these with the faulty
> > commits which are still in nand/next?  
> 
> That is fine by me.
> 
> Cheers,
> Anders


Thanks, I squashed this one and applied the second one.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2019-04-18 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10 19:58 [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Anders Roxell
2019-04-10 19:58 ` [PATCH 2/2] mtd: nand: raw: fix build dependency Anders Roxell
2019-04-16 21:53 ` [PATCH 1/2] mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select Miquel Raynal
2019-04-18  4:39   ` Anders Roxell
2019-04-18 16:24     ` Miquel Raynal

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).