[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 7/9] tz-ppc: add dummy read/write methods
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v2 7/9] tz-ppc: add dummy read/write methods |
Date: |
Mon, 29 Jun 2020 17:33:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 25/06/20 12:21, Philippe Mathieu-Daudé wrote:
>> | > g_assert_not_reached();
>> |
>> | This is a shame we now have to fill the read/write handlers for
>> | unreachable code :(
>> |
>> | > +static uint64_t tz_ppc_dummy_read(void *opaque, hwaddr addr, unsigned
>> size)
>> |
>> | I'd instead use a clearer:
>> | g_assert_not_reached();
>> |
>> | > +static void tz_ppc_dummy_write(void *opaque, hwaddr addr,
>> |
>> | Ditto:
>> | g_assert_not_reached();
>>
>> This will likely be called in tz_ppc_dummy_accepts() above. Do we still want
>> to revise this patch? considering read/write callbacks are unreachable.
What would be called in tz_ppc_dummy_accepts()?
Generally g_assert_not_reached is better (even better than abort :)).
Paolo
- Re: [PATCH v2 3/9] vfio: add quirk device write method, (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