mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select
Subsystems (2)
PATCH 1/2 mtd: nand: Kconfig: correct the MTD_NAND_ECC_SW_BCH select
Config fragments should not have the prefix 'CONFIG_'.
Rework to remove the prefix 'CONFIG_' from 'CONFIG_MTD_NAND_ECC_SW_BCH'.
--- drivers/mtd/devices/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/devices/Kconfig +1 -1
@@ -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
Signature · 1 line
2.20.1
PATCH 2/2 mtd: nand: raw: fix build dependency
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.
--- drivers/mtd/nand/raw/Kconfig | 2 +- drivers/mtd/nand/raw/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/raw/Kconfig +1 -1
@@ -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
drivers/mtd/nand/raw/Makefile +1 -1
@@ -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
Signature · 1 line
2.20.1
Miquel Raynal
maintainerHi Anders,
Anders Roxell <[email protected]> wrote on Wed, 10 Apr 2019 21:58:51 +0200:
Quoted 7 lines
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 <[email protected]>---
Thanks for both patches, do you mind if I squash these with the faulty commits which are still in nand/next?
Thanks,
Miquèl
Quoted 8 lines · Miquel Raynal
Hi Anders,
Anders Roxell <[email protected]> wrote on Wed, 10 Apr 2019 21:58:51 +0200:
Quoted 2 lines
Config fragments should not have the prefix '
CONFIG_'.
Quoted 8 lines
Quoted 5 lines
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 <[email protected]>---
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
Miquel Raynal
maintainerHi Anders,
Anders Roxell <[email protected]> wrote on Thu, 18 Apr 2019 06:39:06 +0200:
Quoted 15 lines · Miquel Raynal
Quoted 14 lines
Hi Anders,
Anders Roxell <[email protected]> wrote on Wed, 10 Apr 2019 21:58:51 +0200:
Quoted 7 lines
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 <[email protected]>---
Quoted 7 lines
Quoted 2 lines
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