[U-Boot] [PATCH] armv8: fsl-layerscape: fix warning if no hwconfig is defined
Pankaj Bansal
pankaj.bansal at nxp.com
Thu Oct 31 05:34:11 UTC 2019
if no hwconfig variable is defined for a platform and we try to get the
subarg of hwconfig, we receive a warning:
WARNING: Calling __hwconfig without a buffer and before environment is ready
Therefore, if hwconfig is not found return without further processing.
Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
---
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index dee96afe2d..46e4b290ad 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -1065,6 +1065,8 @@ static void config_core_prefetch(void)
if (env_get_f("hwconfig", buffer, sizeof(buffer)) > 0)
buf = buffer;
+ else
+ return;
prefetch_arg = hwconfig_subarg_f("core_prefetch", "disable",
&arglen, buf);
--
2.17.1
More information about the U-Boot
mailing list