projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: Drop asm/ptrace.h from common header
[oweals/u-boot.git]
/
cmd
/
blkcache.c
diff --git
a/cmd/blkcache.c
b/cmd/blkcache.c
index a3dd549a9d282064085101b6fd25b20024655a2a..25f252e455ed95a761418c452b9f9cde53e95d9a 100644
(file)
--- a/
cmd/blkcache.c
+++ b/
cmd/blkcache.c
@@
-1,17
+1,17
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) Nelson Integration, LLC 2016
* Author: Eric Nelson<eric@nelint.com>
*
/*
* Copyright (C) Nelson Integration, LLC 2016
* Author: Eric Nelson<eric@nelint.com>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
*/
*/
+#include <command.h>
#include <config.h>
#include <common.h>
#include <malloc.h>
#include <part.h>
#include <config.h>
#include <common.h>
#include <malloc.h>
#include <part.h>
-static int blkc_show(
cmd_tbl_t
*cmdtp, int flag,
- int argc, char *
const argv[])
+static int blkc_show(
struct cmd_tbl
*cmdtp, int flag,
+ int argc, char *const argv[])
{
struct block_cache_stats stats;
blkcache_stats(&stats);
{
struct block_cache_stats stats;
blkcache_stats(&stats);
@@
-26,8
+26,8
@@
static int blkc_show(cmd_tbl_t *cmdtp, int flag,
return 0;
}
return 0;
}
-static int blkc_configure(
cmd_tbl_t
*cmdtp, int flag,
- int argc, char *
const argv[])
+static int blkc_configure(
struct cmd_tbl
*cmdtp, int flag,
+ int argc, char *const argv[])
{
unsigned blocks_per_entry, max_entries;
if (argc != 3)
{
unsigned blocks_per_entry, max_entries;
if (argc != 3)
@@
-41,7
+41,7
@@
static int blkc_configure(cmd_tbl_t *cmdtp, int flag,
return 0;
}
return 0;
}
-static
cmd_tbl_t
cmd_blkc_sub[] = {
+static
struct cmd_tbl
cmd_blkc_sub[] = {
U_BOOT_CMD_MKENT(show, 0, 0, blkc_show, "", ""),
U_BOOT_CMD_MKENT(configure, 3, 0, blkc_configure, "", ""),
};
U_BOOT_CMD_MKENT(show, 0, 0, blkc_show, "", ""),
U_BOOT_CMD_MKENT(configure, 3, 0, blkc_configure, "", ""),
};
@@
-56,10
+56,10
@@
static __maybe_unused void blkc_reloc(void)
};
}
};
}
-static int do_blkcache(
cmd_tbl_t
*cmdtp, int flag,
- int argc, char *
const argv[])
+static int do_blkcache(
struct cmd_tbl
*cmdtp, int flag,
+ int argc, char *const argv[])
{
{
-
cmd_tbl_t
*c;
+
struct cmd_tbl
*c;
#ifdef CONFIG_NEEDS_MANUAL_RELOC
blkc_reloc();
#ifdef CONFIG_NEEDS_MANUAL_RELOC
blkc_reloc();
@@
-73,12
+73,10
@@
static int do_blkcache(cmd_tbl_t *cmdtp, int flag,
c = find_cmd_tbl(argv[0], &cmd_blkc_sub[0], ARRAY_SIZE(cmd_blkc_sub));
c = find_cmd_tbl(argv[0], &cmd_blkc_sub[0], ARRAY_SIZE(cmd_blkc_sub));
- if (c)
- return c->cmd(cmdtp, flag, argc, argv);
- else
+ if (!c)
return CMD_RET_USAGE;
return CMD_RET_USAGE;
- return
0
;
+ return
c->cmd(cmdtp, flag, argc, argv)
;
}
U_BOOT_CMD(
}
U_BOOT_CMD(