From: Marek Behun <marek.behun@nic.cz>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: "Masami Hiramatsu" <masami.hiramatsu@linaro.org>,
"Simon Glass" <sjg@chromium.org>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Tom Rini" <trini@konsulko.com>,
U-Boot-Denx <u-boot@lists.denx.de>,
"Patrice Chotard" <patrice.chotard@foss.st.com>,
"Patrick Delaunay" <patrick.delaunay@st.com>,
"Heiko Schocher" <hs@denx.de>, "Pali Rohár" <pali@kernel.org>
Subject: Re: [PATCH RESEND u-boot-spi 0/8] Fix `mtd erase` when used with mtdpart
Date: Fri, 23 Jul 2021 03:18:46 +0200 [thread overview]
Message-ID: <20210723031846.2a342c22@thinkpad> (raw)
In-Reply-To: <CAMty3ZA4GsgPG84hOXXucjUosGQA117tSwwq9d2XQdDsrrDZqA@mail.gmail.com>
Hi Jagan,
On Wed, 21 Jul 2021 21:46:56 +0530
Jagan Teki <jagan@amarulasolutions.com> wrote:
> Found the build error with CI [1], would you please check?
>
> [1] https://source.denx.de/u-boot/custodians/u-boot-spi/-/pipelines/8345
>
> Jagan.
OK I think I've found out what is the problem. I've pushed new version
into github CI to check if it builds correctly.
The problem seems to be that after this series the function
spi_nor_erase() calls mtd_erase_callback(), which is declared in the
header file include/linux/mtd/mtd.h, if CONFIG_MTD_PARTITIONS is
enabled, and defined as a static inline function otherwise.
The problem is that for some boards we have CONFIG_MTD_PARTITIONS
together with CONFIG_SPL_SPI_FLASH_SUPPORT. But in SPL, mtdpart.c
(where mtd_erase_callback() is defined) is not compiled at all.
Thus this leads to undefined reference to mtd_erase_callback().
This is another proof that the whole mtd subsystem has become a gross
spaghetti code where hacks upon hacks were introduced by different
people to solve different purposes, and the result makes me angry. :-D
We really need to rewrite this.
Anyway, for now I will just send v2 of this series with another patch
fixing this issue, once CI ends smoothly.
Marek
prev parent reply other threads:[~2021-07-23 1:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 23:51 [PATCH RESEND u-boot-spi 0/8] Fix `mtd erase` when used with mtdpart Marek Behún
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 1/8] mtd: spi-nor-core: Try cleaning up in case writing BAR failed Marek Behún
2021-07-20 18:32 ` Simon Glass
2021-07-21 15:49 ` Jagan Teki
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 2/8] mtd: spi-nor-core: Check return value of write_enable() in spi_nor_erase() Marek Behún
2021-07-20 18:32 ` Simon Glass
2021-07-21 15:50 ` Jagan Teki
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 3/8] mtd: spi-nor-core: Don't overwrite return value if it is non-zero Marek Behún
2021-07-20 18:32 ` Simon Glass
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 4/8] mtd: spi-nor-core: Check return value of write_disable() in spi_nor_erase() Marek Behún
2021-07-20 18:32 ` Simon Glass
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 5/8] mtd: spi-nor-core: Don't check for zero length " Marek Behún
2021-07-20 18:32 ` Simon Glass
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 6/8] mtd: spi-nor-core: Call mtd_erase_callback() from spi_nor_erase() Marek Behún
2021-07-20 18:32 ` Simon Glass
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 7/8] mtd: spi-nor-core: Check for ctrlc() in spi_nor_erase() Marek Behún
2021-07-20 18:33 ` Simon Glass
2021-07-14 23:51 ` [PATCH RESEND u-boot-spi 8/8] mtd: mtdpart: Make mtdpart's _erase method sane Marek Behún
2021-07-20 18:33 ` Simon Glass
2021-07-20 18:33 ` [PATCH RESEND u-boot-spi 0/8] Fix `mtd erase` when used with mtdpart Simon Glass
2021-07-21 16:16 ` Jagan Teki
2021-07-22 20:44 ` Marek Behun
2021-07-22 22:14 ` Tom Rini
2021-07-23 1:18 ` Marek Behun [this message]
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=20210723031846.2a342c22@thinkpad \
--to=marek.behun@nic.cz \
--cc=hs@denx.de \
--cc=jagan@amarulasolutions.com \
--cc=masami.hiramatsu@linaro.org \
--cc=miquel.raynal@bootlin.com \
--cc=pali@kernel.org \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@st.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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