qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 20:02:23 +0800	[thread overview]
Message-ID: <56B1EC4F.8040109@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.
>
> ?
>
>

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

      parent reply	other threads:[~2016-02-03 12:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=56B1EC4F.8040109@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).