[PATCH v3 01/19] spl: mmc: Avoid size growth in spl_mmc_find_device() debug
Jaehoon Chung
jh80.chung at samsung.com
Mon Dec 9 00:56:23 CET 2024
> -----Original Message-----
> From: Simon Glass <sjg at chromium.org>
> Sent: Sunday, December 8, 2024 2:24 AM
> The for() loop ends up being in the code even if the log_debug() does
> nothing. Add a condition to fix this.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>
Best Regards,
Jaehoon Chung
> ---
>
> Changes in v3:
> - Add new patch to avoid size growth in spl_mmc_find_device() debug
>
> common/spl/spl_mmc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> index 1f696593216..fe4230170a0 100644
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -81,8 +81,10 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev)
> struct uclass *uc;
>
> log_debug("Selecting MMC dev %d; seqs:\n", mmc_dev);
> - uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
> - log_debug("%d: %s\n", dev_seq(dev), dev->name);
> + if (_LOG_DEBUG) {
> + uclass_id_foreach_dev(UCLASS_MMC, dev, uc)
> + log_debug("%d: %s\n", dev_seq(dev), dev->name);
> + }
> ret = mmc_init_device(mmc_dev);
> #else
> ret = mmc_initialize(NULL);
> --
> 2.34.1
More information about the U-Boot
mailing list