From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQw8N-0006bk-Vq for qemu-devel@nongnu.org; Wed, 03 Feb 2016 07:02:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQw8J-0004Q0-Uk for qemu-devel@nongnu.org; Wed, 03 Feb 2016 07:02:07 -0500 References: <1454469583-15753-1-git-send-email-caoj.fnst@cn.fujitsu.com> <56B1A88C.6020604@msgid.tls.msk.ru> <87k2mmxhk9.fsf@blackfin.pond.sub.org> From: Cao jin Message-ID: <56B1EC4F.8040109@cn.fujitsu.com> Date: Wed, 3 Feb 2016 20:02:23 +0800 MIME-Version: 1.0 In-Reply-To: <87k2mmxhk9.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] Fix inconsistency between comment and variable name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Michael Tokarev Cc: qemu-trivial@nongnu.org, imammedo@redhat.com, qemu-devel@nongnu.org, mst@redhat.com On 02/03/2016 05:35 PM, Markus Armbruster wrote: > Michael Tokarev writes: > >> 03.02.2016 06:19, Cao jin wrote: >>> Signed-off-by: Cao jin >>> --- >>> 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