Commit 812ff53c3e0f100aabb45eaea9b71086d00bed66
Committed by
Priyanka Jain
1 parent
29a6617ada
Exists in
smarc_8mq_lf_v2020.04
and in
9 other branches
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>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
1 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | 2 | /* |
3 | - * Copyright 2017 NXP | |
3 | + * Copyright 2017-2019 NXP | |
4 | 4 | * Copyright 2014-2015 Freescale Semiconductor, Inc. |
5 | 5 | */ |
6 | 6 | |
... | ... | @@ -1072,6 +1072,8 @@ |
1072 | 1072 | |
1073 | 1073 | if (env_get_f("hwconfig", buffer, sizeof(buffer)) > 0) |
1074 | 1074 | buf = buffer; |
1075 | + else | |
1076 | + return; | |
1075 | 1077 | |
1076 | 1078 | prefetch_arg = hwconfig_subarg_f("core_prefetch", "disable", |
1077 | 1079 | &arglen, buf); |