Browse Source

xtensa: gdbstub: (cosmetic) simplify a conditional

Move an assignment performed on both "if" branches as the last
operation to after the "if."

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
pull/89914/merge
Guennadi Liakhovetski 1 month ago committed by Dan Kalowsky
parent
commit
1df49e9691
  1. 3
      arch/xtensa/core/gdbstub.c

3
arch/xtensa/core/gdbstub.c

@ -466,11 +466,10 @@ static void copy_to_ctx(struct gdb_ctx *ctx, const struct arch_esf *stack) @@ -466,11 +466,10 @@ static void copy_to_ctx(struct gdb_ctx *ctx, const struct arch_esf *stack)
if (reg->regno == SOC_GDB_REGNO_A1) {
/* A1 is calculated */
reg->val = POINTER_TO_UINT(((char *)bsa) + sizeof(_xtensa_irq_bsa_t));
reg->seqno = ctx->seqno;
} else {
reg->val = bsa[reg->stack_offset / 4];
reg->seqno = ctx->seqno;
}
reg->seqno = ctx->seqno;
}
/* For registers other than logical address registers */

Loading…
Cancel
Save