From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Markus Armbruster <armbru@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, imammedo@redhat.com,
qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name
Date: Wed, 3 Feb 2016 18:51:44 +0800 [thread overview]
Message-ID: <56B1DBC0.8090903@cn.fujitsu.com> (raw)
In-Reply-To: <87k2mmxhk9.fsf@blackfin.pond.sub.org>
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
WARNING: multiple messages have this Message-ID (diff)
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Markus Armbruster <armbru@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, imammedo@redhat.com,
qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name
Date: Wed, 3 Feb 2016 18:51:44 +0800 [thread overview]
Message-ID: <56B1DBC0.8090903@cn.fujitsu.com> (raw)
In-Reply-To: <87k2mmxhk9.fsf@blackfin.pond.sub.org>
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
next prev parent reply other threads:[~2016-02-03 10:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 3:19 [Qemu-trivial] [PATCH] Fix inconsistency between comment and variable name Cao jin
2016-02-03 3:19 ` [Qemu-devel] " Cao jin
2016-02-03 7:13 ` [Qemu-trivial] " Michael Tokarev
2016-02-03 7:13 ` [Qemu-devel] " Michael Tokarev
2016-02-03 9:35 ` [Qemu-trivial] " Markus Armbruster
2016-02-03 9:35 ` Markus Armbruster
2016-02-03 10:51 ` Cao jin [this message]
2016-02-03 10:51 ` Cao jin
2016-02-03 12:02 ` [Qemu-trivial] " Cao jin
2016-02-03 12:02 ` Cao jin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56B1DBC0.8090903@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=armbru@redhat.com \
--cc=imammedo@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.