On Sat, Feb 12, 2011 at 05:47:53PM +0100, Alexander Graf wrote: > On 12.02.2011, at 15:54, David Gibson wrote: [snip] > > @@ -267,6 +295,7 @@ static QEMUMachine spapr_machine = { > > .desc = "pSeries Logical Partition (PAPR compliant)", > > .init = ppc_spapr_init, > > .max_cpus = 1, > > + .no_parallel = 1, > > duplicate?
Oops, rebasing mistake. Fixed now. [snip] > > +VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg) > > +{ > > + DeviceState *qdev; > > + VIOsPAPRDevice *dev = NULL; > > + > > + QLIST_FOREACH(qdev, &bus->bus.children, sibling) { > > + dev = (VIOsPAPRDevice *)qdev; > > + if (dev->reg == reg) > > Braces > > > + break; > > + } > > + > > + return dev; > > What if the device doesn't exist? This returns NULL, the caller returns an error... -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson