On Wed, Jul 22, 2015 at 10:09:10AM +0000, Dexuan Cui wrote: > > I'd suggest you do something like > > > > if (ret == -EAGIAIN) > > return 0; > > else if (ret) > > return ret; > > > > to make it future-proof (e.g. when a new error is returned by > > hv_ringbuffer_peek). And a comment would also be useful as it is unclear > > why we silence errors here. > Hi Vitaly, > Thanks! > I think I made a mistake here: > the "if (ret != 0) return 0;" should be changed > to "if (ret != 0) return ret;" The double negative really doesn't not make the code more complicated. I like using a quadruple negative instead. if (ret != 0 != 0) return ret; regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel