diff mbox series

x86/boot: Add braces in reloc.c

Message ID 20240130144838.4119329-1-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series x86/boot: Add braces in reloc.c | expand

Commit Message

Andrew Cooper Jan. 30, 2024, 2:48 p.m. UTC
107 lines is an unreasonably large switch statement to live inside a
brace-less for loop.  Drop the comment that's clumsily trying to cover the
fact that this logic has wrong-looking indentation.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
---
 xen/arch/x86/boot/reloc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


base-commit: 4a7e71aa085170f1a13976507c8e248f8715f116

Comments

Jan Beulich Jan. 30, 2024, 3:14 p.m. UTC | #1
On 30.01.2024 15:48, Andrew Cooper wrote:
> 107 lines is an unreasonably large switch statement to live inside a
> brace-less for loop.  Drop the comment that's clumsily trying to cover the
> fact that this logic has wrong-looking indentation.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/arch/x86/boot/reloc.c b/xen/arch/x86/boot/reloc.c
index 77fdb2be0573..4033557481e8 100644
--- a/xen/arch/x86/boot/reloc.c
+++ b/xen/arch/x86/boot/reloc.c
@@ -230,6 +230,7 @@  static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out)
     /* Put all needed data into mbi_out. */
     for ( tag = _p(ptr); (u32)tag - mbi_in < mbi_fix->total_size;
           tag = _p(ALIGN_UP((u32)tag + tag->size, MULTIBOOT2_TAG_ALIGN)) )
+    {
         switch ( tag->type )
         {
         case MULTIBOOT2_TAG_TYPE_BOOT_LOADER_NAME:
@@ -332,11 +333,12 @@  static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out)
 #endif /* CONFIG_VIDEO */
 
         case MULTIBOOT2_TAG_TYPE_END:
-            goto end; /* Cannot "break;" here. */
+            goto end;
 
         default:
             break;
         }
+    }
 
  end: