All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name
@ 2016-02-03  3:19 Cao jin
  2016-02-03  7:13 ` Michael Tokarev
  0 siblings, 1 reply; 5+ messages in thread
From: Cao jin @ 2016-02-03  3:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, imammedo, mst

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
 include/hw/qdev-core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index abcdee8..42fa5db 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -221,7 +221,7 @@ typedef struct BusChild {
 
 /**
  * BusState:
- * @hotplug_device: link to a hotplug device associated with bus.
+ * @hotplug_handler: link to a hotplug device associated with bus.
  */
 struct BusState {
     Object obj;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name
  2016-02-03  3:19 [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name Cao jin
@ 2016-02-03  7:13 ` Michael Tokarev
  2016-02-03  9:35   ` Markus Armbruster
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Tokarev @ 2016-02-03  7:13 UTC (permalink / raw)
  To: Cao jin, qemu-devel; +Cc: qemu-trivial, imammedo, mst

03.02.2016 06:19, Cao jin wrote:
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
>  include/hw/qdev-core.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index abcdee8..42fa5db 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -221,7 +221,7 @@ typedef struct BusChild {
>  
>  /**
>   * BusState:
> - * @hotplug_device: link to a hotplug device associated with bus.
> + * @hotplug_handler: link to a hotplug device associated with bus.

Hmm.  Now while the field name in comment and in the structure
do match, the comment is still wrong, since it is a linke to
a handler, not a device… :)

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name
  2016-02-03  7:13 ` Michael Tokarev
@ 2016-02-03  9:35   ` Markus Armbruster
  2016-02-03 10:51     ` Cao jin
  2016-02-03 12:02     ` Cao jin
  0 siblings, 2 replies; 5+ messages in thread
From: Markus Armbruster @ 2016-02-03  9:35 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-trivial, imammedo, Cao jin, qemu-devel, mst

Michael Tokarev <mjt@tls.msk.ru> writes:

> 03.02.2016 06:19, Cao jin wrote:
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>>  include/hw/qdev-core.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
>> index abcdee8..42fa5db 100644
>> --- a/include/hw/qdev-core.h
>> +++ b/include/hw/qdev-core.h
>> @@ -221,7 +221,7 @@ typedef struct BusChild {
>>  
>>  /**
>>   * BusState:
>> - * @hotplug_device: link to a hotplug device associated with bus.
>> + * @hotplug_handler: link to a hotplug device associated with bus.
>
> Hmm.  Now while the field name in comment and in the structure
> do match, the comment is still wrong, since it is a linke to
> a handler, not a device… :)

Do you mean to suggest the line should be changed to

 * @hotplug_device: link to a hotplug handler associated with bus.

?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name
  2016-02-03  9:35   ` Markus Armbruster
@ 2016-02-03 10:51     ` Cao jin
  2016-02-03 12:02     ` Cao jin
  1 sibling, 0 replies; 5+ messages in thread
From: Cao jin @ 2016-02-03 10:51 UTC (permalink / raw)
  To: Markus Armbruster, Michael Tokarev
  Cc: qemu-trivial, imammedo, qemu-devel, mst



On 02/03/2016 05:35 PM, Markus Armbruster wrote:
> Michael Tokarev <mjt@tls.msk.ru> writes:
>
>> 03.02.2016 06:19, Cao jin wrote:
>>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>>> ---
>>>   include/hw/qdev-core.h | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
>>> index abcdee8..42fa5db 100644
>>> --- a/include/hw/qdev-core.h
>>> +++ b/include/hw/qdev-core.h
>>> @@ -221,7 +221,7 @@ typedef struct BusChild {
>>>
>>>   /**
>>>    * BusState:
>>> - * @hotplug_device: link to a hotplug device associated with bus.
>>> + * @hotplug_handler: link to a hotplug device associated with bus.
>>
>> Hmm.  Now while the field name in comment and in the structure
>> do match, the comment is still wrong, since it is a linke to
>> a handler, not a device… :)
>
> Do you mean to suggest the line should be changed to
>
>   * @hotplug_device: link to a hotplug handler associated with bus.
>
> ?
>

If I understand it right, hotplug_handler is a link property of 
BusState, see qbus_initfn(). Tt actually points to a device, see 
qbus_set_hotplug_handler(), and the actually hotplug handler is reside 
in this device, see how qdev_get_hotplug_handler() is used.

So, base on the talking above, the original comment could be understood 
by me:)

-- 
Yours Sincerely,

Cao jin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name
  2016-02-03  9:35   ` Markus Armbruster
  2016-02-03 10:51     ` Cao jin
@ 2016-02-03 12:02     ` Cao jin
  1 sibling, 0 replies; 5+ messages in thread
From: Cao jin @ 2016-02-03 12:02 UTC (permalink / raw)
  To: Markus Armbruster, Michael Tokarev
  Cc: qemu-trivial, imammedo, qemu-devel, mst



On 02/03/2016 05:35 PM, Markus Armbruster wrote:
> Michael Tokarev <mjt@tls.msk.ru> writes:
>
>> 03.02.2016 06:19, Cao jin wrote:
>>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>>> ---
>>>   include/hw/qdev-core.h | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
>>> index abcdee8..42fa5db 100644
>>> --- a/include/hw/qdev-core.h
>>> +++ b/include/hw/qdev-core.h
>>> @@ -221,7 +221,7 @@ typedef struct BusChild {
>>>
>>>   /**
>>>    * BusState:
>>> - * @hotplug_device: link to a hotplug device associated with bus.
>>> + * @hotplug_handler: link to a hotplug device associated with bus.
>>
>> Hmm.  Now while the field name in comment and in the structure
>> do match, the comment is still wrong, since it is a linke to
>> a handler, not a device… :)
>
> Do you mean to suggest the line should be changed to
>
>   * @hotplug_device: link to a hotplug handler associated with bus.
>
> ?
>
>

And sometimes a hotplug handler could be a bus, see 
qbus_set_bus_hotplug_handler(). on both case(device & bus), the actual 
hotplug handler called at last is a TYPE_HOTPLUG_HANDLER which reside in 
that device/bus, so I guess, the @hotplug_handler maybe fine:)

anyway, these terms could easily confuse newbies

-- 
Yours Sincerely,

Cao jin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-03 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03  3:19 [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name Cao jin
2016-02-03  7:13 ` Michael Tokarev
2016-02-03  9:35   ` Markus Armbruster
2016-02-03 10:51     ` Cao jin
2016-02-03 12:02     ` Cao jin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.