[U-Boot] [PATCH v2] armv8: fsl-layerscape: fix warning if no hwconfig is defined

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@nxp.com ---
Notes: V2: - Add copyright year in file that has been updated
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 8fd6c751c6..b42beca6e1 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2017 NXP + * Copyright 2017, 2019 NXP * Copyright 2014-2015 Freescale Semiconductor, Inc. */
@@ -1072,6 +1072,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);

Am 2019-10-31 06:41, schrieb Pankaj Bansal:
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@nxp.com
Tested-by: Michael Walle michael@walle.cc

-----Original Message----- From: Pankaj Bansal pankaj.bansal@nxp.com Sent: Thursday, October 31, 2019 11:11 AM To: Priyanka Jain priyanka.jain@nxp.com Cc: u-boot@lists.denx.de; Pankaj Bansal pankaj.bansal@nxp.com Subject: [PATCH v2] armv8: fsl-layerscape: fix warning if no hwconfig is defined
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@nxp.com
Some updates done in subject, description and copyright year. Applied to fsl-qoriq master, awaiting upstream.
Thanks priyankajain
participants (3)
-
Michael Walle
-
Pankaj Bansal
-
Priyanka Jain