[PATCH 1/1] part: eliminate part_get_info_by_name_type()
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Wed Jul 19 04:17:23 CEST 2023
On 7/19/23 03:08, Simon Glass wrote:
> 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?
Thanks for reviewing.
As we don't change any existing behavior there is no test to update.
Best regards
Heinrich
More information about the U-Boot
mailing list