[PATCH v8 06/15] hw/i386/pc: remove commented out code from x86_load_linux()

Sergio Lopez posted 15 patches 6 years, 1 month ago
Maintainers: "Philippe Mathieu-Daudé" <philmd@redhat.com>, Laszlo Ersek <lersek@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Stefano Stabellini <sstabellini@kernel.org>, Igor Mammedov <imammedo@redhat.com>, Anthony Perard <anthony.perard@citrix.com>, Richard Henderson <rth@twiddle.net>, Eduardo Habkost <ehabkost@redhat.com>, Paul Durrant <paul@xen.org>, Gerd Hoffmann <kraxel@redhat.com>
There is a newer version of this series
[PATCH v8 06/15] hw/i386/pc: remove commented out code from x86_load_linux()
Posted by Sergio Lopez 6 years, 1 month ago
Follow checkpatch.pl recommendation and remove commented out code from
x86_load_linux().

Signed-off-by: Sergio Lopez <slp@redhat.com>
---
 hw/i386/pc.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 90e2d68096..f19d4ac0bd 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1061,9 +1061,6 @@ static void x86_load_linux(PCMachineState *pcms,
     }
 
     /* kernel protocol version */
-#if 0
-    fprintf(stderr, "header magic: %#x\n", ldl_p(header+0x202));
-#endif
     if (ldl_p(header + 0x202) == 0x53726448) {
         protocol = lduw_p(header + 0x206);
     } else {
@@ -1155,16 +1152,6 @@ static void x86_load_linux(PCMachineState *pcms,
         prot_addr    = 0x100000;
     }
 
-#if 0
-    fprintf(stderr,
-            "qemu: real_addr     = 0x" TARGET_FMT_plx "\n"
-            "qemu: cmdline_addr  = 0x" TARGET_FMT_plx "\n"
-            "qemu: prot_addr     = 0x" TARGET_FMT_plx "\n",
-            real_addr,
-            cmdline_addr,
-            prot_addr);
-#endif
-
     /* highest address for loading the initrd */
     if (protocol >= 0x20c &&
         lduw_p(header + 0x236) & XLF_CAN_BE_LOADED_ABOVE_4G) {
-- 
2.21.0


Re: [PATCH v8 06/15] hw/i386/pc: remove commented out code from x86_load_linux()
Posted by Philippe Mathieu-Daudé 6 years, 1 month ago
On 10/10/19 4:31 PM, Sergio Lopez wrote:
> Follow checkpatch.pl recommendation and remove commented out code from
> x86_load_linux().

Traces commented out in bc4edd79ee5, almost 12 years ago, and nobody 
complained, so no need to convert this to trace events :)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Signed-off-by: Sergio Lopez <slp@redhat.com>
> ---
>   hw/i386/pc.c | 13 -------------
>   1 file changed, 13 deletions(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 90e2d68096..f19d4ac0bd 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1061,9 +1061,6 @@ static void x86_load_linux(PCMachineState *pcms,
>       }
>   
>       /* kernel protocol version */
> -#if 0
> -    fprintf(stderr, "header magic: %#x\n", ldl_p(header+0x202));
> -#endif
>       if (ldl_p(header + 0x202) == 0x53726448) {
>           protocol = lduw_p(header + 0x206);
>       } else {
> @@ -1155,16 +1152,6 @@ static void x86_load_linux(PCMachineState *pcms,
>           prot_addr    = 0x100000;
>       }
>   
> -#if 0
> -    fprintf(stderr,
> -            "qemu: real_addr     = 0x" TARGET_FMT_plx "\n"
> -            "qemu: cmdline_addr  = 0x" TARGET_FMT_plx "\n"
> -            "qemu: prot_addr     = 0x" TARGET_FMT_plx "\n",
> -            real_addr,
> -            cmdline_addr,
> -            prot_addr);
> -#endif
> -
>       /* highest address for loading the initrd */
>       if (protocol >= 0x20c &&
>           lduw_p(header + 0x236) & XLF_CAN_BE_LOADED_ABOVE_4G) {
>