summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-12-07 08:52:31 +0100
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-12-07 10:07:25 +0100
commitcc8b09227d321f0e46b508ce44cad667c47f0e5b (patch)
tree428c8c1efb1a418edff32d906993174b9c46b038
parentfbe88b2cf7df92ec7157b6f0cdd9b8407b8cb193 (diff)
downloadmemtool-cc8b09227d321f0e46b508ce44cad667c47f0e5b.tar.gz
memtool-cc8b09227d321f0e46b508ce44cad667c47f0e5b.tar.xz
Make locally used functions static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--memtool.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/memtool.c b/memtool.c
index 85dee06..31f12a6 100644
--- a/memtool.c
+++ b/memtool.c
@@ -32,7 +32,7 @@
* Like simple_strtoull() but handles an optional G, M, K or k
* suffix for Gigabyte, Megabyte or Kilobyte
*/
-unsigned long long strtoull_suffix(const char *str, char **endp, int base)
+static unsigned long long strtoull_suffix(const char *str, char **endp, int base)
{
unsigned long long val;
char *end;
@@ -70,7 +70,7 @@ unsigned long long strtoull_suffix(const char *str, char **endp, int base)
* 0x1000 -> start = 0x1000, size = ~0
* 1M+1k -> start = 0x100000, size = 0x400
*/
-int parse_area_spec(const char *str, unsigned long long *start,
+static int parse_area_spec(const char *str, unsigned long long *start,
unsigned long long *size)
{
char *endp;
@@ -118,7 +118,7 @@ int parse_area_spec(const char *str, unsigned long long *start,
(((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \
(((uint16_t)(x) & (uint16_t)0xff00U) >> 8)))
-int memory_display(const void *addr, unsigned long long offs,
+static int memory_display(const void *addr, unsigned long long offs,
unsigned nbytes, int size, int swab)
{
ulong linebytes, i;
@@ -177,7 +177,8 @@ int memory_display(const void *addr, unsigned long long offs,
return 0;
}
-int memfd;
+
+static int memfd;
static void *memmap(const char *file, unsigned long addr, unsigned long size)
{
@@ -325,7 +326,7 @@ struct cmd {
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-struct cmd cmds[] = {
+static struct cmd cmds[] = {
{
.cmd = md,
.name = "md",