Skip to contentSkip to conversation

linux-next: build failure after merge of the nand tree

DISCUSSION Stephen Rothwell 3 participants 7 messages Apr 1, 2019 – Apr 2, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:26:5: error: redefinition of 'ingenic_ecc_calculate'
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: note: previous definition of 'ingenic_ecc_calculate' was here
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:47:5: error: redefinition of 'ingenic_ecc_correct'
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: note: previous definition of 'ingenic_ecc_correct' was here
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:93:21: error: redefinition of 'of_ingenic_ecc_get'
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *of_node)
                     ^~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: note: previous definition of 'of_ingenic_ecc_get' was here
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
                     ^~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:119:6: error: redefinition of 'ingenic_ecc_release'
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: note: previous definition of 'ingenic_ecc_release' was here
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~

Caused by commit

8278ad0d709a ("mtd: rawnand: ingenic: Separate top-level and SoC specific code")

I have used the nand tree from next-20190401 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer
#1 lore raw

Hi Stephen,

Quoted 34 lines · Stephen Rothwell

Hi all,

After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:26:5: error: redefinition of 'ingenic_ecc_calculate'
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: note: previous definition of 'ingenic_ecc_calculate' was here
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:47:5: error: redefinition of 'ingenic_ecc_correct'
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: note: previous definition of 'ingenic_ecc_correct' was here
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:93:21: error: redefinition of 'of_ingenic_ecc_get'
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *of_node)
                     ^~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: note: previous definition of 'of_ingenic_ecc_get' was here
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
                     ^~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:119:6: error: redefinition of 'ingenic_ecc_release'
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: note: previous definition of 'ingenic_ecc_release' was here
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
Quoted 6 lines

Caused by commit

8278ad0d709a ("mtd: rawnand: ingenic: Separate top-level and SoC
specific code")

I have used the nand tree from next-20190401 for today.

That makes no sense to me; from the offsets of the errors in the ingenic_ecc.h file, it seems that CONFIG_MTD_NAND_INGENIC_ECC is not set, and in this case ingenic_ecc.c should not be compiled at all.

-Paul

maintainer
#2 lore raw

Hi Paul,

Paul Cercueil <[email protected]> wrote on Tue, 02 Apr 2019 01:31:52 +0200:

Quoted 41 lines

Hi Stephen,

Quoted 38 lines · Stephen Rothwell

Hi all,

After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:26:5: error: redefinition > of 'ingenic_ecc_calculate'
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: note: previous > definition of 'ingenic_ecc_calculate' was here
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:47:5: error: redefinition > of 'ingenic_ecc_correct'
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: note: previous > definition of 'ingenic_ecc_correct' was here
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:93:21: error: redefinition > of 'of_ingenic_ecc_get'
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *of_node)
                     ^~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: note: previous > definition of 'of_ingenic_ecc_get' was here
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
                     ^~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:119:6: error: redefinition > of 'ingenic_ecc_release'
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: note: previous > definition of 'ingenic_ecc_release' was here
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~

Caused by commit

8278ad0d709a ("mtd: rawnand: ingenic: Separate top-level and SoC > specific code")

Quoted 9 lines
Quoted 1 line

I have used the nand tree from next-20190401 for today.

That makes no sense to me; from the offsets of the errors in the ingenic_ecc.h file, it seems that CONFIG_MTD_NAND_INGENIC_ECC is not set, and in this case ingenic_ecc.c should not be compiled at all.

-Paul

There must be a mistmatch somewhere in Kconfig, please reproduce with allmodconfig on x86_64, I don't have time to check on this today. Otherwise I'll have to drop the patchset :/

Thanks,
Miquèl

maintainer
#3 lore raw

Hi Paul,

Miquel Raynal <[email protected]> wrote on Tue, 2 Apr 2019 09:27:47 +0200:

Quoted 52 lines

Hi Paul,

Paul Cercueil <[email protected]> wrote on Tue, 02 Apr 2019 01:31:52 +0200:

Quoted 47 lines

Hi Stephen,

Quoted 34 lines · Stephen Rothwell

Hi all,

After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:26:5: error: redefinition > of 'ingenic_ecc_calculate'
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: note: previous > definition of 'ingenic_ecc_calculate' was here
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:47:5: error: redefinition > of 'ingenic_ecc_correct'
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: note: previous > definition of 'ingenic_ecc_correct' was here
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:93:21: error: redefinition > of 'of_ingenic_ecc_get'
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *of_node)
                     ^~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: note: previous > definition of 'of_ingenic_ecc_get' was here
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
                     ^~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:119:6: error: redefinition > of 'ingenic_ecc_release'
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: note: previous > definition of 'ingenic_ecc_release' was here
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
Quoted 5 lines

