summaryrefslogtreecommitdiff
path: root/bmm_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'bmm_test.c')
-rw-r--r--bmm_test.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/bmm_test.c b/bmm_test.c
index d897aaa..ceadf9c 100644
--- a/bmm_test.c
+++ b/bmm_test.c
@@ -37,7 +37,7 @@ int fail_count = 0;
} while(0)
#define PRINT_TEST_RESULTS() printf("Passed/Failed = %d/%d\n", pass_count, fail_count)
-int test_bmm_init()
+static int test_bmm_init(void)
{
int ret;
@@ -49,7 +49,7 @@ int test_bmm_init()
return (ret <= 0);
}
-int test_bmm_get_space()
+static int test_bmm_get_space(void)
{
unsigned long total_size;
unsigned long free_size;
@@ -65,7 +65,7 @@ int test_bmm_get_space()
return (total_size <= 0 || total_size != free_size);
}
-int test_bmm_malloc(unsigned long size, int attr)
+static int test_bmm_malloc(unsigned long size, int attr)
{
void *vaddr;
unsigned long allocated_size1, free_size1;
@@ -110,7 +110,7 @@ int test_bmm_malloc(unsigned long size, int attr)
free_size1 != free_size3);
}
-long gettickcount(void)
+static long gettickcount(void)
{
struct timeval g_tv;
struct timezone g_tz;
@@ -120,10 +120,9 @@ long gettickcount(void)
return g_tv.tv_sec * 1000000 + g_tv.tv_usec;
}
-int test_bmm_flush_user(long size)
+static int test_bmm_flush_user(unsigned long size)
{
char *src;
- unsigned long offset;
long t1 = 0, t2 = 0;
PRINT_TEST_NAME;
@@ -136,7 +135,7 @@ int test_bmm_flush_user(long size)
t1 = gettickcount();
bmm_flush_user(src, size, BMM_DMA_TO_DEVICE);
t2 = gettickcount();
- printf("bmm_flush_user 0x%x memory cost %dusec\n", size, t2-t1);
+ printf("bmm_flush_user 0x%lx memory cost %ldusec\n", size, t2-t1);
free(src);
src = bmm_malloc(size, BMM_ATTR_DEFAULT);
@@ -147,13 +146,13 @@ int test_bmm_flush_user(long size)
t1 = gettickcount();
bmm_flush_cache_range(src, size, BMM_DMA_TO_DEVICE);
t2 = gettickcount();
- printf("bmm_flush_cache_range 0x%x memory cost %dusec\n", size, t2-t1);
+ printf("bmm_flush_cache_range 0x%lx memory cost %ldusec\n", size, t2-t1);
bmm_free(src);
return 0;
}
-int test_bmm_share(unsigned long size)
+static int test_bmm_share(unsigned long size)
{
char *src;
char *dst;