On Thu, 2009-01-15 at 15:54 +0200, Avi Kivity wrote:
> Mark McLoughlin wrote:
> > Use write() instead of write_rom() to write the device number.
> >
> > Cast the struct option_rom_header* to uint8_t* for write_rom().
> >
> > Fixes:
> >
> >   qemu/hw/device-assignment.c: In function ‘scan_option_rom’:
> >   qemu/hw/device-assignment.c:766: warning: passing argument 2 of 
> > ‘cpu_physical_memory_write_rom’ from incompatible pointer type
> >
> > Signed-off-by: Mark McLoughlin <[email protected]>
> > ---
> >  qemu/hw/device-assignment.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
> > index f8faf5b..e0c01ce 100644
> > --- a/qemu/hw/device-assignment.c
> > +++ b/qemu/hw/device-assignment.c
> > @@ -760,8 +760,8 @@ static int scan_option_rom(uint8_t devfn, void *roms, 
> > ram_addr_t offset)
> >      cpu_register_physical_memory(0xd0000 + offset, total_size, addr | 
> > IO_MEM_ROM);
> >  
> >      /* Write ROM data and devfn to phys_addr */
> > -    cpu_physical_memory_write_rom(0xd0000 + offset, rom, size);
> > -    cpu_physical_memory_write_rom(0xd0000 + offset + size, &devfn, 1);
> > +    cpu_physical_memory_write_rom(0xd0000 + offset, (uint8_t *)rom, size);
> > +    cpu_physical_memory_write(0xd0000 + offset + size, &devfn, 1);
> >  
> >      return total_size;
> >   
> 
> Why drop _rom?  The memory region is registered as a rom, a few lines 
> earlier?

My mistake, can you just apply the change to the first line?

Thanks,
Mark.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to