xen/common: device_tree: Fix MISRA C 2012 Rule 8.7 violation
authorXenia Ragiadakou <burzalodowa@gmail.com>
Wed, 22 Jun 2022 15:15:57 +0000 (18:15 +0300)
committerJulien Grall <jgrall@amazon.com>
Thu, 23 Jun 2022 18:44:48 +0000 (19:44 +0100)
The function __dt_n_size_cells() is referenced only in device_tree.c.
Change the linkage of the function from external to internal by adding
the storage-class specifier static to the function definition.

This patch aims to resolve indirectly a MISRA C 2012 Rule 8.4 violation
warning.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/device_tree.c

index 0e8798bd2449cd3f88b5c12dc6d035adc8ae7d86..6c9712ab7bda0ec613ed8e50ed9ad8f8aaf31b62 100644 (file)
@@ -496,7 +496,7 @@ static int __dt_n_addr_cells(const struct dt_device_node *np, bool_t parent)
     return DT_ROOT_NODE_ADDR_CELLS_DEFAULT;
 }
 
-int __dt_n_size_cells(const struct dt_device_node *np, bool_t parent)
+static int __dt_n_size_cells(const struct dt_device_node *np, bool_t parent)
 {
     const __be32 *ip;