From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aQv29-0007nq-7i for mharc-qemu-trivial@gnu.org; Wed, 03 Feb 2016 05:51:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQv26-0007jt-A2 for qemu-trivial@nongnu.org; Wed, 03 Feb 2016 05:51:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQv25-0003X2-FV for qemu-trivial@nongnu.org; Wed, 03 Feb 2016 05:51:34 -0500 Received: from [59.151.112.132] (port=2340 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQv21-0003WJ-1L; Wed, 03 Feb 2016 05:51:29 -0500 X-IronPort-AV: E=Sophos;i="5.20,346,1444665600"; d="scan'208";a="3276658" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 03 Feb 2016 18:51:24 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 337BB4219162; Wed, 3 Feb 2016 18:50:29 +0800 (CST) Received: from [10.167.226.69] (10.167.226.69) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 3 Feb 2016 18:51:21 +0800 To: Markus Armbruster , Michael Tokarev 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: <56B1DBC0.8090903@cn.fujitsu.com> Date: Wed, 3 Feb 2016 18:51:44 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 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 X-Originating-IP: [10.167.226.69] X-yoursite-MailScanner-ID: 337BB4219162.A6204 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 59.151.112.132 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 X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 10:51:35 -0000 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. > > ? > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQv24-0007iy-JT for qemu-devel@nongnu.org; Wed, 03 Feb 2016 05:51:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQv21-0003Wh-DI for qemu-devel@nongnu.org; Wed, 03 Feb 2016 05:51:32 -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: <56B1DBC0.8090903@cn.fujitsu.com> Date: Wed, 3 Feb 2016 18:51:44 +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. > > ? > 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