From patchwork Wed Apr 29 15:24:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47732 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8881420553 for ; Wed, 29 Apr 2015 15:31:19 +0000 (UTC) Received: by wizk4 with SMTP id k4sf15084307wiz.2 for ; Wed, 29 Apr 2015 08:31:18 -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=ueMSWjrAEwhDtr3TDpIVX07O/mJBfih7IwjRKpYY7UM=; b=nOe373beexOuWzTPEE5v3lMoTMXVFcayoI1QqvHLNbPIE4pfidej7pysxfF5QPnHBh fJQtfmuBbA/cGyDHmejT+DDeo521M39R4aDrZG1PpnRwx3036Zy/D07Q7ZDdbZXPHs0y XLzzkP/xN2JFFqBofZIlwwKZ7FBhjiF1EtFQkhznyVzmfc/nHrnS8QnRlAZPXTsqctNx rqWAvi+5PizL8XgVusRAB+VdmrcVhM06dbKZPZ8zgGoMJqIG3bHsyEgzAkt83xvCgS0f 5S3J/J9QxQNNGYRv7m3I6J5YxqFNo9zilEmY0Ntf6Z8kCbnLYlND0JiJxkzKp9K5d/8g qGEA== X-Gm-Message-State: ALoCoQlWDIcm1CBtfWFzIceRbxNlOICUIdBgu3RdjWTovjUr2+Hs/PmBU/qe/6OBklpn+gWurClK X-Received: by 10.152.43.116 with SMTP id v20mr10708327lal.3.1430321478429; Wed, 29 Apr 2015 08:31:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.72 with SMTP id b8ls253711laf.81.gmail; Wed, 29 Apr 2015 08:31:18 -0700 (PDT) X-Received: by 10.113.10.134 with SMTP id ea6mr19251491lbd.29.1430321478291; Wed, 29 Apr 2015 08:31:18 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id wh2si19622338lbb.24.2015.04.29.08.31.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 08:31:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lagv1 with SMTP id v1so22931024lag.3 for ; Wed, 29 Apr 2015 08:31:18 -0700 (PDT) X-Received: by 10.153.6.36 with SMTP id cr4mr19969053lad.56.1430321478154; Wed, 29 Apr 2015 08:31:18 -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.67.65 with SMTP id l1csp2577052lbt; Wed, 29 Apr 2015 08:31:17 -0700 (PDT) X-Received: by 10.229.185.136 with SMTP id co8mr18394165qcb.16.1430321471972; Wed, 29 Apr 2015 08:31:11 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id mb8si21294553qcb.10.2015.04.29.08.31.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 29 Apr 2015 08:31:11 -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]:39678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTx9-0005eZ-5M for patch@linaro.org; Wed, 29 Apr 2015 11:31:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTrq-0006r7-LH for qemu-devel@nongnu.org; Wed, 29 Apr 2015 11:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnTrm-0004cg-VA for qemu-devel@nongnu.org; Wed, 29 Apr 2015 11:25:42 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:36310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTrm-0004cT-Py for qemu-devel@nongnu.org; Wed, 29 Apr 2015 11:25:38 -0400 Received: by pabsx10 with SMTP id sx10so30748077pab.3 for ; Wed, 29 Apr 2015 08:25:38 -0700 (PDT) X-Received: by 10.70.52.103 with SMTP id s7mr42431254pdo.117.1430321138359; Wed, 29 Apr 2015 08:25:38 -0700 (PDT) Received: from localhost.localdomain ([180.150.153.56]) by mx.google.com with ESMTPSA id cu8sm25875045pad.1.2015.04.29.08.25.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 08:25:37 -0700 (PDT) From: Shannon Zhao To: qemu-devel@nongnu.org Date: Wed, 29 Apr 2015 23:24:09 +0800 Message-Id: <1430321049-11859-8-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430321049-11859-1-git-send-email-shannon.zhao@linaro.org> References: <1430321049-11859-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.52 Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, mst@redhat.com, peter.huangpeng@huawei.com, shannon.zhao@linaro.org, zhaoshenglong@huawei.com, pbonzini@redhat.com, christoffer.dall@linaro.org Subject: [Qemu-devel] [PATCH 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.215.53 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 --- 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 335f442..c28ad3d 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