Re: [Qemu-devel] [PATCH v4 5/6] fw_cfg: add generic non-DMA read method

2015-11-05 Thread Gabriel L. Somlo
On Thu, Nov 05, 2015 at 01:23:15PM +0100, Laszlo Ersek wrote: > On 11/04/15 17:35, Gabriel L. Somlo wrote: > > On Wed, Nov 04, 2015 at 04:04:09PM +0100, Laszlo Ersek wrote: > >> On 11/03/15 22:40, Gabriel L. Somlo wrote: > >>> Introduce fw_cfg_data_read(), a generic read method which works > >>> on

Re: [Qemu-devel] [PATCH v4 5/6] fw_cfg: add generic non-DMA read method

2015-11-05 Thread Laszlo Ersek
On 11/05/15 13:57, Markus Armbruster wrote: > Laszlo Ersek writes: > >> On 11/04/15 17:35, Gabriel L. Somlo wrote: > [...] >>> +assert(size > 0 && size <= sizeof(value)); >> >> It's a matter of taste, and I won't insist at all, just mention that I >> didn't write those two assert()s as separa

Re: [Qemu-devel] [PATCH v4 5/6] fw_cfg: add generic non-DMA read method

2015-11-05 Thread Markus Armbruster
Laszlo Ersek writes: > On 11/04/15 17:35, Gabriel L. Somlo wrote: [...] >> +assert(size > 0 && size <= sizeof(value)); > > It's a matter of taste, and I won't insist at all, just mention that I > didn't write those two assert()s as separate statements :) > > Namely, with a conjunction (P1 &&

Re: [Qemu-devel] [PATCH v4 5/6] fw_cfg: add generic non-DMA read method

2015-11-05 Thread Laszlo Ersek
On 11/04/15 17:35, Gabriel L. Somlo wrote: > On Wed, Nov 04, 2015 at 04:04:09PM +0100, Laszlo Ersek wrote: >> On 11/03/15 22:40, Gabriel L. Somlo wrote: >>> Introduce fw_cfg_data_read(), a generic read method which works >>> on all access widths (1 through 8 bytes, inclusive), and can be >>> used d

Re: [Qemu-devel] [PATCH v4 5/6] fw_cfg: add generic non-DMA read method

2015-11-04 Thread Gabriel L. Somlo
On Wed, Nov 04, 2015 at 04:04:09PM +0100, Laszlo Ersek wrote: > On 11/03/15 22:40, Gabriel L. Somlo wrote: > > Introduce fw_cfg_data_read(), a generic read method which works > > on all access widths (1 through 8 bytes, inclusive), and can be > > used during both IOPort and MMIO read accesses. > >

Re: [Qemu-devel] [PATCH v4 5/6] fw_cfg: add generic non-DMA read method

2015-11-04 Thread Laszlo Ersek
On 11/03/15 22:40, Gabriel L. Somlo wrote: > Introduce fw_cfg_data_read(), a generic read method which works > on all access widths (1 through 8 bytes, inclusive), and can be > used during both IOPort and MMIO read accesses. > > To maintain legibility, only fw_cfg_data_mem_read() (the MMIO > data