aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHui Zhu <teawaterz@linux.alibaba.com>2021-01-19 14:43:13 +0800
committerWu Fengguang <wfg@mail.ustc.edu.cn>2021-01-21 21:19:32 +0800
commitef16f000ce67ae825c98b85cb8fafc6a17e3de1a (patch)
tree698912969675c181d22b71142c619533e734c37d
parent8c931f0fe125d5d71f92cc38d764ba37044da857 (diff)
downloadvm-scalability-ef16f000ce67ae825c98b85cb8fafc6a17e3de1a.tar.gz
usemem: Remove the duplicate do_access
Got following error when build usemem: gcc -O -c -Wall -g usemem.c -o usemem.o usemem.c:451:15: error: redefinition of ‘do_access’ unsigned long do_access(unsigned long *p, unsigned long idx, int read) ^~~~~~~~~ usemem.c:332:15: note: previous definition of ‘do_access’ was here unsigned long do_access(unsigned long *p, unsigned long idx, int read) ^~~~~~~~~ make: *** [usemem.o] Error 1 Remove the duplicate do_access to fix this error. Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
-rw-r--r--usemem.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/usemem.c b/usemem.c
index 48c3d65..e2c46ec 100644
--- a/usemem.c
+++ b/usemem.c
@@ -329,18 +329,6 @@ void detach(void)
}
}
-unsigned long do_access(unsigned long *p, unsigned long idx, int read)
-{
- volatile unsigned long *vp = p;
-
- if (read)
- return vp[idx]; /* read data */
- else {
- vp[idx] = idx; /* write data */
- return 0;
- }
-}
-
unsigned long * allocate(unsigned long bytes)
{
unsigned long *p;