From da741a51f2dadc66db450a2f44c7c64c886e977a Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 11 Apr 2010 01:03:53 +0800 Subject: [PATCH] TARGET/MIPS32_DMAACC: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo --- src/target/mips32_dmaacc.c | 25 +++++++++++++++++++------ src/target/mips32_dmaacc.h | 14 -------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/target/mips32_dmaacc.c b/src/target/mips32_dmaacc.c index 7d3c2daba..d756928a0 100644 --- a/src/target/mips32_dmaacc.c +++ b/src/target/mips32_dmaacc.c @@ -28,6 +28,19 @@ #include "mips32_dmaacc.h" +static int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); + +static int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); /* * The following logic shamelessly cloned from HairyDairyMaid's wrt54g_debrick @@ -364,7 +377,7 @@ int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int siz return ERROR_OK; } -int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { int i; int retval; @@ -377,7 +390,7 @@ int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { int i; int retval; @@ -390,7 +403,7 @@ int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { int i; int retval; @@ -418,7 +431,7 @@ int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int si return ERROR_OK; } -int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { int i; int retval; @@ -431,7 +444,7 @@ int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int return ERROR_OK; } -int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { int i; int retval; @@ -444,7 +457,7 @@ int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int return ERROR_OK; } -int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { int i; int retval; diff --git a/src/target/mips32_dmaacc.h b/src/target/mips32_dmaacc.h index c1aa07dd7..fdf8caef5 100644 --- a/src/target/mips32_dmaacc.h +++ b/src/target/mips32_dmaacc.h @@ -39,18 +39,4 @@ int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf); -int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); - -int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); - #endif