* [U-Boot] [PATCH] Add validation for icache/dcache arguments - arguments different from off/on/flush are currently silently ignored.
@ 2019-07-13 18:54 eric.perie at yahoo.com
2019-07-30 1:23 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: eric.perie at yahoo.com @ 2019-07-13 18:54 UTC (permalink / raw)
To: u-boot
From: Eric Perie <eric.perie@yahoo.com>
Signed-off-by: Eric Perie <eric.perie@yahoo.com>
---
cmd/cache.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmd/cache.c b/cmd/cache.c
index 233f428054..2c687173a8 100644
--- a/cmd/cache.c
+++ b/cmd/cache.c
@@ -22,7 +22,7 @@ void __weak invalidate_icache_all(void)
static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
- case 2: /* on / off */
+ case 2: /* on / off / flush */
switch (parse_argv(argv[1])) {
case 0:
icache_disable();
@@ -33,6 +33,8 @@ static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 2:
invalidate_icache_all();
break;
+ default:
+ return CMD_RET_USAGE;
}
break;
case 1: /* get status */
@@ -54,7 +56,7 @@ void __weak flush_dcache_all(void)
static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
- case 2: /* on / off */
+ case 2: /* on / off / flush */
switch (parse_argv(argv[1])) {
case 0:
dcache_disable();
@@ -65,6 +67,8 @@ static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 2:
flush_dcache_all();
break;
+ default:
+ return CMD_RET_USAGE;
}
break;
case 1: /* get status */
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] Add validation for icache/dcache arguments - arguments different from off/on/flush are currently silently ignored.
2019-07-13 18:54 [U-Boot] [PATCH] Add validation for icache/dcache arguments - arguments different from off/on/flush are currently silently ignored eric.perie at yahoo.com
@ 2019-07-30 1:23 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2019-07-30 1:23 UTC (permalink / raw)
To: u-boot
On Sat, Jul 13, 2019 at 02:54:58PM -0400, eric.perie at yahoo.com wrote:
> From: Eric Perie <eric.perie@yahoo.com>
>
> Signed-off-by: Eric Perie <eric.perie@yahoo.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190729/077b1f16/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-30 1:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-13 18:54 [U-Boot] [PATCH] Add validation for icache/dcache arguments - arguments different from off/on/flush are currently silently ignored eric.perie at yahoo.com
2019-07-30 1:23 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.