LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the nand tree
Date: Tue, 02 Apr 2019 14:00:14 +0200	[thread overview]
Message-ID: <1554206414.1199.0@crapouillou.net> (raw)
In-Reply-To: <20190402135631.38dcfe2a@xps13>

Hi Miquel,

Le mar. 2 avril 2019 à 13:56, Miquel Raynal 
<miquel.raynal@bootlin.com> a écrit :
> Hi Paul,
> 
> Paul Cercueil <paul@crapouillou.net> wrote on Tue, 02 Apr 2019 
> 01:31:52
> +0200:
> 
>>  Hi Stephen,
>> 
>>  Le mar. 2 avril 2019 à 1:14, Stephen Rothwell 
>> <sfr@canb.auug.org.au> a écrit :
>>  > 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.
>> 
>>  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.

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

> 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

> ---8<---
> diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h 
> b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h
> index d0486f963cc9..2cda439b5e11 100644
> --- a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h
> +++ b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h
> @@ -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
> 



  reply	other threads:[~2019-04-02 12:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 23:14 linux-next: build failure after merge of the nand tree Stephen Rothwell
2019-04-01 23:31 ` Paul Cercueil
2019-04-02  7:27   ` Miquel Raynal
2019-04-02  9:21     ` Miquel Raynal
2019-04-02 11:56   ` Miquel Raynal
2019-04-02 12:00     ` Paul Cercueil [this message]
2019-04-02 12:16       ` Miquel Raynal
2020-03-11  2:16 Stephen Rothwell
2020-03-11 10:10 ` Miquel Raynal
2020-03-11 14:01   ` Boris Brezillon
2020-03-11 19:20   ` Janusz Krzysztofik
2020-05-12  4:08 Stephen Rothwell
2020-05-12  7:04 ` Miquel Raynal
2020-05-25 10:45 Stephen Rothwell
2020-05-25 11:54 ` Miquel Raynal
2020-09-08  3:35 Stephen Rothwell
2020-09-10  4:12 ` Stephen Rothwell
2020-09-11 16:58   ` Miquel Raynal
2020-09-14  1:45 Stephen Rothwell
2020-09-14  9:50 ` Alex Dewar
2020-09-14 10:58   ` Miquel Raynal
2020-12-08  2:14 Stephen Rothwell
2022-09-21  1:32 Stephen Rothwell
2023-08-21  2:02 Stephen Rothwell
2023-08-21  5:44 ` Md Sadre Alam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554206414.1199.0@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=boris.brezillon@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).