[PATCH] fastboot: remove #ifdef CONFIG when it is possible
Marek Vasut
marex at denx.de
Thu Dec 15 15:30:44 CET 2022
On 12/15/22 10:15, Patrick Delaunay wrote:
> Much of the fastboot code predates the introduction of Kconfig and
> has quite a few #ifdefs in it which is unnecessary now that we can use
> IS_ENABLED() et al.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
>
> cmd/fastboot.c | 35 +++++------
> drivers/fastboot/fb_command.c | 104 ++++++++++++--------------------
> drivers/fastboot/fb_common.c | 11 ++--
> drivers/fastboot/fb_getvar.c | 49 ++++++---------
> drivers/usb/gadget/f_fastboot.c | 7 +--
> include/fastboot.h | 13 ----
> net/fastboot.c | 8 +--
> 7 files changed, 82 insertions(+), 145 deletions(-)
>
> diff --git a/cmd/fastboot.c b/cmd/fastboot.c
> index b498e4b22bb3..b94dbd548843 100644
> --- a/cmd/fastboot.c
> +++ b/cmd/fastboot.c
> @@ -19,8 +19,14 @@
> static int do_fastboot_udp(int argc, char *const argv[],
> uintptr_t buf_addr, size_t buf_size)
> {
> -#if CONFIG_IS_ENABLED(UDP_FUNCTION_FASTBOOT)
Unrelated to this, don't we need to define Kconfig entries for 'config
SPL_UDP_FUNCTION_FASTBOOT' and 'config TPL_UDP_FUNCTION_FASTBOOT' and
the other macros tested in fastboot, so it would be correctly
configurable in SPL ?
More information about the U-Boot
mailing list