From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: qemu-trivial <qemu-trivial@nongnu.org>, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] Emulated CCID card: QOMify
Date: Tue, 2 Feb 2016 16:25:48 +0800 [thread overview]
Message-ID: <56B0680C.8050200@cn.fujitsu.com> (raw)
In-Reply-To: <56B0658A.20605@msgid.tls.msk.ru>
On 02/02/2016 04:15 PM, Michael Tokarev wrote:
> 01.02.2016 09:53, Cao jin wrote:
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>> hw/usb/ccid-card-emulated.c | 20 +++++++++-----------
>> hw/usb/ccid.h | 4 ++++
>> 2 files changed, 13 insertions(+), 11 deletions(-)
>>
>> diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
>> index 869a63c..0b05260 100644
>> --- a/hw/usb/ccid-card-emulated.c
>> +++ b/hw/usb/ccid-card-emulated.c
>> @@ -42,8 +42,6 @@ do {\
>> } \
>> } while (0)
>>
>> -#define EMULATED_DEV_NAME "ccid-card-emulated"
>
>
>> --- a/hw/usb/ccid.h
>> +++ b/hw/usb/ccid.h
>> +#define TYPE_EMULATED_CCID "ccid-card-emulated"
>> +#define EMULATED_CCID_CARD(obj) \
>> + OBJECT_CHECK(EmulatedState, (obj), TYPE_EMULATED_CCID)
>
> Why did you move the type definition from .c to .h file?
> It is only referenced in .c, no?
>
> Ditto for the second patch in this series.
>
> Thanks,
>
> /mjt
>
Yes, that type definition is referred only in .c for now, but we are not
sure about it in the future, for better flexibility, I think put it into
.h is better. http://wiki.qemu.org/QOMConventions also says:
DO use TYPE_FOO constants, defined in a header if used in other parts of
code
--
Yours Sincerely,
Cao jin
next prev parent reply other threads:[~2016-02-02 8:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 6:53 [Qemu-devel] [PATCH 0/2] CCID QOMify Cao jin
2016-02-01 6:53 ` [Qemu-devel] [PATCH 1/2] Emulated CCID card: QOMify Cao jin
2016-02-02 8:15 ` Michael Tokarev
2016-02-02 8:25 ` Cao jin [this message]
2016-02-02 8:30 ` Michael Tokarev
2016-02-02 9:00 ` Cao jin
2016-02-01 6:53 ` [Qemu-devel] [PATCH 2/2] Passthru " Cao jin
2016-02-02 8:05 ` [Qemu-devel] [PATCH 0/2] CCID QOMify 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=56B0680C.8050200@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=kraxel@redhat.com \
--cc=mjt@tls.msk.ru \
--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).