qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: qemu-devel@nongnu.org
Cc: Michael Davidsaver <mdavidsaver@gmail.com>,
	linux-renesas-soc@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [Qemu-devel] [PATCH 3/3] nvram: at24c: use a sane default for "rom-size"
Date: Mon, 12 Mar 2018 22:42:30 +0100	[thread overview]
Message-ID: <20180312214230.17561-4-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20180312214230.17561-1-wsa+renesas@sang-engineering.com>

0 as "rom-size" doesn't make much sense, let's use the smallest 24cXX
which has 128 byte.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 hw/nvram/eeprom_at24c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c
index d82710e1df..de988f8d07 100644
--- a/hw/nvram/eeprom_at24c.c
+++ b/hw/nvram/eeprom_at24c.c
@@ -168,7 +168,7 @@ void at24c_eeprom_reset(DeviceState *state)
 }
 
 static Property at24c_eeprom_props[] = {
-    DEFINE_PROP_UINT32("rom-size", EEPROMState, rsize, 0),
+    DEFINE_PROP_UINT32("rom-size", EEPROMState, rsize, 128),
     DEFINE_PROP_BOOL("writable", EEPROMState, writable, true),
     DEFINE_PROP_DRIVE("drive", EEPROMState, blk),
     DEFINE_PROP_END_OF_LIST()
-- 
2.11.0

  parent reply	other threads:[~2018-03-12 21:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 21:42 [Qemu-devel] [PATCH 0/3] nvram: at24c: fix problems related to "rom-size" Wolfram Sang
2018-03-12 21:42 ` [Qemu-devel] [PATCH 1/3] nvram: at24c: remove doubled prefix for ERR Wolfram Sang
2018-03-13 10:57   ` Philippe Mathieu-Daudé
2018-03-13 20:10     ` Wolfram Sang
2018-03-12 21:42 ` [Qemu-devel] [PATCH 2/3] nvram: at24c: prevent segfault by checking "rom-size" Wolfram Sang
2018-03-13 10:59   ` Philippe Mathieu-Daudé
2018-03-12 21:42 ` Wolfram Sang [this message]
2018-03-13 10:53   ` [Qemu-devel] [PATCH 3/3] nvram: at24c: use a sane default for "rom-size" Philippe Mathieu-Daudé
2018-03-13 20:16     ` Wolfram Sang
2018-03-18 23:50       ` Philippe Mathieu-Daudé
2018-03-19  8:33         ` Wolfram Sang

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=20180312214230.17561-4-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mdavidsaver@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).