All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86emul/test: correct loop body indentation in evex-disp8.c:test_one()
@ 2024-10-16  7:45 Jan Beulich
  2024-10-16 10:06 ` Alejandro Vallejo
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2024-10-16  7:45 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org; +Cc: Andrew Cooper, Roger Pau Monné

For some reason I entirely consistently screwed these up.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/tests/x86_emulator/evex-disp8.c
+++ b/tools/tests/x86_emulator/evex-disp8.c
@@ -905,8 +905,8 @@ static void test_one(const struct test *
         goto fail;
 
     for ( i = 0; i < (test->scale == SC_vl ? vsz : esz); ++i )
-         if ( accessed[i] )
-             goto fail;
+        if ( accessed[i] )
+            goto fail;
 
     n = test->scale == SC_vl ? vsz : esz;
     if ( !sg )
@@ -917,13 +917,13 @@ static void test_one(const struct test *
         ++n;
 
     for ( ; i < n; ++i )
-         if ( accessed[i] != (sg ? (vsz / esz) >> (test->opc & 1 & !evex.w)
-                                 : 1) )
-             goto fail;
+        if ( accessed[i] != (sg ? (vsz / esz) >> (test->opc & 1 & !evex.w)
+                                : 1) )
+            goto fail;
 
     for ( ; i < ARRAY_SIZE(accessed); ++i )
-         if ( accessed[i] )
-             goto fail;
+        if ( accessed[i] )
+            goto fail;
 
     /* Also check the broadcast case, if available. */
     if ( test->vsz >= VSZ_el || test->scale != SC_vl )
@@ -954,14 +954,14 @@ static void test_one(const struct test *
         goto fail;
 
     for ( i = 0; i < esz; ++i )
-         if ( accessed[i] )
-             goto fail;
+        if ( accessed[i] )
+            goto fail;
     for ( ; i < esz * 2; ++i )
-         if ( accessed[i] != 1 )
-             goto fail;
+        if ( accessed[i] != 1 )
+            goto fail;
     for ( ; i < ARRAY_SIZE(accessed); ++i )
-         if ( accessed[i] )
-             goto fail;
+        if ( accessed[i] )
+            goto fail;
 
     return;
 


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

* Re: [PATCH] x86emul/test: correct loop body indentation in evex-disp8.c:test_one()
  2024-10-16  7:45 [PATCH] x86emul/test: correct loop body indentation in evex-disp8.c:test_one() Jan Beulich
@ 2024-10-16 10:06 ` Alejandro Vallejo
  2024-10-16 10:15   ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Vallejo @ 2024-10-16 10:06 UTC (permalink / raw)
  To: Jan Beulich, xen-devel@lists.xenproject.org
  Cc: Andrew Cooper, Roger Pau Monné

On Wed Oct 16, 2024 at 8:45 AM BST, Jan Beulich wrote:
> For some reason I entirely consistently screwed these up.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

  Reviewed-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>

We should really give another push to the clang-format effort. This whole class
of mistakes would be a thing of the past.

Cheers,
Alejandro


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

* Re: [PATCH] x86emul/test: correct loop body indentation in evex-disp8.c:test_one()
  2024-10-16 10:06 ` Alejandro Vallejo
@ 2024-10-16 10:15   ` Jan Beulich
  2024-10-16 12:22     ` Alejandro Vallejo
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2024-10-16 10:15 UTC (permalink / raw)
  To: Alejandro Vallejo
  Cc: Andrew Cooper, Roger Pau Monné,
	xen-devel@lists.xenproject.org

On 16.10.2024 12:06, Alejandro Vallejo wrote:
> On Wed Oct 16, 2024 at 8:45 AM BST, Jan Beulich wrote:
>> For some reason I entirely consistently screwed these up.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
>   Reviewed-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>

Thanks.

> We should really give another push to the clang-format effort. This whole class
> of mistakes would be a thing of the past.

For issues like the one here it would depend on whether that would also be
applied to (parts of) tool stack code. The plans, iirc, were mainly to cover
the xen/ subtree.

Jan


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

* Re: [PATCH] x86emul/test: correct loop body indentation in evex-disp8.c:test_one()
  2024-10-16 10:15   ` Jan Beulich
@ 2024-10-16 12:22     ` Alejandro Vallejo
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Vallejo @ 2024-10-16 12:22 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Andrew Cooper, Roger Pau Monné,
	xen-devel@lists.xenproject.org

On Wed Oct 16, 2024 at 11:15 AM BST, Jan Beulich wrote:
> On 16.10.2024 12:06, Alejandro Vallejo wrote:
> > On Wed Oct 16, 2024 at 8:45 AM BST, Jan Beulich wrote:
> >> For some reason I entirely consistently screwed these up.
> >>
> >> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> > 
> >   Reviewed-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
>
> Thanks.
>
> > We should really give another push to the clang-format effort. This whole class
> > of mistakes would be a thing of the past.
>
> For issues like the one here it would depend on whether that would also be
> applied to (parts of) tool stack code. The plans, iirc, were mainly to cover
> the xen/ subtree.
>
> Jan

True, but AIUI that was merely an act of scope reduction for the sake of
getting something merged in a finite time frame. In an ideal world the whole
codebase would be covered, and I think this was a shared sentiment among those
in favour.

Cheers,
Alejandro


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

end of thread, other threads:[~2024-10-16 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16  7:45 [PATCH] x86emul/test: correct loop body indentation in evex-disp8.c:test_one() Jan Beulich
2024-10-16 10:06 ` Alejandro Vallejo
2024-10-16 10:15   ` Jan Beulich
2024-10-16 12:22     ` Alejandro Vallejo

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.