All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: zhangchen.fnst@cn.fujitsu.com, jasowang@redhat.com,
	peter.huangpeng@huawei.com, qemu-devel@nongnu.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	hongyang.yang@easystack.cn
Subject: Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public
Date: Mon, 1 Feb 2016 18:44:44 +0800	[thread overview]
Message-ID: <56AF371C.9050302@huawei.com> (raw)
In-Reply-To: <20160201104105.GC1622@redhat.com>

On 2016/2/1 18:41, Daniel P. Berrange wrote:
> On Wed, Jan 27, 2016 at 04:29:37PM +0800, zhanghailiang wrote:
>> Make the helper object_create() public and fix its first
>> parameter to accept NULL value.
>>
>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> v2:
>>   - New patch
>> ---
>>   include/qemu-common.h | 2 ++
>>   vl.c                  | 4 ++--
>>   2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/qemu-common.h b/include/qemu-common.h
>> index 22b010c..52cf4fd 100644
>> --- a/include/qemu-common.h
>> +++ b/include/qemu-common.h
>> @@ -500,4 +500,6 @@ int parse_debug_env(const char *name, int max, int initial);
>>   const char *qemu_ether_ntoa(const MACAddr *mac);
>>   void page_size_init(void);
>>
>> +int object_create(void *opaque, QemuOpts *opts, Error **errp);
>> +
>>   #endif
>> diff --git a/vl.c b/vl.c
>> index f043009..b21335e 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -2819,7 +2819,7 @@ static bool object_create_delayed(const char *type)
>>   }
>>
>>
>> -static int object_create(void *opaque, QemuOpts *opts, Error **errp)
>> +int object_create(void *opaque, QemuOpts *opts, Error **errp)
>>   {
>>       Error *err = NULL;
>>       char *type = NULL;
>> @@ -2842,7 +2842,7 @@ static int object_create(void *opaque, QemuOpts *opts, Error **errp)
>>       if (err) {
>>           goto out;
>>       }
>> -    if (!type_predicate(type)) {
>> +    if (type_predicate && !type_predicate(type)) {
>>           goto out;
>>       }
>
> No, please don't do this - your later patch should *not* be using
> object_create, it should use object_new_with_props.
>

Er, i didn't notice this helper before, i will look into it.

Thanks,
Hailiang

> Regards,
> Daniel
>

  reply	other threads:[~2016-02-01 10:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  8:29 [Qemu-devel] [PATCH RFC v2 0/5] Netfilter: Add each netdev a default filter zhanghailiang
2016-01-27  8:29 ` [Qemu-devel] [PATCH RFC v2 1/5] net/filter: Add a 'status' property for filter object zhanghailiang
2016-01-27  8:29 ` [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public zhanghailiang
2016-02-01  3:05   ` Jason Wang
2016-02-01  6:19     ` Hailiang Zhang
2016-02-01  7:27       ` Jason Wang
2016-02-01  7:34         ` Hailiang Zhang
2016-02-01 10:41   ` Daniel P. Berrange
2016-02-01 10:44     ` Hailiang Zhang [this message]
2016-01-27  8:29 ` [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev zhanghailiang
2016-02-01  3:14   ` Jason Wang
2016-02-01  6:13     ` Hailiang Zhang
2016-02-01  7:46       ` Jason Wang
2016-02-01  7:56         ` Hailiang Zhang
2016-02-01  8:05           ` Yang Hongyang
2016-02-01  8:21             ` Hailiang Zhang
2016-02-01  9:18               ` Jason Wang
2016-02-01  9:39                 ` Hailiang Zhang
2016-02-01  9:49                   ` Jason Wang
2016-02-01 10:41                     ` Hailiang Zhang
2016-02-01  9:04           ` Jason Wang
2016-02-01  9:22             ` Hailiang Zhang
2016-02-01  9:42               ` Jason Wang
2016-02-01 10:40                 ` Hailiang Zhang
2016-02-05  6:19                   ` Jason Wang
2016-02-05  7:01                     ` Hailiang Zhang
2016-02-05  7:40                       ` Jason Wang
2016-02-05  8:29                         ` Hailiang Zhang
2016-02-01 12:21                 ` Hailiang Zhang
2016-02-01 10:43   ` Daniel P. Berrange
2016-02-01 10:57     ` Hailiang Zhang
2016-01-27  8:29 ` [Qemu-devel] [PATCH RFC v2 4/5] filter-buffer: Accept zero interval zhanghailiang
2016-01-27  8:29 ` [Qemu-devel] [PATCH RFC v2 5/5] net/filter: Add a default filter to each netdev zhanghailiang

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=56AF371C.9050302@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=berrange@redhat.com \
    --cc=hongyang.yang@easystack.cn \
    --cc=jasowang@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhangchen.fnst@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.