[PATCH v2 1/2] hw/timer/hpet: Remove dead code

Philippe Mathieu-Daudé posted 2 patches 5 years, 5 months ago
[PATCH v2 1/2] hw/timer/hpet: Remove dead code
Posted by Philippe Mathieu-Daudé 5 years, 5 months ago
This code was never compiled/used, remove it.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/timer/hpet.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index 380acfa7c8a..b683f64f1d3 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -416,20 +416,6 @@ static void hpet_del_timer(HPETTimer *t)
     update_irq(t, 0);
 }
 
-#ifdef HPET_DEBUG
-static uint32_t hpet_ram_readb(void *opaque, hwaddr addr)
-{
-    printf("qemu: hpet_read b at %" PRIx64 "\n", addr);
-    return 0;
-}
-
-static uint32_t hpet_ram_readw(void *opaque, hwaddr addr)
-{
-    printf("qemu: hpet_read w at %" PRIx64 "\n", addr);
-    return 0;
-}
-#endif
-
 static uint64_t hpet_ram_read(void *opaque, hwaddr addr,
                               unsigned size)
 {
-- 
2.26.2

Re: [PATCH v2 1/2] hw/timer/hpet: Remove dead code
Posted by Li Qiang 5 years, 5 months ago
Philippe Mathieu-Daudé <philmd@redhat.com> 于2020年9月10日周四 下午10:01写道:
>
> This code was never compiled/used, remove it.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/timer/hpet.c | 14 --------------
>  1 file changed, 14 deletions(-)
>
> diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
> index 380acfa7c8a..b683f64f1d3 100644
> --- a/hw/timer/hpet.c
> +++ b/hw/timer/hpet.c

Maybe we also remove the
"//#define HPET_DEBUG"
in the head of this file?

Thanks,
Li Qiang

> @@ -416,20 +416,6 @@ static void hpet_del_timer(HPETTimer *t)
>      update_irq(t, 0);
>  }
>
> -#ifdef HPET_DEBUG
> -static uint32_t hpet_ram_readb(void *opaque, hwaddr addr)
> -{
> -    printf("qemu: hpet_read b at %" PRIx64 "\n", addr);
> -    return 0;
> -}
> -
> -static uint32_t hpet_ram_readw(void *opaque, hwaddr addr)
> -{
> -    printf("qemu: hpet_read w at %" PRIx64 "\n", addr);
> -    return 0;
> -}
> -#endif
> -
>  static uint64_t hpet_ram_read(void *opaque, hwaddr addr,
>                                unsigned size)
>  {
> --
> 2.26.2
>
>

Re: [PATCH v2 1/2] hw/timer/hpet: Remove dead code
Posted by Philippe Mathieu-Daudé 5 years, 5 months ago
On 9/10/20 4:46 PM, Li Qiang wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> 于2020年9月10日周四 下午10:01写道:
>>
>> This code was never compiled/used, remove it.
>>
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  hw/timer/hpet.c | 14 --------------
>>  1 file changed, 14 deletions(-)
>>
>> diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
>> index 380acfa7c8a..b683f64f1d3 100644
>> --- a/hw/timer/hpet.c
>> +++ b/hw/timer/hpet.c
> 
> Maybe we also remove the
> "//#define HPET_DEBUG"
> in the head of this file?

We need to convert the debug calls to trace events first.

> 
> Thanks,
> Li Qiang
> 
>> @@ -416,20 +416,6 @@ static void hpet_del_timer(HPETTimer *t)
>>      update_irq(t, 0);
>>  }
>>
>> -#ifdef HPET_DEBUG
>> -static uint32_t hpet_ram_readb(void *opaque, hwaddr addr)
>> -{
>> -    printf("qemu: hpet_read b at %" PRIx64 "\n", addr);
>> -    return 0;
>> -}
>> -
>> -static uint32_t hpet_ram_readw(void *opaque, hwaddr addr)
>> -{
>> -    printf("qemu: hpet_read w at %" PRIx64 "\n", addr);
>> -    return 0;
>> -}
>> -#endif
>> -
>>  static uint64_t hpet_ram_read(void *opaque, hwaddr addr,
>>                                unsigned size)
>>  {
>> --
>> 2.26.2
>>
>>
>