All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OP_SWITCH should use 'insn->cond' instead of 'insn->target'
@ 2016-11-22 16:32 Luc Van Oostenryck
  2016-11-23  1:16 ` Christopher Li
  2017-02-06 20:33 ` Luc Van Oostenryck
  0 siblings, 2 replies; 4+ messages in thread
From: Luc Van Oostenryck @ 2016-11-22 16:32 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

From: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>

show_instruction() uses the field 'target' to display OP_SWITCH
instruction instead of 'cond' like OP_BR does.
It doesn't change anything since these two fields use the same
storage inside struct instruction but better to use the right field
to keep consistent.
---
 linearize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linearize.c b/linearize.c
index c6ada1e8..31d2a6cd 100644
--- a/linearize.c
+++ b/linearize.c
@@ -357,7 +357,7 @@ const char *show_instruction(struct instruction *insn)
 	}
 	case OP_SWITCH: {
 		struct multijmp *jmp;
-		buf += sprintf(buf, "%s", show_pseudo(insn->target));
+		buf += sprintf(buf, "%s", show_pseudo(insn->cond));
 		FOR_EACH_PTR(insn->multijmp_list, jmp) {
 			if (jmp->begin == jmp->end)
 				buf += sprintf(buf, ", %d -> .L%p", jmp->begin, jmp->target);
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] OP_SWITCH should use 'insn->cond' instead of 'insn->target'
  2016-11-22 16:32 [PATCH] OP_SWITCH should use 'insn->cond' instead of 'insn->target' Luc Van Oostenryck
@ 2016-11-23  1:16 ` Christopher Li
  2017-02-06 20:33 ` Luc Van Oostenryck
  1 sibling, 0 replies; 4+ messages in thread
From: Christopher Li @ 2016-11-23  1:16 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: Linux-Sparse, Luc Van Oostenryck

On Wed, Nov 23, 2016 at 12:32 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> From: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>
>
> show_instruction() uses the field 'target' to display OP_SWITCH
> instruction instead of 'cond' like OP_BR does.
> It doesn't change anything since these two fields use the same
> storage inside struct instruction but better to use the right field
> to keep consistent.

Looks good to me. Will apply.

Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] OP_SWITCH should use 'insn->cond' instead of 'insn->target'
  2016-11-22 16:32 [PATCH] OP_SWITCH should use 'insn->cond' instead of 'insn->target' Luc Van Oostenryck
  2016-11-23  1:16 ` Christopher Li
@ 2017-02-06 20:33 ` Luc Van Oostenryck
  2017-02-06 23:16   ` Christopher Li
  1 sibling, 1 reply; 4+ messages in thread
From: Luc Van Oostenryck @ 2017-02-06 20:33 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

On Tue, Nov 22, 2016 at 05:32:33PM +0100, Luc Van Oostenryck wrote:
> From: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>
> 
> show_instruction() uses the field 'target' to display OP_SWITCH
> instruction instead of 'cond' like OP_BR does.
> It doesn't change anything since these two fields use the same
> storage inside struct instruction but better to use the right field
> to keep consistent.
> ---
>  linearize.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is my s-o-b that I had forgot to add:
    Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] OP_SWITCH should use 'insn->cond' instead of 'insn->target'
  2017-02-06 20:33 ` Luc Van Oostenryck
@ 2017-02-06 23:16   ` Christopher Li
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Li @ 2017-02-06 23:16 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: Linux-Sparse, Luc Van Oostenryck

On Tue, Feb 7, 2017 at 4:33 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> Here is my s-o-b that I had forgot to add:
>     Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

The sparse-next branch has been updated to include your s-o-b with other
two patches.

Thanks for all the patches.

Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-06 23:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 16:32 [PATCH] OP_SWITCH should use 'insn->cond' instead of 'insn->target' Luc Van Oostenryck
2016-11-23  1:16 ` Christopher Li
2017-02-06 20:33 ` Luc Van Oostenryck
2017-02-06 23:16   ` Christopher Li

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.