From patchwork Wed Jun 10 15:04:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49709 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9684245D4 for ; Wed, 10 Jun 2015 15:07:40 +0000 (UTC) Received: by laboh3 with SMTP id oh3sf13708224lab.0 for ; Wed, 10 Jun 2015 08:07:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=MthuuqbEn6uGYSLNqB/Fsmy6hqkbgQycfdWRxVbppck=; b=dvQAbcbr3SaN7Su1sf/MxMxUjK/lIAR5E4Mm2VIijJKIdjOgTSJY4vmdXcHWuhALa/ XIIAgBINfg/8bIPldU6OCn/IwluaiXSl/iAlxvSHVMetUv/FFXsb2UBT0l3UclaLklOj FIJn7rC9bEZhXCQ4t3iD7GcxJNRLlKHr7svXvrRT5tUzMKAugxfdLZ5e2IqivgYXfwjR +Qa988twXjD7UCPzJP64kTM+0NUMGyIltC27zNCWdSI0nDEO+MH7cHGMyioaRt0AA0je up9dkzw5NELgj3P6oaTMw7mf16mZqPm8aWogCOysOPCxsoYUCVbUh65kDs3vdyNgzndk vK1Q== X-Gm-Message-State: ALoCoQnOVqEUhYMwbQ1x6ehUNp7O0mrHBy3QN5oV7T9O2HGa+rJmh1b0KX6YBpfI+vMQ9e/4HJzA X-Received: by 10.112.138.2 with SMTP id qm2mr3285060lbb.19.1433948859895; Wed, 10 Jun 2015 08:07:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.25.166 with SMTP id d6ls260197lag.54.gmail; Wed, 10 Jun 2015 08:07:39 -0700 (PDT) X-Received: by 10.152.4.98 with SMTP id j2mr4617529laj.42.1433948859749; Wed, 10 Jun 2015 08:07:39 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id yi7si9289309lbb.14.2015.06.10.08.07.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jun 2015 08:07:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbtu8 with SMTP id tu8so30653631lbb.2 for ; Wed, 10 Jun 2015 08:07:39 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr4701390lbc.32.1433948859603; Wed, 10 Jun 2015 08:07:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3395733lbb; Wed, 10 Jun 2015 08:07:38 -0700 (PDT) X-Received: by 10.140.83.168 with SMTP id j37mr4466495qgd.18.1433948858119; Wed, 10 Jun 2015 08:07:38 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 84si8921746qkq.78.2015.06.10.08.07.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Jun 2015 08:07:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:40894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2hbN-0008Jg-4m for patch@linaro.org; Wed, 10 Jun 2015 11:07:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2haE-00079S-I9 for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:06:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2haA-0006jt-7c for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:06:26 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:32850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2haA-0006jk-16 for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:06:22 -0400 Received: by padev16 with SMTP id ev16so36748644pad.0 for ; Wed, 10 Jun 2015 08:06:21 -0700 (PDT) X-Received: by 10.68.223.34 with SMTP id qr2mr6409652pbc.140.1433948781624; Wed, 10 Jun 2015 08:06:21 -0700 (PDT) Received: from localhost.localdomain ([167.160.116.93]) by mx.google.com with ESMTPSA id w8sm2687917pbt.45.2015.06.10.08.06.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jun 2015 08:06:20 -0700 (PDT) From: Shannon Zhao To: qemu-devel@nongnu.org Date: Wed, 10 Jun 2015 23:04:36 +0800 Message-Id: <1433948676-14395-8-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1433948676-14395-1-git-send-email-shannon.zhao@linaro.org> References: <1433948676-14395-1-git-send-email-shannon.zhao@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.47 Cc: zhaoshenglong@huawei.com, shannon.zhao@linaro.org, mst@redhat.com Subject: [Qemu-devel] [PATCH v2 7/7] vhost-scsi: move qdev properties into vhost-scsi.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 As only one place in vhost-scsi.c uses DEFINE_VHOST_SCSI_PROPERTIES, there is no need to expose it. Inline it into vhost-scsi.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Paolo Bonzini Acked-by: Cornelia Huck --- hw/scsi/vhost-scsi.c | 9 ++++++++- include/hw/virtio/vhost-scsi.h | 9 --------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 9c76486..1941aa1 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -294,7 +294,14 @@ static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p, BusState *bus, } static Property vhost_scsi_properties[] = { - DEFINE_VHOST_SCSI_PROPERTIES(VHostSCSI, parent_obj.conf), + DEFINE_PROP_STRING("vhostfd", VHostSCSI, parent_obj.conf.vhostfd), + DEFINE_PROP_STRING("wwpn", VHostSCSI, parent_obj.conf.wwpn), + DEFINE_PROP_UINT32("boot_tpgt", VHostSCSI, parent_obj.conf.boot_tpgt, 0), + DEFINE_PROP_UINT32("num_queues", VHostSCSI, parent_obj.conf.num_queues, 1), + DEFINE_PROP_UINT32("max_sectors", VHostSCSI, parent_obj.conf.max_sectors, + 0xFFFF), + DEFINE_PROP_UINT32("cmd_per_lun", VHostSCSI, parent_obj.conf.cmd_per_lun, + 128), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h index dea0075..701bfee 100644 --- a/include/hw/virtio/vhost-scsi.h +++ b/include/hw/virtio/vhost-scsi.h @@ -66,13 +66,4 @@ typedef struct VHostSCSI { int lun; } VHostSCSI; -#define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \ - DEFINE_PROP_STRING("vhostfd", _state, _conf_field.vhostfd), \ - DEFINE_PROP_STRING("wwpn", _state, _conf_field.wwpn), \ - DEFINE_PROP_UINT32("boot_tpgt", _state, _conf_field.boot_tpgt, 0), \ - DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \ - DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF), \ - DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128) - - #endif