Caused by commit

8278ad0d709a ("mtd: rawnand: ingenic: Separate top-level and SoC > specific code")

I have used the nand tree from next-20190401 for today.

That makes no sense to me; from the offsets of the errors in the ingenic_ecc.h file, it seems that CONFIG_MTD_NAND_INGENIC_ECC is not set, and in this case ingenic_ecc.c should not be compiled at all.

Quoted 7 lines
Quoted 3 lines

-Paul

There must be a mistmatch somewhere in Kconfig, please reproduce with allmodconfig on x86_64, I don't have time to check on this today. Otherwise I'll have to drop the patchset :/

I wonder if the root cause comes from another patchset (mine, actually) which I applied on top of your work. Maybe there is a conflict there. I am looking into it.

Thanks,
Miquèl

maintainer
#4 lore raw
In reply to Paul Cercueil

Hi Paul,

Paul Cercueil <[email protected]> wrote on Tue, 02 Apr 2019 01:31:52 +0200:

Quoted 39 lines

Hi Stephen,

Quoted 36 lines · Stephen Rothwell

Hi all,

After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:26:5: error: redefinition > of 'ingenic_ecc_calculate'
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: note: previous > definition of 'ingenic_ecc_calculate' was here
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:47:5: error: redefinition > of 'ingenic_ecc_correct'
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: note: previous > definition of 'ingenic_ecc_correct' was here
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:93:21: error: redefinition > of 'of_ingenic_ecc_get'
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *of_node)
                     ^~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: note: previous > definition of 'of_ingenic_ecc_get' was here
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
                     ^~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:119:6: error: redefinition > of 'ingenic_ecc_release'
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: note: previous > definition of 'ingenic_ecc_release' was here
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~

Caused by commit

Quoted 8 lines
Quoted 3 lines

8278ad0d709a ("mtd: rawnand: ingenic: Separate top-level and SoC > specific code")

I have used the nand tree from next-20190401 for today.

That makes no sense to me; from the offsets of the errors in the ingenic_ecc.h file, it seems that CONFIG_MTD_NAND_INGENIC_ECC is not set, and in this case ingenic_ecc.c should not be compiled at all.

I think

        #ifdef FOO

evaluates to true if

FOO=y

while we can have

FOO=m

which is evaluated to false, hence the double definition with allmodconfig.

Here is a diff solving the issue, if you are fine with it I will correct in-place and push -f nand/next for tomorrow's build.

---8<---

drivers/mtd/nand/raw/ingenic/ingenic_ecc.h +1 -1
index d0486f963cc9..2cda439b5e11 100644
@@ -25,7 +25,7 @@ struct ingenic_ecc_params {
        int strength;
 };
 
-#ifdef CONFIG_MTD_NAND_INGENIC_ECC
+#if IS_ENABLED(CONFIG_MTD_NAND_INGENIC_ECC)
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
                          struct ingenic_ecc_params *params,
                          const u8 *buf, u8 *ecc_code);

--->8---

Thanks,
Miquèl

maintainer
#5 lore raw

Hi Miquel,

Quoted 76 lines · Miquel Raynal

Hi Paul,

Paul Cercueil <[email protected]> wrote on Tue, 02 Apr 2019 01:31:52 +0200:

Quoted 56 lines

Hi Stephen,

Quoted 6 lines · Stephen Rothwell

Hi all,

After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:26:5: error:

redefinition > of 'ingenic_ecc_calculate'

Quoted 3 lines

int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~

In file included from

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:

Quoted 1 line

drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: note: previous >

definition of 'ingenic_ecc_calculate' was here

Quoted 3 lines

int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:47:5: error:

redefinition > of 'ingenic_ecc_correct'

Quoted 3 lines

