> >  > +               kmalloc(GFP_KERNEL, sizeof(struct 
 > > kvm_pv_mmu_op_buffer));

 > > Surely this produces a warning?  kmalloc takes (size, flags) -- you have
 > > them reversed here.

 > Heh.  It actually doesn't.  

Yeah, I guess you need sparse to catch the gfp_t mismatch.

 > > kfree(NULL) is fine, so you can remove the if()s here.

 > I know it is fine, but I kinda like putting the if()s, just to let
 > people know that we don't always *expect* something to be in there.
 > But, it doesn't matter to me too much either way.

It's not really a big deal, but "if (x) kfree(x);" does bloat the object
code with the extra test of 'x'.  I guess you could put a comment like
/* free any temp structures we allocated */ or something like that.

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