Re: [PATCH RFC 04/13] vhost: cleanup fetch_buf return code handling

2020-06-04 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 03:29:02PM +0800, Jason Wang wrote: > > On 2020/6/2 下午9:06, Michael S. Tsirkin wrote: > > Return code of fetch_buf is confusing, so callers resort to > > tricks to get to sane values. Let's switch to something standard: > > 0 empty, >0 non-empty, <0 error. > > > >

Re: [PATCH RFC 04/13] vhost: cleanup fetch_buf return code handling

2020-06-03 Thread Jason Wang
On 2020/6/2 下午9:06, Michael S. Tsirkin wrote: Return code of fetch_buf is confusing, so callers resort to tricks to get to sane values. Let's switch to something standard: 0 empty, >0 non-empty, <0 error. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 24

[PATCH RFC 04/13] vhost: cleanup fetch_buf return code handling

2020-06-02 Thread Michael S. Tsirkin
Return code of fetch_buf is confusing, so callers resort to tricks to get to sane values. Let's switch to something standard: 0 empty, >0 non-empty, <0 error. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 24 1 file changed, 16 insertions(+), 8