On Thu, Aug 02, 2012 at 10:59:20AM +0200, Paolo Bonzini wrote:
> Il 02/08/2012 09:57, Wenchao Xia ha scritto:
> >>> +int qbi_init(struct QBlockInfo *info)
> >>
> >> Should return void.
> >>
> >   yes, it is useless now, but maybe in future it may fail. Returning
> > int for every API results in only one more "eax store", I hope I can
> > keep all API returns indicate success/fail, while add comments to say
> > which API would not fail now.
> 
> The question is *how* can it fail?  It's a memset, do you envision it
> becoming something else?
> 
> It's not about the performance of the processor, it's about the
> performance of whoever has to read the documentation and will wonder
> what the return code is for.
> 
> (Though I proposed getting rid of this function too).

Yes, please.  Drop _init()/_uninit() and do this in _open()/_close().

I'm also not sure why qb_create() needs a QBlockState* argument.  Can it
be dropped?

Stefan


Reply via email to