From bf3f67704071d65e58defe5aff4277ec41e9fe6a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 28 Nov 2018 06:39:48 +0000 Subject: [PATCH] isert-scst: Fix sparse warnings related to poll functions git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7837 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/isert_login.c | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index c367fc7bf..34454ed8f 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -286,16 +286,16 @@ out: return res; } -static unsigned int isert_listen_poll(struct file *filp, - struct poll_table_struct *wait) +static __poll_t isert_listen_poll(struct file *filp, + struct poll_table_struct *wait) { struct isert_listener_dev *dev = filp->private_data; - unsigned int mask = 0; + __poll_t mask = 0; poll_wait(filp, &dev->waitqueue, wait); if (have_new_connection(dev)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; return mask; } @@ -832,21 +832,20 @@ out: return res; } -static unsigned int isert_poll(struct file *filp, - struct poll_table_struct *wait) +static __poll_t isert_poll(struct file *filp, struct poll_table_struct *wait) { struct isert_conn_dev *dev = filp->private_data; - unsigned int mask = 0; + __poll_t mask = 0; poll_wait(filp, &dev->waitqueue, wait); - if (!dev->conn || dev->state == CS_DISCONNECTED) - mask |= POLLHUP | POLLIN; - else { + if (!dev->conn || dev->state == CS_DISCONNECTED) { + mask |= EPOLLHUP | EPOLLIN; + } else { if (!will_read_block(dev)) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; - mask |= POLLOUT | POLLWRNORM; + mask |= EPOLLOUT | EPOLLWRNORM; } return mask;