[U-Boot] [PATCH v2 14/32] dm: part: Convert partition API use to linker lists

Simon Glass sjg at chromium.org
Sun Mar 13 02:52:51 CET 2016


On 29 February 2016 at 15:25, Simon Glass <sjg at chromium.org> wrote:
> We can use linker lists instead of explicitly declaring each function.
> This makes the code shorter by avoiding switch() statements and lots of
> header file declarations.
>
> While this does clean up the code it introduces a few code issues with SPL.
> SPL never needs to print partition information since this all happens from
> commands. SPL mostly doesn't need to obtain information about a partition
> either, except in a few cases. Add these cases so that the code will be
> dropped from each partition driver when not needed. This avoids code bloat.
>
> I think this is still a win, since it is not a bad thing to be explicit
> about which features are used in SPL. But others may like to weigh in.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> ---
>
> Changes in v2:
> - Reorder the linker list so that EFI comes before DOS, and add a comment
>
>  disk/part.c       | 184 +++++++++++++++++-------------------------------------
>  disk/part_amiga.c |  16 +++--
>  disk/part_dos.c   |   9 ++-
>  disk/part_efi.c   |  15 ++++-
>  disk/part_iso.c   |  16 +++--
>  disk/part_mac.c   |  16 +++--
>  include/part.h    |  79 ++++++++++++++---------
>  7 files changed, 162 insertions(+), 173 deletions(-)

Applied to u-boot-dm/next.


More information about the U-Boot mailing list