qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org, Eduardo Habkost <eduardo@habkost.net>,
	Markus Armbruster <armbru@redhat.com>,
	"Daniel P . Berrange" <berrange@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	qemu-block@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>
Subject: [RFC PATCH 2/4] hw/block: Rename TYPE_PFLASH_CFI02 'width' property as 'device-width'
Date: Mon,  9 Jan 2023 23:54:17 +0100	[thread overview]
Message-ID: <20230109225419.22621-3-philmd@linaro.org> (raw)
In-Reply-To: <20230109225419.22621-1-philmd@linaro.org>

Use the same property name than the TYPE_PFLASH_CFI01 model.

Deprecate the current 'width' property and add the 'device-width'
property pointing to the same field in PFlashCFI02.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/block/pflash_cfi02.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 2a99b286b0..bbf78ad1e4 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -950,6 +950,7 @@ static Property pflash_cfi02_properties[] = {
     DEFINE_PROP_UINT32("num-blocks3", PFlashCFI02, nb_blocs[3], 0),
     DEFINE_PROP_UINT32("sector-length3", PFlashCFI02, sector_len[3], 0),
     DEFINE_PROP_UINT8("width", PFlashCFI02, width, 0),
+    DEFINE_PROP_UINT8("device-width", PFlashCFI02, width, 0),
     DEFINE_PROP_UINT8("mappings", PFlashCFI02, mappings, 0),
     DEFINE_PROP_UINT8("big-endian", PFlashCFI02, be, 0),
     DEFINE_PROP_UINT16("id0", PFlashCFI02, ident0, 0),
@@ -978,6 +979,11 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data)
     dc->unrealize = pflash_cfi02_unrealize;
     device_class_set_props(dc, pflash_cfi02_properties);
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+
+    object_class_property_deprecate(klass, "width",
+                                    "renamed as '"
+                                    TYPE_PFLASH_CFI02 ".device-width'",
+                                    8, 0);
 }
 
 static const TypeInfo pflash_cfi02_info = {
@@ -1014,7 +1020,7 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base,
     assert(QEMU_IS_ALIGNED(size, sector_len));
     qdev_prop_set_uint32(dev, "num-blocks", size / sector_len);
     qdev_prop_set_uint32(dev, "sector-length", sector_len);
-    qdev_prop_set_uint8(dev, "width", width);
+    qdev_prop_set_uint8(dev, "device-width", width);
     qdev_prop_set_uint8(dev, "mappings", nb_mappings);
     qdev_prop_set_uint8(dev, "big-endian", !!be);
     qdev_prop_set_uint16(dev, "id0", id0);
-- 
2.38.1



  parent reply	other threads:[~2023-01-09 22:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 22:54 [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate() Philippe Mathieu-Daudé
2023-01-09 22:54 ` [RFC PATCH 1/4] " Philippe Mathieu-Daudé
2023-01-10  9:52   ` Daniel P. Berrangé
2023-01-10  9:55   ` Daniel P. Berrangé
2023-01-09 22:54 ` Philippe Mathieu-Daudé [this message]
2023-01-10  9:50   ` [RFC PATCH 2/4] hw/block: Rename TYPE_PFLASH_CFI02 'width' property as 'device-width' Daniel P. Berrangé
2023-01-09 22:54 ` [RFC PATCH 3/4] util: Introduce helpers to compare QEMU versions Philippe Mathieu-Daudé
2023-01-09 22:54 ` [RFC PATCH 4/4] qom: Warn when deprecated class property can be removed Philippe Mathieu-Daudé
2023-01-10  9:34   ` Bernhard Beschow
2023-01-10  9:49   ` Daniel P. Berrangé
2023-01-10 13:02 ` [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate() Kevin Wolf
2023-01-11  9:55   ` Philippe Mathieu-Daudé
2023-01-11  9:59     ` Daniel P. Berrangé
2023-01-11 10:08       ` Philippe Mathieu-Daudé
2023-01-11 10:29         ` Daniel P. Berrangé
2023-01-11 11:29           ` Markus Armbruster
2023-01-11 13:15             ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230109225419.22621-3-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).