[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/9] nvram: add nrf51_soc flash read method
From: |
P J P |
Subject: |
Re: [PATCH v2 5/9] nvram: add nrf51_soc flash read method |
Date: |
Mon, 29 Jun 2020 17:25:21 +0530 (IST) |
Hello Li,
+-- On Mon, 29 Jun 2020, Li Qiang wrote --+
| P J P <ppandit@redhat.com> 于2020年6月25日周四 上午3:01写道:
| > Update v2: return ldl_le_p()
| > -> https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg04972.html
| >
| > +static uint64_t flash_read(void *opaque, hwaddr offset, unsigned size)
| > +{
| > + NRF51NVMState *s = NRF51_NVM(opaque);
| > +
| > + assert(offset + size <= s->flash_size);
| > + return ldl_le_p(s->storage + offset);
| > +}
|
| However as the origin code doesn't provide a read callback. So why here we
| return something?
|
| I prefer here just 'qemu_log_mask(LOG_UNIMP, "%s not implemented\n",
| __func__);' as other patches does.
Earlier patch v1 did that. It was suggested to return ldl_le_p(), as that's a
valid return IIUC, instead of a zero(0), in case flash_read() is called.
Thanks so much for the reviews. I'll send a revised series with due updates.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D
- Re: [PATCH v2 7/9] tz-ppc: add dummy read/write methods, (continued)
[PATCH v2 4/9] prep: add ppc-parity write method, P J P, 2020/06/24
[PATCH v2 5/9] nvram: add nrf51_soc flash read method, P J P, 2020/06/24
Re: [PATCH v2 5/9] nvram: add nrf51_soc flash read method, Paolo Bonzini, 2020/06/29
[PATCH v2 6/9] spapr_pci: add spapr msi read method, P J P, 2020/06/24
[PATCH v2 8/9] imx7-ccm: add digprog mmio write method, P J P, 2020/06/24
Re: [PATCH v2 0/9] memory: assert and define MemoryRegionOps callbacks, no-reply, 2020/06/24