[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/boot: Add braces in reloc.c


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 30 Jan 2024 14:48:38 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 30 Jan 2024 14:48:57 +0000
  • Ironport-data: A9a23:tydG/q5mIuDBknvFX2cN1QxRtHXHchMFZxGqfqrLsTDasY5as4F+v jBKUW7UPfuCYGr9cowgYIux9UkP7MTUydMyTQU9ri1nHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRG/ykTraCY3gtLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9lU34ZwehBtC5gZiPakR7QeE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m0 LsjGApSS026iM2o0O/8V7BuhOM7FZy+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmRJUIXUrsUIMtWcOOAr3/zaTBH7nmSorI6+TP7xw1tyrn9dtHSf7RmQO0MxBbJ9 jiXpj2R7hcybP7E5jaDq1mWosTKnGDhG7k7GYeI36s/6LGU7jNKU0BHPbehmtGph0j7V99BJ kg8/is1sbN05EGtVsP6XRCzvDiDpBF0c/h6HvA+6QqN4rHJ+AvfDW8BJhZebPQ2uclwQiYlv mJlhPuwW2Yp6ufMDyvAp/HL9VteJBT5M0cnIhQ0d1QgvuDsj58j01XSF9RhN7aM24id9S7L/ 9yakMQvr+xM1ZBVjvTqogyvvt66mnTeoucICuTrsoGNtFoRiHaNPdDA1LQixa8owHylZleAp mMYvMOV8foDC5qA/ATUH71TQezyu6vZYGyC6bKKI3XH327xk5JEVdkOiAyS2W8zappUEdMXS BG7VfxtCG97YyLxMP4fj3OZAMU216nwfenYugTvRoMWOPBZLVbXlByCkGbMhwgBZmBwy/BgU XpaGO7wZUsn5VNPlWDuF7pNjOF0mEjTBwr7HPjG8vhu6pLGDFb9dFvPGALXBgzlxMtoeDnoz us=
  • Ironport-hdrordr: A9a23:hX3n/qiLvUrX15STy1h7W7HC/3BQXtYji2hC6mlwRA09TySZ// rBoB19726StN9xYgBFpTnuAsm9qB/nmaKdgrNhWItKPjOW21dARbsKheCJrgEIcxeOkNK1vp 0AT0ERMrLN5CBB/KTH3DU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
 xen/arch/x86/boot/reloc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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:
 

base-commit: 4a7e71aa085170f1a13976507c8e248f8715f116
-- 
2.30.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.