[rtems commit] leon, l2cache: prevent unused diagnostic access
Daniel Hellstrom
danielh at rtems.org
Sun Mar 7 15:56:14 UTC 2021
Module: rtems
Branch: 5
Commit: 8cfaa0eb76d248ea9afab471708fe7d35cd05a48
Changeset: http://git.rtems.org/rtems/commit/?id=8cfaa0eb76d248ea9afab471708fe7d35cd05a48
Author: Martin Aberg <maberg at gaisler.com>
Date: Thu Nov 14 11:47:21 2019 +0100
leon, l2cache: prevent unused diagnostic access
Update #4315.
---
bsps/shared/grlib/l2c/l2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsps/shared/grlib/l2c/l2c.c b/bsps/shared/grlib/l2c/l2c.c
index ddef0ad..4a443ed 100644
--- a/bsps/shared/grlib/l2c/l2c.c
+++ b/bsps/shared/grlib/l2c/l2c.c
@@ -894,9 +894,9 @@ int l2cache_diag_tag( int way, int index, struct l2cache_tag * tag)
return L2CACHE_ERR_EINVAL;
}
- unsigned int val = l2cache_reg_diagtag(way,index);
-
if (tag){
+ unsigned int val = l2cache_reg_diagtag(way,index);
+
tag->tag = l2cache_get_tag(val);
tag->valid = l2cache_tag_valid(val);
tag->dirty = l2cache_tag_dirty(val);
More information about the vc
mailing list