Re: [Qemu-devel] [PATCH 19/29] disas: use QEMU_IS_ALIGNED macro

2017-07-24 Thread Eric Blake
On 07/23/2017 09:52 AM, Paolo Bonzini wrote: > > But I agree that QEMU_IS_ALIGNED looks weird here. I think it should > mostly be used when the argument is a pointer, to hide the cast. Uses > for non-pointer arguments should be decided on a one-by-one basis; "is > the first argument an

Re: [Qemu-devel] [PATCH 19/29] disas: use QEMU_IS_ALIGNED macro

2017-07-23 Thread Paolo Bonzini
On 18/07/2017 16:43, Thomas Huth wrote: > On 18.07.2017 13:07, Marc-André Lureau wrote: >> Hi >> >> On Mon, Jul 17, 2017 at 11:09 PM, Philippe Mathieu-Daudé >> wrote: >>> Applied using the Coccinelle semantic patch >>> scripts/coccinelle/use_osdep.cocci > [...] >>> diff --git

Re: [Qemu-devel] [PATCH 19/29] disas: use QEMU_IS_ALIGNED macro

2017-07-18 Thread Thomas Huth
On 18.07.2017 13:07, Marc-André Lureau wrote: > Hi > > On Mon, Jul 17, 2017 at 11:09 PM, Philippe Mathieu-Daudé > wrote: >> Applied using the Coccinelle semantic patch >> scripts/coccinelle/use_osdep.cocci [...] >> diff --git a/disas.c b/disas.c >> index d335c55bbf..8b59448286

Re: [Qemu-devel] [PATCH 19/29] disas: use QEMU_IS_ALIGNED macro

2017-07-18 Thread Marc-André Lureau
Hi On Mon, Jul 17, 2017 at 11:09 PM, Philippe Mathieu-Daudé wrote: > Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- >

Re: [Qemu-devel] [PATCH 19/29] disas: use QEMU_IS_ALIGNED macro

2017-07-18 Thread Michael Tokarev
18.07.2017 09:09, Philippe Mathieu-Daudé wrote: > @@ -151,7 +151,7 @@ static int print_insn_objdump(bfd_vma pc, > disassemble_info *info, > info->read_memory_func(pc, buf, n, info); > > for (i = 0; i < n; ++i) { > -if (i % 32 == 0) { > +if (QEMU_IS_ALIGNED(i, 32)) { >

[Qemu-devel] [PATCH 19/29] disas: use QEMU_IS_ALIGNED macro

2017-07-18 Thread Philippe Mathieu-Daudé
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé --- There is no entry for this file in MAINTAINERS, should it go under TCG/Overall? disas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git