diff mbox series

[v2,1/3] audio: use TYPE_WM8750 instead of a hardcoded string

Message ID 20181012083008.29027-2-maozhongyi@cmss.chinamobile.com
State New
Headers show
Series use object link instead of qdev property | expand

Commit Message

Mao Zhongyi Oct. 12, 2018, 8:30 a.m. UTC
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-arm@nongnu.org

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/musicpal.c          | 2 +-
 hw/audio/marvell_88w8618.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Oct. 12, 2018, 9:50 a.m. UTC | #1
On 12/10/2018 10:30, Mao Zhongyi wrote:
> Cc: Jan Kiszka <jan.kiszka@web.de>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> To: qemu-arm@nongnu.org

"To: qemu-arm@nongnu.org" is probably not relevant in the commit message.

The Linux kernel describes the 'Cc:' line in the "Submitting patches:
the essential guide to getting your code into the kernel" document as:

  If a person has had the opportunity to comment on a patch, but has not
  provided such comments, you may optionally add a Cc: tag to the patch.
  This is the only tag which might be added without an explicit action
  by the person it names - but it should indicate that this person was
  copied on the patch. This tag documents that potentially interested
  parties have been included in the discussion.

> 
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/arm/musicpal.c          | 2 +-
>  hw/audio/marvell_88w8618.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
> index c807010e83..3dafb41b0b 100644
> --- a/hw/arm/musicpal.c
> +++ b/hw/arm/musicpal.c
> @@ -1695,7 +1695,7 @@ static void musicpal_init(MachineState *machine)
>      wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
>      dev = qdev_create(NULL, "mv88w8618_audio");
>      s = SYS_BUS_DEVICE(dev);
> -    qdev_prop_set_ptr(dev, "wm8750", wm8750_dev);
> +    qdev_prop_set_ptr(dev, TYPE_WM8750, wm8750_dev);
>      qdev_init_nofail(dev);
>      sysbus_mmio_map(s, 0, MP_AUDIO_BASE);
>      sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]);
> diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c
> index e546892d3c..cf6ce6979b 100644
> --- a/hw/audio/marvell_88w8618.c
> +++ b/hw/audio/marvell_88w8618.c
> @@ -280,7 +280,7 @@ static const VMStateDescription mv88w8618_audio_vmsd = {
>  };
>  
>  static Property mv88w8618_audio_properties[] = {
> -    DEFINE_PROP_PTR("wm8750", mv88w8618_audio_state, wm),
> +    DEFINE_PROP_PTR(TYPE_WM8750, mv88w8618_audio_state, wm),
>      {/* end of list */},
>  };
>  
>
Mao Zhongyi Oct. 12, 2018, 10:14 a.m. UTC | #2
Hi, Philippe

On 10/12/18 5:50 PM, Philippe Mathieu-Daudé wrote:
> On 12/10/2018 10:30, Mao Zhongyi wrote:
>> Cc: Jan Kiszka <jan.kiszka@web.de>
>> Cc: Peter Maydell <peter.maydell@linaro.org>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> To: qemu-arm@nongnu.org
> 
> "To: qemu-arm@nongnu.org" is probably not relevant in the commit message.
> 
> The Linux kernel describes the 'Cc:' line in the "Submitting patches:
> the essential guide to getting your code into the kernel" document as:
> 
>    If a person has had the opportunity to comment on a patch, but has not
>    provided such comments, you may optionally add a Cc: tag to the patch.
>    This is the only tag which might be added without an explicit action
>    by the person it names - but it should indicate that this person was
>    copied on the patch. This tag documents that potentially interested
>    parties have been included in the discussion.

I got it, thank you very much for the detailed explanation. I will 
remove it. :)

Thanks,
Mao


>>
>> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   hw/arm/musicpal.c          | 2 +-
>>   hw/audio/marvell_88w8618.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
>> index c807010e83..3dafb41b0b 100644
>> --- a/hw/arm/musicpal.c
>> +++ b/hw/arm/musicpal.c
>> @@ -1695,7 +1695,7 @@ static void musicpal_init(MachineState *machine)
>>       wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
>>       dev = qdev_create(NULL, "mv88w8618_audio");
>>       s = SYS_BUS_DEVICE(dev);
>> -    qdev_prop_set_ptr(dev, "wm8750", wm8750_dev);
>> +    qdev_prop_set_ptr(dev, TYPE_WM8750, wm8750_dev);
>>       qdev_init_nofail(dev);
>>       sysbus_mmio_map(s, 0, MP_AUDIO_BASE);
>>       sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]);
>> diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c
>> index e546892d3c..cf6ce6979b 100644
>> --- a/hw/audio/marvell_88w8618.c
>> +++ b/hw/audio/marvell_88w8618.c
>> @@ -280,7 +280,7 @@ static const VMStateDescription mv88w8618_audio_vmsd = {
>>   };
>>   
>>   static Property mv88w8618_audio_properties[] = {
>> -    DEFINE_PROP_PTR("wm8750", mv88w8618_audio_state, wm),
>> +    DEFINE_PROP_PTR(TYPE_WM8750, mv88w8618_audio_state, wm),
>>       {/* end of list */},
>>   };
>>   
>>
>
diff mbox series

Patch

diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index c807010e83..3dafb41b0b 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -1695,7 +1695,7 @@  static void musicpal_init(MachineState *machine)
     wm8750_dev = i2c_create_slave(i2c, TYPE_WM8750, MP_WM_ADDR);
     dev = qdev_create(NULL, "mv88w8618_audio");
     s = SYS_BUS_DEVICE(dev);
-    qdev_prop_set_ptr(dev, "wm8750", wm8750_dev);
+    qdev_prop_set_ptr(dev, TYPE_WM8750, wm8750_dev);
     qdev_init_nofail(dev);
     sysbus_mmio_map(s, 0, MP_AUDIO_BASE);
     sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]);
diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c
index e546892d3c..cf6ce6979b 100644
--- a/hw/audio/marvell_88w8618.c
+++ b/hw/audio/marvell_88w8618.c
@@ -280,7 +280,7 @@  static const VMStateDescription mv88w8618_audio_vmsd = {
 };
 
 static Property mv88w8618_audio_properties[] = {
-    DEFINE_PROP_PTR("wm8750", mv88w8618_audio_state, wm),
+    DEFINE_PROP_PTR(TYPE_WM8750, mv88w8618_audio_state, wm),
     {/* end of list */},
 };