This is an automated email from Gerrit. Andrey Smirnov ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/2057
-- gerrit commit 2506df4f24f1a6588947639470e57cfde334f501 Author: Andrey Smirnov <[email protected]> Date: Wed Mar 19 08:20:36 2014 -0700 armv7m: Do not ignore 'value' parameter in armv7m_write_core_reg Ignoring the value parameter in that function makes its code rather misleading. Also the only caller of it, armv7m_restore_context already does the whole "buf_get_u32" conversion business, so using 'value' also removes the waste of doing the conversion twice. Signed-off-by: Andrey Smirnov <[email protected]> Change-Id: I515979c314d9b59ee1065c55b5bb5747c7e93f01 diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 7716139..7ed3cc4 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -216,17 +216,15 @@ static int armv7m_write_core_reg(struct target *target, struct reg *r, int num, enum arm_mode mode, uint32_t value) { int retval; - uint32_t reg_value; struct arm_reg *armv7m_core_reg; struct armv7m_common *armv7m = target_to_armv7m(target); assert(num < (int)armv7m->arm.core_cache->num_regs); - reg_value = buf_get_u32(armv7m->arm.core_cache->reg_list[num].value, 0, 32); armv7m_core_reg = armv7m->arm.core_cache->reg_list[num].arch_info; retval = armv7m->store_core_reg_u32(target, - armv7m_core_reg->num, - reg_value); + armv7m_core_reg->num, + value); if (retval != ERROR_OK) { LOG_ERROR("JTAG failure"); armv7m->arm.core_cache->reg_list[num].dirty = armv7m->arm.core_cache->reg_list[num].valid; -- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
