Skip to content
Snippets Groups Projects
Commit 562abecf authored by Sandrine Bailleux's avatar Sandrine Bailleux Committed by TrustedFirmware Code Review
Browse files

Merge "fconf: Fix misra issues" into integration

parents 62485201 845db722
No related branches found
No related tags found
No related merge requests found
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
#define FCONF_REGISTER_POPULATOR(name, callback) \ #define FCONF_REGISTER_POPULATOR(name, callback) \
__attribute__((used, section(".fconf_populator"))) \ __attribute__((used, section(".fconf_populator"))) \
const struct fconf_populator name##__populator = { \ const struct fconf_populator (name##__populator) = { \
.info = #name, \ .info = (#name), \
.populate = callback \ .populate = (callback) \
}; };
/* /*
......
/* /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -56,13 +56,13 @@ struct object_pool { ...@@ -56,13 +56,13 @@ struct object_pool {
*/ */
static inline void *pool_alloc_n(struct object_pool *pool, size_t count) static inline void *pool_alloc_n(struct object_pool *pool, size_t count)
{ {
if (pool->used + count > pool->capacity) { if ((pool->used + count) > pool->capacity) {
ERROR("Cannot allocate %zu objects out of pool (%zu objects left).\n", ERROR("Cannot allocate %zu objects out of pool (%zu objects left).\n",
count, pool->capacity - pool->used); count, pool->capacity - pool->used);
panic(); panic();
} }
void *obj = (char *)(pool->objects) + pool->obj_size * pool->used; void *obj = (char *)(pool->objects) + (pool->obj_size * pool->used);
pool->used += count; pool->used += count;
return obj; return obj;
} }
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <lib/fconf/fconf_tbbr_getter.h> #include <lib/fconf/fconf_tbbr_getter.h>
#include <plat/arm/common/arm_dyn_cfg_helpers.h> #include <plat/arm/common/arm_dyn_cfg_helpers.h>
#include <plat/arm/common/plat_arm.h> #include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h>
#if TRUSTED_BOARD_BOOT #if TRUSTED_BOARD_BOOT
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <drivers/io/io_memmap.h> #include <drivers/io/io_memmap.h>
#include <drivers/io/io_storage.h> #include <drivers/io/io_storage.h>
#include <lib/utils.h> #include <lib/utils.h>
#include <tools_share/firmware_image_package.h>
#include <plat/arm/common/arm_fconf_getter.h> #include <plat/arm/common/arm_fconf_getter.h>
#include <plat/arm/common/arm_fconf_io_storage.h> #include <plat/arm/common/arm_fconf_io_storage.h>
......
...@@ -59,9 +59,9 @@ struct plat_io_policy policies[MAX_NUMBER_IDS] = { ...@@ -59,9 +59,9 @@ struct plat_io_policy policies[MAX_NUMBER_IDS] = {
#ifdef IMAGE_BL2 #ifdef IMAGE_BL2
#if TRUSTED_BOARD_BOOT #if TRUSTED_BOARD_BOOT
#define FCONF_ARM_IO_UUID_NUMBER 19 #define FCONF_ARM_IO_UUID_NUMBER U(19)
#else #else
#define FCONF_ARM_IO_UUID_NUMBER 10 #define FCONF_ARM_IO_UUID_NUMBER U(10)
#endif #endif
static io_uuid_spec_t fconf_arm_uuids[FCONF_ARM_IO_UUID_NUMBER]; static io_uuid_spec_t fconf_arm_uuids[FCONF_ARM_IO_UUID_NUMBER];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment