qemu-devel
[Top][All Lists]
Advanced

[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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]