aboutsummaryrefslogtreecommitdiff
path: root/hw/block/pflash_cfi01.c
diff options
context:
space:
mode:
authorDavid Edmondson <david.edmondson@oracle.com>2021-02-16 14:27:19 +0000
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2021-03-18 11:16:31 +0100
commit2231bee28c03a60836fc75bc737448042e33272b (patch)
treeff10d8074fee2c3945aaed45c4d86947ed53af15 /hw/block/pflash_cfi01.c
parent2b49cd652a1df7e0120d75e3e13665410672682e (diff)
hw/block/pflash_cfi01: Correct the type of PFlashCFI01.ro
PFlashCFI01.ro is a bool, declare it as such. Signed-off-by: David Edmondson <david.edmondson@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210216142721.1985543-3-david.edmondson@oracle.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'hw/block/pflash_cfi01.c')
-rw-r--r--hw/block/pflash_cfi01.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index c8cecb3ac8..0791035675 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -82,7 +82,7 @@ struct PFlashCFI01 {
uint8_t max_device_width; /* max device width in bytes */
uint32_t features;
uint8_t wcycle; /* if 0, the flash is read normally */
- int ro;
+ bool ro;
uint8_t cmd;
uint8_t status;
uint16_t ident0;
@@ -853,7 +853,7 @@ static void pflash_cfi01_realize(DeviceState *dev, Error **errp)
return;
}
} else {
- pfl->ro = 0;
+ pfl->ro = false;
}
if (pfl->blk) {