From patchwork Fri Feb 3 14:55:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 650082 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp864443pva; Fri, 3 Feb 2023 07:00:04 -0800 (PST) X-Google-Smtp-Source: AK7set8xW+86lFqG5lxxmEuQ+ZidujzcdSoMh1wc33hCzC53WZ7lQO8vF/xN2mL8DX70U9tuRzao X-Received: by 2002:a05:6214:707:b0:537:b7da:fd9b with SMTP id c7-20020a056214070700b00537b7dafd9bmr14218058qvz.24.1675436404083; Fri, 03 Feb 2023 07:00:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675436404; cv=none; d=google.com; s=arc-20160816; b=d6FOJ0SUu+iP3/Udbu2tQqswsWf1w8RK7e6k5iwxnpgNOIQXmf1QT5aO/vHvFE1k6e TIcwjdDB8UCgVU4IXlaiA1rQ02Br18b8Fe4du0L24XbBVyystSzfxAig1b17ghzwr6vu L9oYv4uDMqZHoy2U7nxa54CZzxzSv37UdkzVivDp5m0sgFX4K9SkBd/cWBxLWLFLhZEa aCXVuAtrO9UcML6gVePBM0x1RSr2keuB/fOjO6fIfN+5hlwzhbOoGY7rRdVVY1MC5B7R DyQvTFE8l39gH9BbBao2ZGxm/sWb4VSi2GEv9gVBlAttfROS9EgHK96aiwoQfnLJh2cX oI9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VgyTPh7msAYyuAXqahXOmNxtor/LOuPPEC+v7SLH2W8=; b=n55USnAJytRXvHoicR3hVNEGlr/vl8BkSu9WJ+ZBK1DbI7L1L8xqr8iDIL999viYWm RKu6IqW1WRBqdvVrBkQOd3jbPG5L7VOhQ3aZp+kdfh5x2I5dq+SPFQ3hEkrewULemCJ+ laS8QMCj1zZJW1u/3QAy348YhPmZ+ejs+rV62pJjhXvkQ6mveRGXq3D18iLhNg24rOOB 3w8jnygXzu5fPt7u+ThEP9hGif+EDrHDMna1hrWiWDUHHMG3RXBJGFQ9p0+lteUYvqsY N4mSkz8BhZqRk6Ol9r+HP/WsqwGpRWjmnRrcKhP1pAOQDvObTb4z5U4Il4Xi1LrfpcQ8 jnFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r84hhi6b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i8-20020a0cf948000000b005354ca36bafsi1723430qvo.157.2023.02.03.07.00.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Feb 2023 07:00:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r84hhi6b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNxUa-0003WF-Eg; Fri, 03 Feb 2023 09:56:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNxUZ-0003VX-Q7 for qemu-devel@nongnu.org; Fri, 03 Feb 2023 09:56:43 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNxUX-00064g-Mf for qemu-devel@nongnu.org; Fri, 03 Feb 2023 09:56:43 -0500 Received: by mail-wm1-x32f.google.com with SMTP id n28-20020a05600c3b9c00b003ddca7a2bcbso4054232wms.3 for ; Fri, 03 Feb 2023 06:56:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VgyTPh7msAYyuAXqahXOmNxtor/LOuPPEC+v7SLH2W8=; b=r84hhi6bkgbF7U5gkkwUAmM9YrM7x6BKIexLXhgMtE2lqswqmHkfe9hxI8t5xBU14t dj5BB5ssopN1lAB1rE+24vzCtuLpXnutmtOJp2sNw/NJgL/vadMjKgkGXol4CWbdeOkf urZgd3AJ+lTm3bQMfL6+QI6l+6J2qiZKXt6Co+N3NcnIVdLqmdk4zztxpZj7+VPsKsXi EVo0REZlkgEc9d8GcRJ01DM3r13TABhWfLxLqlThF0cE80Rf+n0PHqJuPt5jvTimpStw G2FQE26wFzLDfBGQS3yc5mDs26GDI491hY0FH5mhZ6mIsNweKFbIbEamWXUZJaPd40cF +qZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VgyTPh7msAYyuAXqahXOmNxtor/LOuPPEC+v7SLH2W8=; b=QQaFIFZt4YFcrpef1Jdh3EP268JJTQg5Fb2K2ZQXcOJDorRAwA+ljcYZAirxiXv57z wDG9oIK8tjc2lE4vzg6inc75g4YAvRrN8NS/0RJobIYNiSlkfCZIcpgfMHWZRcQZi6cA wVjNjBOSEGhFP3wVJ5mfmw2Qh90pd4UIkWEZ1qyhpovNNL4926AWD7B7BNpTEr3prP6b LU6TM5UYTUiY/sRqGtUHDjU23nwO7jLdfqxmGMipPdjEIPRARkJGLLaJvbYjEu5sEDRB S+saEt4R0vl7oMprbW0YrDA2F6sS7V9krJgiS/876hLx08xdmPpl8falbgy75Za1ctxJ s4mQ== X-Gm-Message-State: AO0yUKWpUZAZ6tb90S70ZpawsAs6hrtG2VyFWww4KaIXW14fxYLUVSTh 1eFnkc4dQwp23cTs5pQxsEV0kWqEQGGi83nN X-Received: by 2002:a05:600c:3588:b0:3df:e1e9:201d with SMTP id p8-20020a05600c358800b003dfe1e9201dmr5125160wmq.40.1675436200274; Fri, 03 Feb 2023 06:56:40 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w14-20020a05600c474e00b003dfe57f6f61sm2543539wmo.33.2023.02.03.06.56.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Feb 2023 06:56:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , BALATON Zoltan Subject: [PATCH v2 12/15] hw/display/sm501: Unify common QOM properties Date: Fri, 3 Feb 2023 15:55:33 +0100 Message-Id: <20230203145536.17585-13-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230203145536.17585-1-philmd@linaro.org> References: <20230203145536.17585-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 Since now PCI and SysBus properties are identical, unify them. Suggested-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan --- hw/display/sm501.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index efebd93f1e..98375138b2 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -1975,7 +1975,7 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp) /* TODO : chain irq to IRL */ } -static Property sm501_sysbus_properties[] = { +static Property sm501_common_properties[] = { DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0), DEFINE_PROP_END_OF_LIST(), }; @@ -2004,7 +2004,7 @@ static void sm501_sysbus_class_init(ObjectClass *klass, void *data) dc->realize = sm501_realize_sysbus; set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); dc->desc = "SM501 Multimedia Companion"; - device_class_set_props(dc, sm501_sysbus_properties); + device_class_set_props(dc, sm501_common_properties); dc->reset = sm501_reset_sysbus; dc->vmsd = &vmstate_sm501_sysbus; } @@ -2062,11 +2062,6 @@ static void sm501_realize_pci(PCIDevice *dev, Error **errp) &s->state.mmio_region); } -static Property sm501_pci_properties[] = { - DEFINE_PROP_UINT32("vram-size", SM501PCIState, vram_size, 64 * MiB), - DEFINE_PROP_END_OF_LIST(), -}; - static void sm501_reset_pci(DeviceState *dev) { SM501PCIState *s = PCI_SM501(dev); @@ -2098,7 +2093,7 @@ static void sm501_pci_class_init(ObjectClass *klass, void *data) k->class_id = PCI_CLASS_DISPLAY_OTHER; set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); dc->desc = "SM501 Display Controller"; - device_class_set_props(dc, sm501_pci_properties); + device_class_set_props(dc, sm501_common_properties); dc->reset = sm501_reset_pci; dc->hotpluggable = false; dc->vmsd = &vmstate_sm501_pci;