On Mon, Jul 11, 2016 at 04:21:29PM +0200, Paolo Bonzini wrote:
> 
> 
> On 05/07/2016 07:31, David Gibson wrote:
> >  
> > -    if (tcet && tcet->nb_table) {
> > -        spapr_tce_table_disable(tcet);
> > +        if (tcet && tcet->nb_table) {
> > +            spapr_tce_table_disable(tcet);
> > +        }
> >      }
> >  
> >      /* Register default 32bit DMA window */
> > +    tcet = spapr_tce_find_by_liobn(sphb->dma_liobn[0]);
> 
> Should the statement below be wrapped by "if (tcet)"?

Not really.  That lookup should never fail (if we didn't allocate the
tcet before we would have failed initialization).  An assert(tcet)
might be appropriate, but I don't know it's worth adding at this
stage.
 
> Paolo
> 
> >      spapr_tce_table_enable(tcet, SPAPR_TCE_PAGE_SHIFT, sphb->dma_win_addr,
> >                             sphb->dma_win_size >> SPAPR_TCE_PAGE_SHIFT)
> 

-- 
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

Attachment: signature.asc
Description: PGP signature

Reply via email to