From patchwork Thu Jun 11 12:01:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 49761 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4000120C81 for ; Thu, 11 Jun 2015 12:17:45 +0000 (UTC) Received: by lagh7 with SMTP id h7sf1678580lag.2 for ; Thu, 11 Jun 2015 05:17:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:message-id:references :mime-version:content-type:content-disposition:in-reply-to: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=4PLUQoREPLJvVhxqi6A9jiGnr5HsMYaQ5UVz7vR/+Fo=; b=b6ZUXfxUCnB8k7q3yuWxBUUcdhUq2A097bLbeLKvLItzPSWX9pYqufFkIpxMEE3YXt Icgum2lEx+fhM1ZPqDzL735jiywoChU8+P7I59rfijW5QxJ6UqsKZkFhZBrCTeGHO17B WVJD2E6Ln65l6xPwwvMO3JTjELpw7AQMlL3R1CWWomzE9s180oYsZcwuqSIVXbv/Et1f l0hgi1WxZA3Slc8P/zvVqlxb1UV9plkyFMyCCM1Pccdu/MpStEoTCzM0QiCvs2f6VMl9 eb1Hjyh+bEy2aMEOQ1VpXn/4O5gdYlD4qzgUJPrfRlT/ftSeM0Udkxw5b5mxLJ5WijqI Eoig== X-Gm-Message-State: ALoCoQl85haFWyB5HH0e5uXRGdqAGKTvrrrXFfdTRKpHR4OxU29uNVgtyzlUamtHh8RNC61oqy5w X-Received: by 10.112.135.230 with SMTP id pv6mr8147838lbb.0.1434025064252; Thu, 11 Jun 2015 05:17:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.169 with SMTP id r9ls369022laj.86.gmail; Thu, 11 Jun 2015 05:17:44 -0700 (PDT) X-Received: by 10.112.204.199 with SMTP id la7mr9585400lbc.114.1434025064070; Thu, 11 Jun 2015 05:17:44 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id yf5si443691lbb.113.2015.06.11.05.17.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 05:17:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbcmx3 with SMTP id mx3so3142326lbc.1 for ; Thu, 11 Jun 2015 05:17:44 -0700 (PDT) X-Received: by 10.152.225.166 with SMTP id rl6mr9600958lac.36.1434025063930; Thu, 11 Jun 2015 05:17:43 -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 hn6csp4000760lbb; Thu, 11 Jun 2015 05:17:43 -0700 (PDT) X-Received: by 10.55.40.18 with SMTP id o18mr18143126qkh.58.1434025062651; Thu, 11 Jun 2015 05:17:42 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id b102si396544qga.35.2015.06.11.05.17.42 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 11 Jun 2015 05:17:42 -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]:45754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31QT-0001XF-IL for patch@linaro.org; Thu, 11 Jun 2015 08:17:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31Ay-0002d5-Fx for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z31Av-0008MX-9l for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:01:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31Av-0008MS-4y for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:01:37 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B43A135C11D; Thu, 11 Jun 2015 12:01:36 +0000 (UTC) Received: from redhat.com (ovpn-116-92.ams2.redhat.com [10.36.116.92]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t5BC1X1e020724; Thu, 11 Jun 2015 08:01:34 -0400 Date: Thu, 11 Jun 2015 14:01:33 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1434023714-30366-41-git-send-email-mst@redhat.com> References: <1434023714-30366-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1434023714-30366-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Cornelia Huck , Peter Maydell , Paolo Bonzini , Shannon Zhao , Shannon Zhao Subject: [Qemu-devel] [PULL 40/42] 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: mst@redhat.com 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.173 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 From: Shannon Zhao 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost-scsi.h | 9 --------- hw/scsi/vhost-scsi.c | 9 ++++++++- 2 files changed, 8 insertions(+), 10 deletions(-) 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 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(), };