aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2015-03-05 15:02:41 +0000
committerdanh-arm <dan.handley@arm.com>2015-03-05 15:02:41 +0000
commit5930eadbe5d8d4c3f15fd910476f72cd5bf86f44 (patch)
treec088f032c61d12d7cd0ee35c1fad18efddba8fb7
parent0412c66a9e5a55e960055d80e2ff604fadf1ca3e (diff)
parentba592e280229c8d86e2ad688d0eba11b70172f5f (diff)
downloadarm-trusted-firmware-5930eadbe5d8d4c3f15fd910476f72cd5bf86f44.tar.gz
Merge pull request #261 from sandrine-bailleux/sb/coding-style
Ignore C library files when checking coding style Fix violations to the coding style
-rw-r--r--Makefile6
-rw-r--r--common/tf_printf.c2
-rw-r--r--plat/fvp/fvp_pm.c4
-rw-r--r--plat/juno/bl31_plat_setup.c2
-rw-r--r--plat/juno/plat_topology.c2
-rw-r--r--services/std_svc/psci/psci_afflvl_suspend.c4
-rw-r--r--services/std_svc/psci/psci_common.c2
7 files changed, 12 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index aa5880ea..1e2f324c 100644
--- a/Makefile
+++ b/Makefile
@@ -77,10 +77,12 @@ TRUSTED_BOARD_BOOT := 0
AUTH_MOD := none
# Checkpatch ignores
-CHECK_IGNORE = --ignore COMPLEX_MACRO
+CHECK_IGNORE = --ignore COMPLEX_MACRO --ignore GERRIT_CHANGE_ID
CHECKPATCH_ARGS = --no-tree --no-signoff ${CHECK_IGNORE}
CHECKCODE_ARGS = --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
+# Do not check the coding style on C library files
+CHECK_PATHS = $(shell ls -I include -I lib) $(shell ls -I stdlib include) $(shell ls -I stdlib lib)
ifeq (${V},0)
Q=@
@@ -361,7 +363,7 @@ checkcodebase: locate-checkpatch
checkpatch: locate-checkpatch
@echo " CHECKING STYLE"
- @git format-patch --stdout ${BASE_COMMIT} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
+ @git log -p ${BASE_COMMIT}..HEAD -- ${CHECK_PATHS} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
.PHONY: ${CRTTOOL}
${CRTTOOL}:
diff --git a/common/tf_printf.c b/common/tf_printf.c
index 02461c0b..c68b9904 100644
--- a/common/tf_printf.c
+++ b/common/tf_printf.c
@@ -38,7 +38,7 @@ static void unsigned_num_print(unsigned long int unum, unsigned int radix)
{
/* Just need enough space to store 64 bit decimal integer */
unsigned char num_buf[20];
- int i = 0 , rem;
+ int i = 0, rem;
do {
rem = unum % radix;
diff --git a/plat/fvp/fvp_pm.c b/plat/fvp/fvp_pm.c
index 9044e693..c15d845d 100644
--- a/plat/fvp/fvp_pm.c
+++ b/plat/fvp/fvp_pm.c
@@ -64,7 +64,7 @@ static void fvp_program_mailbox(uint64_t mpidr, uint64_t address)
* Function which implements the common FVP specific operations to power down a
* cpu in response to a CPU_OFF or CPU_SUSPEND request.
******************************************************************************/
-static void fvp_cpu_pwrdwn_common()
+static void fvp_cpu_pwrdwn_common(void)
{
/* Prevent interrupts from spuriously waking up this cpu */
arm_gic_cpuif_deactivate();
@@ -77,7 +77,7 @@ static void fvp_cpu_pwrdwn_common()
* Function which implements the common FVP specific operations to power down a
* cluster in response to a CPU_OFF or CPU_SUSPEND request.
******************************************************************************/
-static void fvp_cluster_pwrdwn_common()
+static void fvp_cluster_pwrdwn_common(void)
{
uint64_t mpidr = read_mpidr_el1();
diff --git a/plat/juno/bl31_plat_setup.c b/plat/juno/bl31_plat_setup.c
index ad8ea435..1d337688 100644
--- a/plat/juno/bl31_plat_setup.c
+++ b/plat/juno/bl31_plat_setup.c
@@ -182,7 +182,7 @@ void bl31_platform_setup(void)
* Perform the very early platform specific architectural setup here. At the
* moment this is only intializes the mmu in a quick and dirty way.
******************************************************************************/
-void bl31_plat_arch_setup()
+void bl31_plat_arch_setup(void)
{
configure_mmu_el3(BL31_RO_BASE,
(BL31_END - BL31_RO_BASE),
diff --git a/plat/juno/plat_topology.c b/plat/juno/plat_topology.c
index c22edda2..24be7670 100644
--- a/plat/juno/plat_topology.c
+++ b/plat/juno/plat_topology.c
@@ -48,7 +48,7 @@ unsigned int plat_get_aff_state(unsigned int aff_lvl, unsigned long mpidr)
return aff_lvl <= MPIDR_AFFLVL1 ? PSCI_AFF_PRESENT : PSCI_AFF_ABSENT;
}
-int plat_setup_topology()
+int plat_setup_topology(void)
{
/* Juno todo: Make topology configurable via SCC */
return 0;
diff --git a/services/std_svc/psci/psci_afflvl_suspend.c b/services/std_svc/psci/psci_afflvl_suspend.c
index dad0cefd..76e8c908 100644
--- a/services/std_svc/psci/psci_afflvl_suspend.c
+++ b/services/std_svc/psci/psci_afflvl_suspend.c
@@ -58,7 +58,7 @@ void psci_set_suspend_power_state(unsigned int power_state)
* powered down during a cpu_suspend call. Returns PSCI_INVALID_DATA if the
* power state is invalid.
******************************************************************************/
-int psci_get_suspend_afflvl()
+int psci_get_suspend_afflvl(void)
{
unsigned int power_state;
@@ -73,7 +73,7 @@ int psci_get_suspend_afflvl()
* parameter saved in the per-cpu data array. Returns PSCI_INVALID_DATA if the
* power state saved is invalid.
******************************************************************************/
-int psci_get_suspend_stateid()
+int psci_get_suspend_stateid(void)
{
unsigned int power_state;
diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c
index 7ab607db..237cf1e9 100644
--- a/services/std_svc/psci/psci_common.c
+++ b/services/std_svc/psci/psci_common.c
@@ -133,7 +133,7 @@ uint32_t psci_get_max_phys_off_afflvl(void)
* been physically powered up. It is expected to be called immediately after
* reset from assembler code.
******************************************************************************/
-int get_power_on_target_afflvl()
+int get_power_on_target_afflvl(void)
{
int afflvl;