* [Qemu-devel] [PATCH v2] qom/object: fix 2 comment typos
@ 2015-11-03 2:36 Cao jin
2015-11-03 13:39 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Cao jin @ 2015-11-03 2:36 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, peter.maydell, afaerber
Also change the misleading definition of macro OBJECT_CLASS_CHECK
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
changelog v2:
modified according to peter`s suggestion
include/qom/object.h | 10 +++++-----
qom/object.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index be7280c..0bb89d4 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -510,16 +510,16 @@ struct TypeInfo
/**
* OBJECT_CLASS_CHECK:
- * @class: The C type to use for the return value.
- * @obj: A derivative of @type to cast.
- * @name: the QOM typename of @class.
+ * @class_type: The C type to use for the return value.
+ * @class: A derivative class of @class_type to cast.
+ * @name: the QOM typename of @class_type.
*
* A type safe version of @object_class_dynamic_cast_assert. This macro is
* typically wrapped by each type to perform type safe casts of a class to a
* specific class type.
*/
-#define OBJECT_CLASS_CHECK(class, obj, name) \
- ((class *)object_class_dynamic_cast_assert(OBJECT_CLASS(obj), (name), \
+#define OBJECT_CLASS_CHECK(class_type, class, name) \
+ ((class_type *)object_class_dynamic_cast_assert(OBJECT_CLASS(class), (name), \
__FILE__, __LINE__, __func__))
/**
diff --git a/qom/object.c b/qom/object.c
index 11cd86b..fc6e161 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -204,7 +204,7 @@ static bool type_is_ancestor(TypeImpl *type, TypeImpl *target_type)
{
assert(target_type);
- /* Check if typename is a direct ancestor of type */
+ /* Check if target_type is a direct ancestor of type */
while (type) {
if (type == target_type) {
return true;
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] qom/object: fix 2 comment typos
2015-11-03 2:36 [Qemu-devel] [PATCH v2] qom/object: fix 2 comment typos Cao jin
@ 2015-11-03 13:39 ` Peter Maydell
2015-11-04 18:23 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2015-11-03 13:39 UTC (permalink / raw)
To: Cao jin; +Cc: QEMU Trivial, QEMU Developers, Andreas Färber
On 3 November 2015 at 02:36, Cao jin <caoj.fnst@cn.fujitsu.com> wrote:
> Also change the misleading definition of macro OBJECT_CLASS_CHECK
>
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] qom/object: fix 2 comment typos
2015-11-03 13:39 ` Peter Maydell
@ 2015-11-04 18:23 ` Andreas Färber
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Färber @ 2015-11-04 18:23 UTC (permalink / raw)
To: Peter Maydell, Cao jin; +Cc: QEMU Trivial, QEMU Developers
Am 03.11.2015 um 14:39 schrieb Peter Maydell:
> On 3 November 2015 at 02:36, Cao jin <caoj.fnst@cn.fujitsu.com> wrote:
>> Also change the misleading definition of macro OBJECT_CLASS_CHECK
>>
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Thanks, applied to qom-next (tweaking the commit message):
https://github.com/afaerber/qemu-cpu/commits/qom-next
Regards,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-04 18:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 2:36 [Qemu-devel] [PATCH v2] qom/object: fix 2 comment typos Cao jin
2015-11-03 13:39 ` Peter Maydell
2015-11-04 18:23 ` Andreas Färber
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).