From patchwork Wed Apr 29 15:24:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47727 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4D4F82121F for ; Wed, 29 Apr 2015 15:26:47 +0000 (UTC) Received: by lamp14 with SMTP id p14sf7695628lam.3 for ; Wed, 29 Apr 2015 08:26:45 -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=GDLB8nyOo5FUs6IuJkey2ay9eCc7RbQOU14LmmgiiV0=; b=C4JnVLZTF8l3+l7rpuc1S/fXJSVgsH8aTU54sLn7O7zJA87DsNO0oB0gIz8Iwq9AQh tvHkZsC7qx+QEuPZcTmzJusGGngUC+xOcnOpM2qOGlowrSmG6T3xC2yHJ888yeD/d3uj X3Ds3ro9kpnZtZKcs1XIAOflzXC+9MuxkCdKQfqpI9lj/EW2VJUu94eF1Ch5ZKxbwHcb lAnOFrTDHAe7YpWwrirqy9B36DveskWMw0oRF3XqRtVAglLsPTrxaFmG8S5OBSjcK4DX srYghdLJLzvw6ov+/TV6rDhd3OvMiUg9k1jQnvZUtmMSJv+WiiJXaY5v2I1oRUZssCdc Oa6g== X-Gm-Message-State: ALoCoQmZXR1NM2sUWXEybdWuL00fdi0nG7yVnokHTCSRUw3zTvGE0Rfw6JUBqkjVcw0rLn0D2Q53 X-Received: by 10.194.5.229 with SMTP id v5mr7414997wjv.0.1430321205613; Wed, 29 Apr 2015 08:26:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.36 with SMTP id g4ls245744lah.33.gmail; Wed, 29 Apr 2015 08:26:45 -0700 (PDT) X-Received: by 10.112.145.106 with SMTP id st10mr8412094lbb.54.1430321205456; Wed, 29 Apr 2015 08:26:45 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id k6si19596623lam.65.2015.04.29.08.26.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 08:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by labbd9 with SMTP id bd9so22896142lab.2 for ; Wed, 29 Apr 2015 08:26:45 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr19374240laa.36.1430321205333; Wed, 29 Apr 2015 08:26:45 -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 l1csp2574308lbt; Wed, 29 Apr 2015 08:26:44 -0700 (PDT) X-Received: by 10.55.31.40 with SMTP id f40mr28711864qkf.49.1430321203935; Wed, 29 Apr 2015 08:26:43 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 107si8283409qge.122.2015.04.29.08.26.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 29 Apr 2015 08:26:43 -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]:39644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTso-0007Ym-W1 for patch@linaro.org; Wed, 29 Apr 2015 11:26:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTrg-0006ZH-Sz for qemu-devel@nongnu.org; Wed, 29 Apr 2015 11:25:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnTrd-0004Zp-FN for qemu-devel@nongnu.org; Wed, 29 Apr 2015 11:25:32 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:36324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTrd-0004Zh-A6 for qemu-devel@nongnu.org; Wed, 29 Apr 2015 11:25:29 -0400 Received: by pdea3 with SMTP id a3so31190668pde.3 for ; Wed, 29 Apr 2015 08:25:29 -0700 (PDT) X-Received: by 10.70.140.38 with SMTP id rd6mr42661092pdb.47.1430321128898; Wed, 29 Apr 2015 08:25:28 -0700 (PDT) Received: from localhost.localdomain ([180.150.153.56]) by mx.google.com with ESMTPSA id cu8sm25875045pad.1.2015.04.29.08.25.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 08:25:27 -0700 (PDT) From: Shannon Zhao To: qemu-devel@nongnu.org Date: Wed, 29 Apr 2015 23:24:07 +0800 Message-Id: <1430321049-11859-6-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.192.169 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 5/7] virtio-serial-bus: move qdev properties into virtio-serial-bus.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.45 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 virtio-serial-bus.c uses DEFINE_VIRTIO_SERIAL_PROPERTIES, there is no need to expose it. Inline it into virtio-serial-bus.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/char/virtio-serial-bus.c | 3 ++- include/hw/virtio/virtio-serial.h | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index e336bdb..70189b7 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -1083,7 +1083,8 @@ static void virtio_serial_device_unrealize(DeviceState *dev, Error **errp) } static Property virtio_serial_properties[] = { - DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOSerial, serial), + DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_ports, + 31), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h index 18d1bcc..527d0bf 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -221,7 +221,4 @@ void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle); #define VIRTIO_SERIAL(obj) \ OBJECT_CHECK(VirtIOSerial, (obj), TYPE_VIRTIO_SERIAL) -#define DEFINE_VIRTIO_SERIAL_PROPERTIES(_state, _field) \ - DEFINE_PROP_UINT32("max_ports", _state, _field.max_virtserial_ports, 31) - #endif