summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-05-03 17:11:42 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-07-18 17:52:15 +0100
commitda554d7439b1e9b64d06dd50c6eb29bf1c952805 (patch)
tree24f9f2bd2633606a9fd18a7bc276cce18e57e87c
parent4c0d03907652fdf9c66a02cec9ea7137ccccd2e9 (diff)
Fix coding guideline warnings
This patch fixes some coding guideline warnings reported by the checkpatch script. Only files related to upcoming feature development have been fixed. Change-Id: I26fbce75c02ed62f00493ed6c106fe7c863ddbc5
-rw-r--r--include/bl31/cpu_data.h4
-rw-r--r--include/common/context.h18
-rw-r--r--include/common/smcc_helpers.h8
-rw-r--r--services/std_svc/psci/psci_common.c2
-rw-r--r--services/std_svc/psci/psci_main.c4
5 files changed, 18 insertions, 18 deletions
diff --git a/include/bl31/cpu_data.h b/include/bl31/cpu_data.h
index 3a1db5c7..4fc801bf 100644
--- a/include/bl31/cpu_data.h
+++ b/include/bl31/cpu_data.h
@@ -123,10 +123,10 @@ void init_cpu_ops(void);
#define get_cpu_data_by_index(_ix, _m) _cpu_data_by_index(_ix)->_m
#define set_cpu_data_by_index(_ix, _m, _v) _cpu_data_by_index(_ix)->_m = _v
-#define flush_cpu_data(_m) flush_dcache_range((uintptr_t) \
+#define flush_cpu_data(_m) flush_dcache_range((uintptr_t) \
&(_cpu_data()->_m), \
sizeof(_cpu_data()->_m))
-#define inv_cpu_data(_m) inv_dcache_range((uintptr_t) \
+#define inv_cpu_data(_m) inv_dcache_range((uintptr_t) \
&(_cpu_data()->_m), \
sizeof(_cpu_data()->_m))
#define flush_cpu_data_by_index(_ix, _m) \
diff --git a/include/common/context.h b/include/common/context.h
index ec47f2ad..b528c03b 100644
--- a/include/common/context.h
+++ b/include/common/context.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -298,35 +298,35 @@ CASSERT(CTX_EL3STATE_OFFSET == __builtin_offsetof(cpu_context_t, el3state_ctx),
*/
#define set_aapcs_args0(ctx, x0) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X0, x0); \
- } while (0);
+ } while (0)
#define set_aapcs_args1(ctx, x0, x1) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X1, x1); \
set_aapcs_args0(ctx, x0); \
- } while (0);
+ } while (0)
#define set_aapcs_args2(ctx, x0, x1, x2) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X2, x2); \
set_aapcs_args1(ctx, x0, x1); \
- } while (0);
+ } while (0)
#define set_aapcs_args3(ctx, x0, x1, x2, x3) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X3, x3); \
set_aapcs_args2(ctx, x0, x1, x2); \
- } while (0);
+ } while (0)
#define set_aapcs_args4(ctx, x0, x1, x2, x3, x4) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X4, x4); \
set_aapcs_args3(ctx, x0, x1, x2, x3); \
- } while (0);
+ } while (0)
#define set_aapcs_args5(ctx, x0, x1, x2, x3, x4, x5) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X5, x5); \
set_aapcs_args4(ctx, x0, x1, x2, x3, x4); \
- } while (0);
+ } while (0)
#define set_aapcs_args6(ctx, x0, x1, x2, x3, x4, x5, x6) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X6, x6); \
set_aapcs_args5(ctx, x0, x1, x2, x3, x4, x5); \
- } while (0);
+ } while (0)
#define set_aapcs_args7(ctx, x0, x1, x2, x3, x4, x5, x6, x7) do { \
write_ctx_reg(get_gpregs_ctx(ctx), CTX_GPREG_X7, x7); \
set_aapcs_args6(ctx, x0, x1, x2, x3, x4, x5, x6); \
- } while (0);
+ } while (0)
/*******************************************************************************
* Function prototypes
diff --git a/include/common/smcc_helpers.h b/include/common/smcc_helpers.h
index 6a07b013..6279cf23 100644
--- a/include/common/smcc_helpers.h
+++ b/include/common/smcc_helpers.h
@@ -119,18 +119,18 @@
* to SMC handler. These takes the offset values defined in context.h
*/
#define SMC_GET_GP(_h, _g) \
- read_ctx_reg(get_gpregs_ctx(_h), (_g));
+ read_ctx_reg(get_gpregs_ctx(_h), (_g))
#define SMC_SET_GP(_h, _g, _v) \
- write_ctx_reg(get_gpregs_ctx(_h), (_g), (_v));
+ write_ctx_reg(get_gpregs_ctx(_h), (_g), (_v))
/*
* Convenience macros to access EL3 context registers using handle provided to
* SMC handler. These takes the offset values defined in context.h
*/
#define SMC_GET_EL3(_h, _e) \
- read_ctx_reg(get_el3state_ctx(_h), (_e));
+ read_ctx_reg(get_el3state_ctx(_h), (_e))
#define SMC_SET_EL3(_h, _e, _v) \
- write_ctx_reg(get_el3state_ctx(_h), (_e), (_v));
+ write_ctx_reg(get_el3state_ctx(_h), (_e), (_v))
/* The macro below is used to identify a Standard Service SMC call */
#define is_std_svc_call(_fid) ((((_fid) >> FUNCID_OEN_SHIFT) & \
diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c
index a651d99f..2a0afb4c 100644
--- a/services/std_svc/psci/psci_common.c
+++ b/services/std_svc/psci/psci_common.c
@@ -817,7 +817,7 @@ void psci_print_power_domain_map(void)
plat_local_state_type_t state_type;
/* This array maps to the PSCI_STATE_X definitions in psci.h */
- static const char *psci_state_type_str[] = {
+ static const char * const psci_state_type_str[] = {
"ON",
"RETENTION",
"OFF",
diff --git a/services/std_svc/psci/psci_main.c b/services/std_svc/psci/psci_main.c
index 86df9a11..04ef10e7 100644
--- a/services/std_svc/psci/psci_main.c
+++ b/services/std_svc/psci/psci_main.c
@@ -94,7 +94,7 @@ int psci_cpu_suspend(unsigned int power_state,
is_power_down_state = psci_get_pstate_type(power_state);
/* Sanity check the requested suspend levels */
- assert (psci_validate_suspend_req(&state_info, is_power_down_state)
+ assert(psci_validate_suspend_req(&state_info, is_power_down_state)
== PSCI_E_SUCCESS);
target_pwrlvl = psci_find_target_suspend_lvl(&state_info);
@@ -217,7 +217,7 @@ int psci_cpu_off(void)
* The only error cpu_off can return is E_DENIED. So check if that's
* indeed the case.
*/
- assert (rc == PSCI_E_DENIED);
+ assert(rc == PSCI_E_DENIED);
return rc;
}