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: 466169 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A7A241402B0 for ; Thu, 30 Apr 2015 01:30:45 +1000 (AEST) Received: from localhost ([::1]:39678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTwh-0005eZ-LN for incoming@patchwork.ozlabs.org; Wed, 29 Apr 2015 11:30:43 -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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ueMSWjrAEwhDtr3TDpIVX07O/mJBfih7IwjRKpYY7UM=; b=BCjhmD29PDs39BxsBGVi0h5dp9LMVQewiN7DVPTM9DLVb2nl5I4I1+lrqKXAbOpMGL To3G6hqO8Z5uJi9cADm32bkIjIBhxankd9VUQQbIyNQHw+pu1LFqQnrP+o8O2/7otb/6 DHmZg8s3Jr+Ed6mIcjl8PzHrawGgM18LsSeJ2+sgdtM97mLnYrvgpzO9ilab923mQDY9 XGKbN4InBmuhgcZUdV9ui+5IsXFRV/4olimEu23jiCATJPjOUa5DMgC5WN984IVxKHBt i1Hbdv9UOfOnf0neaZhLsnURmRXXVPMQgtaSoHthZKx/P+eEKmm9wRz2MmOP2tteg+sg L1sw== X-Gm-Message-State: ALoCoQl45tMkdvYcI3JoCqNJnRekz6ec7jH5NSS7pq/U+qJHf5Y/sZsorDz05R/r2E7ERgvxZhSk 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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