From patchwork Wed Jun 10 15:04:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49712 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0793A245D4 for ; Wed, 10 Jun 2015 15:09:11 +0000 (UTC) Received: by wgv5 with SMTP id 5sf12761466wgv.0 for ; Wed, 10 Jun 2015 08:09:10 -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=taOlCCqEC+BLqUDAuNJKw8NflvIUWeQXpwKx/N4XW/I=; b=ACKA0zSVCWfkJ9reODUPdJJg1TJnox9lKBhmf7bncwbQQB1rFerAdqPeCNfcWd8Whv ZUrooq4j671KZwr47BHkFsJFZWb7V/+u4qI8t5GUiMy8pk3ciQikavpOHjFo+kjtv/i8 3MyRebifOgFI2PGpx4xvMRE2w6sUeZEACmSlxvMKB0PinFSqpGO+QExv9A+wwnZWHEai EIfkpQeUvabQvduU+HQRacrjW6da3Biy3UF3fVGQcx1hJbZXHxQ6DLyEnZNxqJgOlf8Q /R4X+xWgrNIiyCqcZm9aNOt4e2Nbxs4+5BI4hsXiBs6a91VVBdDhpDBvcE1eLv6pvHfg Pe0w== X-Gm-Message-State: ALoCoQllRlazGPtk66o85tjzcJjSLxdWWb2eT0/ulzUuvlyHn3ZKfZWy7Uh2unMFLTlPyxdLhKhX X-Received: by 10.152.219.166 with SMTP id pp6mr3375977lac.1.1433948950294; Wed, 10 Jun 2015 08:09:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.164 with SMTP id cz4ls263264lac.3.gmail; Wed, 10 Jun 2015 08:09:10 -0700 (PDT) X-Received: by 10.112.163.101 with SMTP id yh5mr4594622lbb.25.1433948950079; Wed, 10 Jun 2015 08:09:10 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id dp7si9248912lbc.155.2015.06.10.08.09.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jun 2015 08:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by laar3 with SMTP id r3so35161157laa.3 for ; Wed, 10 Jun 2015 08:09:10 -0700 (PDT) X-Received: by 10.152.4.137 with SMTP id k9mr4524326lak.29.1433948949971; Wed, 10 Jun 2015 08:09:09 -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 hn6csp3396825lbb; Wed, 10 Jun 2015 08:09:09 -0700 (PDT) X-Received: by 10.55.51.210 with SMTP id z201mr7426280qkz.35.1433948948395; Wed, 10 Jun 2015 08:09:08 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f40si8935961qki.52.2015.06.10.08.09.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Jun 2015 08:09:08 -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]:40910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2hcp-0002WC-Cr for patch@linaro.org; Wed, 10 Jun 2015 11:09:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2hZw-0006gd-Ji for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:06:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2hZs-0006OB-Bt for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:06:08 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2hZq-0006KL-Rq for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:06:03 -0400 Received: by pabqy3 with SMTP id qy3so36538557pab.3 for ; Wed, 10 Jun 2015 08:06:02 -0700 (PDT) X-Received: by 10.70.36.10 with SMTP id m10mr174185pdj.34.1433948762444; Wed, 10 Jun 2015 08:06:02 -0700 (PDT) Received: from localhost.localdomain ([167.160.116.93]) by mx.google.com with ESMTPSA id w8sm2687917pbt.45.2015.06.10.08.05.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jun 2015 08:06:00 -0700 (PDT) From: Shannon Zhao To: qemu-devel@nongnu.org Date: Wed, 10 Jun 2015 23:04:34 +0800 Message-Id: <1433948676-14395-6-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.53 Cc: zhaoshenglong@huawei.com, shannon.zhao@linaro.org, mst@redhat.com Subject: [Qemu-devel] [PATCH v2 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.43 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 Reviewed-by: Paolo Bonzini Acked-by: Cornelia Huck --- 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 f893523..d451b22 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