WSL2-Linux-Kernel/drivers/vhost
Stefan Hajnoczi ddd3d4081f vhost: return bool from *_access_ok() functions
Currently vhost *_access_ok() functions return int.  This is error-prone
because there are two popular conventions:

1. 0 means failure, 1 means success
2. -errno means failure, 0 means success

Although vhost mostly uses #1, it does not do so consistently.
umem_access_ok() uses #2.

This patch changes the return type from int to bool so that false means
failure and true means success.  This eliminates a potential source of
errors.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-11 10:54:06 -04:00
..
Kconfig
Kconfig.vringh
Makefile
net.c vhost-net: set packet weight of tx polling to 2 * vq size 2018-04-09 11:01:37 -04:00
scsi.c vhost: remove unused lock check flag in vhost_dev_cleanup() 2018-02-01 16:26:44 +02:00
test.c vhost: remove unused lock check flag in vhost_dev_cleanup() 2018-02-01 16:26:44 +02:00
test.h
vhost.c vhost: return bool from *_access_ok() functions 2018-04-11 10:54:06 -04:00
vhost.h vhost: return bool from *_access_ok() functions 2018-04-11 10:54:06 -04:00
vringh.c
vsock.c fw_cfg, vhost: features fixes 2018-04-06 19:21:41 -07:00