Commit 7c934242 authored by Daniel Boulby's avatar Daniel Boulby
Browse files

Fix MISRA Rule 5.3 Part 3



Use a _ prefix for macro arguments to prevent that argument from
hiding variables of the same name in the outer scope

Rule 5.3: An identifier declared in an inner scope shall not
          hide an identifier declared in an outer scope

Fixed For:
    make PLAT=fvp SPD=tspd

Change-Id: I2d711b9584c4cb9ba3814ecd2ca65a42b7e24179
Signed-off-by: default avatarDaniel Boulby <daniel.boulby@arm.com>
parent 896a5902
......@@ -190,14 +190,14 @@ typedef struct tsp_context {
} tsp_context_t;
/* Helper macros to store and retrieve tsp args from tsp_context */
#define store_tsp_args(tsp_ctx, x1, x2) do {\
tsp_ctx->saved_tsp_args[0] = x1;\
tsp_ctx->saved_tsp_args[1] = x2;\
#define store_tsp_args(_tsp_ctx, _x1, _x2) do {\
_tsp_ctx->saved_tsp_args[0] = _x1;\
_tsp_ctx->saved_tsp_args[1] = _x2;\
} while (0)
#define get_tsp_args(tsp_ctx, x1, x2) do {\
x1 = tsp_ctx->saved_tsp_args[0];\
x2 = tsp_ctx->saved_tsp_args[1];\
#define get_tsp_args(_tsp_ctx, _x1, _x2) do {\
_x1 = _tsp_ctx->saved_tsp_args[0];\
_x2 = _tsp_ctx->saved_tsp_args[1];\
} while (0)
/* TSPD power management handlers */
......
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