diff options
author | Pankaj Bansal <pankaj.bansal@nxp.com> | 2019-10-31 05:41:09 +0000 |
---|---|---|
committer | Priyanka Jain <priyanka.jain@nxp.com> | 2019-11-08 15:50:12 +0530 |
commit | 812ff53c3e0f100aabb45eaea9b71086d00bed66 (patch) | |
tree | e3046c35ea6dd428da99755a720729364dccac31 /arch/arm/cpu/armv8/fsl-layerscape/cpu.c | |
parent | 29a6617ada631c1f86512028218491e3c15500cc (diff) |
fsl-layerscape: fix warning if no hwconfig is defined
While getting the 'subarg' of 'hwconfig' env variable in
config_core_prefetch(), if no hwconfig variable is defined,
below warning is received:
WARNING: Calling __hwconfig without a buffer and
before environment is ready
Fix this by checking 'hwconfig' env variable.
If not found return without further processing.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Tested-by: Michael Walle <michael@walle.cc>
Diffstat (limited to 'arch/arm/cpu/armv8/fsl-layerscape/cpu.c')
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 1f4c0b29a3..83a3319321 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); |