diff --git a/include/common/fdt_wrappers.h b/include/common/fdt_wrappers.h index b16510f3d..abbf9764b 100644 --- a/include/common/fdt_wrappers.h +++ b/include/common/fdt_wrappers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -49,7 +49,7 @@ int fdtw_find_or_add_subnode(void *fdt, int parentoffset, const char *name); static inline uint32_t fdt_blob_size(const void *dtb) { - const uint32_t *dtb_header = dtb; + const uint32_t *dtb_header = (const uint32_t *)dtb; return fdt32_to_cpu(dtb_header[1]); } @@ -60,7 +60,8 @@ static inline bool fdt_node_is_enabled(const void *fdt, int node) const void *prop = fdt_getprop(fdt, node, "status", &len); /* A non-existing status property means the device is enabled. */ - return (prop == NULL) || (len == 5 && strcmp(prop, "okay") == 0); + return (prop == NULL) || (len == 5 && strcmp((const char *)prop, + "okay") == 0); } #define fdt_for_each_compatible_node(dtb, node, compatible_str) \