Commit cd4941de authored by Yann Gautier's avatar Yann Gautier
Browse files

plat/st: correct static analysis tool warning



Correct the following sparse warnings:
plat/st/common/stm32mp_dt.c:103:5: warning:
 symbol 'fdt_get_node_parent_address_cells' was not declared.
 Should it be static?
plat/st/common/stm32mp_dt.c:123:5: warning:
 symbol 'fdt_get_node_parent_size_cells' was not declared.
 Should it be static?

As those 2 functions are only used by assert(), put them under
ENABLE_ASSERTIONS flag.

Change-Id: Iad721f12128df83a3de3f53e7920a9c1dce64c56
Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
parent 498f2936
/*
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
......@@ -92,6 +92,7 @@ uint8_t fdt_get_status(int node)
return status;
}
#if ENABLE_ASSERTIONS
/*******************************************************************************
* This function returns the address cells from the node parent.
* Returns:
......@@ -100,7 +101,7 @@ uint8_t fdt_get_status(int node)
* - a default value if undefined #address-cells property as per libfdt
* implementation.
******************************************************************************/
int fdt_get_node_parent_address_cells(int node)
static int fdt_get_node_parent_address_cells(int node)
{
int parent;
......@@ -120,7 +121,7 @@ int fdt_get_node_parent_address_cells(int node)
* - a default value if undefined #size-cells property as per libfdt
* implementation.
******************************************************************************/
int fdt_get_node_parent_size_cells(int node)
static int fdt_get_node_parent_size_cells(int node)
{
int parent;
......@@ -131,6 +132,7 @@ int fdt_get_node_parent_size_cells(int node)
return fdt_size_cells(fdt, parent);
}
#endif
/*******************************************************************************
* This function reads a value of a node property (generic use of fdt
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment