summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
98a8b99)
Discoverd by clang static analyzer.
While on it remove useless type casts from arm946e_read_cp15() parameter.
Change-Id: I549e19685b431400243800ee0f7d1bbe6cdb14b4
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5376
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
/* Read dtag */
uint32_t dtag;
/* Read dtag */
uint32_t dtag;
- arm946e_read_cp15(target, 0x16, (uint32_t *) &dtag);
+ retval = arm946e_read_cp15(target, 0x16, &dtag);
+ if (retval != ERROR_OK) {
+ LOG_DEBUG("ERROR reading dtag");
+ return retval;
+ }
/* Check cache line VALID bit */
if (!(dtag >> 4 & 0x1))
/* Check cache line VALID bit */
if (!(dtag >> 4 & 0x1))
/* See if CACHES are enabled, and save that info
* in the context bits, so that arm946e_pre_restore_context() can use them */
/* See if CACHES are enabled, and save that info
* in the context bits, so that arm946e_pre_restore_context() can use them */
- arm946e_read_cp15(target, CP15_CTL, (uint32_t *) &ctr_reg);
+ arm946e_read_cp15(target, CP15_CTL, &ctr_reg);
/* Save control reg in the context */
arm946e->cp15_control_reg = ctr_reg;
/* Save control reg in the context */
arm946e->cp15_control_reg = ctr_reg;
if (arm946e_preserve_cache) {
struct arm946e_common *arm946e = target_to_arm946(target);
/* Get the contents of the CTR reg */
if (arm946e_preserve_cache) {
struct arm946e_common *arm946e = target_to_arm946(target);
/* Get the contents of the CTR reg */
- arm946e_read_cp15(target, CP15_CTL, (uint32_t *) &ctr_reg);
+ arm946e_read_cp15(target, CP15_CTL, &ctr_reg);
/**
* Read-modify-write CP15 control
/**
* Read-modify-write CP15 control
- arm946e_read_cp15(target, 0x16, (uint32_t *) &dtag);
+ retval = arm946e_read_cp15(target, 0x16, &dtag);
+ if (retval != ERROR_OK) {
+ LOG_DEBUG("ERROR reading dtag");
+ return retval;
+ }
/* Check cache line VALID bit */
if (!(dtag >> 4 & 0x1))
/* Check cache line VALID bit */
if (!(dtag >> 4 & 0x1))
- arm946e_read_cp15(target, 0x17, (uint32_t *) &itag);
+ retval = arm946e_read_cp15(target, 0x17, &itag);
+ if (retval != ERROR_OK) {
+ LOG_DEBUG("ERROR reading itag");
+ return retval;
+ }
/* Check cache line VALID bit */
if (!(itag >> 4 & 0x1))
/* Check cache line VALID bit */
if (!(itag >> 4 & 0x1))
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)