int ingenic_ecc_correct(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~

In file included from

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:

Quoted 1 line

drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: note: previous >

definition of 'ingenic_ecc_correct' was here

Quoted 3 lines

int ingenic_ecc_correct(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:93:21: error:

redefinition > of 'of_ingenic_ecc_get'

Quoted 1 line

struct ingenic_ecc *of_ingenic_ecc_get(struct device_node

*of_node)

Quoted 2 lines
                     ^~~~~~~~~~~~~~~~~~

In file included from

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:

Quoted 5 lines

drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: note: previous definition of 'of_ingenic_ecc_get' was here
struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)

                     ^~~~~~~~~~~~~~~~~~

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:119:6: error:

redefinition > of 'ingenic_ecc_release'

Quoted 3 lines

void ingenic_ecc_release(struct ingenic_ecc *ecc)

      ^~~~~~~~~~~~~~~~~~~

In file included from

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:

Quoted 1 line

drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: note: previous >

definition of 'ingenic_ecc_release' was here

Quoted 6 lines

void ingenic_ecc_release(struct ingenic_ecc *ecc)

      ^~~~~~~~~~~~~~~~~~~

Caused by commit

8278ad0d709a ("mtd: rawnand: ingenic: Separate top-level and

SoC > specific code")

Quoted 1 line
Quoted 8 lines
Quoted 1 line

I have used the nand tree from next-20190401 for today.

That makes no sense to me; from the offsets of the errors in the
ingenic_ecc.h
file, it seems that CONFIG_MTD_NAND_INGENIC_ECC is not set, and in
this case
ingenic_ecc.c should not be compiled at all.

I think

        #ifdef FOO

evaluates to true if

Quoted 8 lines

FOO=y

while we can have

FOO=m

which is evaluated to false, hence the double definition with allmodconfig.

That's good to know, I guess I'll have to start using IS_DEFINED() from now on.

Quoted 2 lines

Here is a diff solving the issue, if you are fine with it I will correct in-place and push -f nand/next for tomorrow's build.

That would be great.

Thanks!
-Paul

Quoted 20 lines

---8<---

drivers/mtd/nand/raw/ingenic/ingenic_ecc.h +1 -2
index d0486f963cc9..2cda439b5e11 100644
@@ -25,7 +25,7 @@ struct ingenic_ecc_params {
        int strength;
 };
 
-#ifdef CONFIG_MTD_NAND_INGENIC_ECC
+#if IS_ENABLED(CONFIG_MTD_NAND_INGENIC_ECC)
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
                          struct ingenic_ecc_params *params,
                          const u8 *buf, u8 *ecc_code);
--->8---

Thanks,
Miquèl

maintainer
#6 lore raw

Hi Paul,

Paul Cercueil <[email protected]> wrote on Tue, 02 Apr 2019 14:00:14 +0200:

Quoted 67 lines

Hi Miquel,

Quoted 55 lines · Miquel Raynal

Hi Paul,

Paul Cercueil <[email protected]> wrote on Tue, 02 Apr 2019 > 01:31:52 +0200:

Quoted 36 lines

Hi Stephen,

Quoted 35 lines
Quoted 1 line · Le mar. 2 avril 2019 à 1:14, Stephen Rothwell >> <[email protected]> a…

Hi all,

After merging the nand tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:26:5: error: >> redefinition > of 'ingenic_ecc_calculate'
int ingenic_ecc_calculate(struct ingenic_ecc *ecc,

     ^~~~~~~~~~~~~~~~~~~~~
In file included from >> drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: note: previous > >> definition of 'ingenic_ecc_calculate' was here
 int ingenic_ecc_calculate(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:47:5: error: >> redefinition > of 'ingenic_ecc_correct'
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
In file included from >> drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: note: previous > >> definition of 'ingenic_ecc_correct' was here
 int ingenic_ecc_correct(struct ingenic_ecc *ecc,
     ^~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:93:21: error: >> redefinition > of 'of_ingenic_ecc_get'
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node >> *of_node)
                     ^~~~~~~~~~~~~~~~~~
In file included from >> drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: note: previous >> > definition of 'of_ingenic_ecc_get' was here
 struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np)
                     ^~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:119:6: error: >> redefinition > of 'ingenic_ecc_release'
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
In file included from >> drivers/mtd/nand/raw/ingenic/ingenic_ecc.c:14:
drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: note: previous > >> definition of 'ingenic_ecc_release' was here
 void ingenic_ecc_release(struct ingenic_ecc *ecc)
      ^~~~~~~~~~~~~~~~~~~
Quoted 9 lines
Quoted 6 lines

Caused by commit

8278ad0d709a ("mtd: rawnand: ingenic: Separate top-level and >> SoC > specific code")

I have used the nand tree from next-20190401 for today.

Quoted 1 line

That makes no sense to me; from the offsets of the errors in the >> ingenic_ecc.h

file, it seems that CONFIG_MTD_NAND_INGENIC_ECC is not set, and in >> this case ingenic_ecc.c should not be compiled at all.

Quoted 1 line
Quoted 1 line

I think

        #ifdef FOO

evaluates to true if

Quoted 8 lines

FOO=y

while we can have

FOO=m

which is evaluated to false, hence the double definition with allmodconfig.

Quoted 7 lines

That's good to know, I guess I'll have to start using IS_DEFINED() from now on.

Quoted 2 lines

Here is a diff solving the issue, if you are fine with it I will correct in-place and push -f nand/next for tomorrow's build.

That would be great.

Done. I also pushed on 0-day, hope I'll have the notification before tonight.

Thanks,
Miquèl