[PATCH 1/1] part: eliminate part_get_info_by_name_type()
Simon Glass
sjg at chromium.org
Wed Jul 19 03:08:48 CEST 2023
Hi Heinrich,
On Sun, 16 Jul 2023 at 05:34, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Since commit 56670d6fb83f ("disk: part: use common api to lookup part
> driver") part_get_info_by_name_type() ignores the part_type parameter
> used to restrict the partition table type.
>
> omap_mmc_get_part_size() and part_get_info_by_name() are the only
> consumers.
>
> omap_mmc_get_part_size() calls with part_type = PART_TYPE_EFI because at
> the time of implementation a speed up could be gained by passing the
> partition table type. After 5 years experience without this restriction
> it looks safe to keep it that way.
>
> part_get_info_by_name() uses PART_TYPE_ALL.
>
> Move the logic of part_get_info_by_name_type() to part_get_info_by_name()
> and replace the function in omap_mmc_get_part_size().
>
> Fixes: 56670d6fb83f ("disk: part: use common api to lookup part driver")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> arch/arm/mach-omap2/utils.c | 3 +--
> disk/part.c | 10 ++--------
> include/part.h | 23 -----------------------
> 3 files changed, 3 insertions(+), 33 deletions(-)
That explains the strange behaviour I saw when fiddling with this a
month or so back, thanks.
Reviewed-by: Simon Glass <sjg at chromium.org>
Is there a test to update for this?
Regards,
Simon
More information about the U-Boot
mailing list