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 tap: tap as an independent module 2017-02-11 20:59:41 -05:00
Kconfig.vringh
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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 vringh: kill off ACCESS_ONCE() 2016-12-16 00:13:36 +02:00
vsock.c fw_cfg, vhost: features fixes 2018-04-06 19:21:41 -07:00