From: Boris Brezillon <boris.brezillon@collabora.com>
To: Victor Fusco <victor@cartesi.io>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Possible regression regarding the name and size of MTD devices on kernel 5.5.4
Date: Wed, 11 Mar 2020 21:31:20 +0100 [thread overview]
Message-ID: <20200311213120.0141aec0@collabora.com> (raw)
In-Reply-To: <CAHpUXUx8puujULLTtLTDEvEVG+gasJcmj9QxLC5vf69+WzL74g@mail.gmail.com>
Hi Victor,
On Wed, 11 Mar 2020 16:58:31 -0300
Victor Fusco <victor@cartesi.io> wrote:
>
> Searching into the git history I've found two changes that seems to have
> introduced this new behavior:
>
> 1. The merge of physmap_of.c into physmap-core.c made it stop checking the
> mtd_name
>
> https://github.com/torvalds/linux/commit/642b1e8dbed7bbbf8c4deb3c9a0496f17278badc#diff-25f9c3817991d18e6c24935d91953344L223
>
> The original implementation was:
>
> drivers/mtd/maps/physmap_of_core.c:223
> ----------
> info->list[i].map.name = mtd_name ?: dev_name(&dev->dev);
> ----------
>
> And the new one:
>
> drivers/mtd/maps/physmap-core.c:237
> ----------
> info->maps[i].name = dev_name(&dev->dev);
> ----------
>
> 2. The merge gpio-addr-flash.c into physmap-core.c made it calculate the size
> differently. Not sure if the new implementation is accurate when there is no
> gpio.
>
> https://github.com/torvalds/linux/commit/ba32ce95cbd9876eb7f5ec39af87829c8f13a337#diff-82fc46753342e94dc0772828e76af427L372
>
> The original implementation was:
>
> drivers/mtd/maps/physmap-core.c:372
> ----------
> info->maps[i].size = resource_size(res);
> ----------
>
> And the new one:
>
> drivers/mtd/maps/physmap-core.c:507
> ----------
> info->win_order = get_bitmask_order(resource_size(res)) - 1;
> info->maps[i].size = BIT(info->win_order +
> (info->gpios ?
> info->gpios->ndescs : 0));
> ----------
Looks like 2 regressions, indeed. Would you mind sending 2 fixes for
that?
Thanks,
Boris
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-03-11 20:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 19:58 Possible regression regarding the name and size of MTD devices on kernel 5.5.4 Victor Fusco
2020-03-11 20:31 ` Boris Brezillon [this message]
2020-03-11 21:00 ` Victor Fusco
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=20200311213120.0141aec0@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=linux-mtd@lists.infradead.org \
--cc=victor@cartesi.io \
/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