From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9EBEC35641 for ; Fri, 21 Feb 2020 08:33:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2FB520578 for ; Fri, 21 Feb 2020 08:33:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582274013; bh=tRYepbfaD7Zd5Bn6ptVzfWced5IDJEWaxH48PkLZIew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Z21a5Wzviu7YCGCNwWEHDZJU63sAGMPTKKm9cXXE8wobL4yb+ItwqFK+qiU51l7ta zTbQUcdpyqJOyECBpOd6s+dQcqFmVm2r6MYQkI33QhtqCRXqQbLXzo3NJwNStJgQtQ 7ssH1NqGvfRJ1522JMrEZ0sbj9Wra6D+9der9Mdo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732573AbgBUIKk (ORCPT ); Fri, 21 Feb 2020 03:10:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:45840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727872AbgBUIKf (ORCPT ); Fri, 21 Feb 2020 03:10:35 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B300320578; Fri, 21 Feb 2020 08:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272635; bh=tRYepbfaD7Zd5Bn6ptVzfWced5IDJEWaxH48PkLZIew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Llt9TMgMVAw6aGRJixyQ1t9fc8LtwC1o5psdkxrT31gax4yRQ0MOoIHGloJH3DFgq gH9pWXljCRj0TrHioFrVWYC2kZkl2L7b7Xo8a3XnClFLMRqvuB6NKQJlziu4wd6S/B gvVY1EwKhK940fGjQTUTm7ZGiZuX1JqInFykvCSY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Derek Kiernan , Dragan Cvetic , Luc Van Oostenryck , Sasha Levin Subject: [PATCH 5.4 216/344] misc: xilinx_sdfec: fix xsdfec_poll()s return type Date: Fri, 21 Feb 2020 08:40:15 +0100 Message-Id: <20200221072408.808349955@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072349.335551332@linuxfoundation.org> References: <20200221072349.335551332@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luc Van Oostenryck [ Upstream commit fa4e7fc1386078edcfddd8848cb0374f4af74fe7 ] xsdfec_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type. Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t. CC: Derek Kiernan CC: Dragan Cvetic Signed-off-by: Luc Van Oostenryck Acked-by: Dragan Cvetic Link: https://lore.kernel.org/r/20191209213655.57985-1-luc.vanoostenryck@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/misc/xilinx_sdfec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c index 11835969e9828..48ba7e02bed72 100644 --- a/drivers/misc/xilinx_sdfec.c +++ b/drivers/misc/xilinx_sdfec.c @@ -1025,25 +1025,25 @@ static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd, } #endif -static unsigned int xsdfec_poll(struct file *file, poll_table *wait) +static __poll_t xsdfec_poll(struct file *file, poll_table *wait) { - unsigned int mask = 0; + __poll_t mask = 0; struct xsdfec_dev *xsdfec; xsdfec = container_of(file->private_data, struct xsdfec_dev, miscdev); if (!xsdfec) - return POLLNVAL | POLLHUP; + return EPOLLNVAL | EPOLLHUP; poll_wait(file, &xsdfec->waitq, wait); /* XSDFEC ISR detected an error */ spin_lock_irqsave(&xsdfec->error_data_lock, xsdfec->flags); if (xsdfec->state_updated) - mask |= POLLIN | POLLPRI; + mask |= EPOLLIN | EPOLLPRI; if (xsdfec->stats_updated) - mask |= POLLIN | POLLRDNORM; + mask |= EPOLLIN | EPOLLRDNORM; spin_unlock_irqrestore(&xsdfec->error_data_lock, xsdfec->flags); return mask; -- 2.20.1