[PATCH v3 1/3] disk: accessors for conditional partition fields
Simon Glass
sjg at chromium.org
Mon Feb 20 17:21:31 CET 2023
On Sun, 19 Feb 2023 at 04:36, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Structure disk_partition contains some fields whose existence depends on
> configuration variables. Provide macros that return a value irrespective of
> the value of configuration. This allows to replace #ifdefs by simple ifs
> in codes that relies on these fields which is our preferred coding style.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> v3:
> new patch
> ---
> include/part.h | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
Reviewed-by: Simon Glass <sjg at chromium.org>
But I do think static inlines are better
More information about the U-Boot
mailing list