[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC] xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom()
On Fri, Jun 01, 2018 at 06:59:10PM +0100, Peter Maydell wrote: > The xen pci_assign_dev_load_option_rom() currently creates a RAM > memory region with memory_region_init_ram_nomigrate(), and then > manually registers it with vmstate_register_ram(). In fact for > its only callsite, the 'owner' pointer we use for the init call > and the '&dev->qdev' pointer we use for the vmstate_register_ram() > call refer to the same object. Simplify the function to only > take a pointer to the device once instead of twice, and use > memory_region_init_ram() which automatically does the vmstate > register for us. > > Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx> > --- > This is a fairly trivial no-behaviour-change code cleanup, but > I've marked it as RFC because I don't have a setup for doing > more than just compile-testing Xen related patches. > This was found as part of a sweep through for code using > the _nomigrate versions of functions. That patch looks fine, and seams fine after hacking my way into testing the change. Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Thanks, -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |