From patchwork Thu Nov 21 05:18:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 11255311 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 15D0E6C1 for ; Thu, 21 Nov 2019 05:19:09 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B07C320708 for ; Thu, 21 Nov 2019 05:19:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.kernel.org header.i=@linux.kernel.org header.b="K1aqvAWK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B07C320708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+26986+935+1554929+3438807@linux.kernel.org X-Received: by 127.0.0.2 with SMTP id aaaaYY1556264xaaaaaaaaaa; Wed, 20 Nov 2019 21:19:08 -0800 X-Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web10.19936.1574313547519034240 for ; Wed, 20 Nov 2019 21:19:07 -0800 X-Received: by mail.kernel.org (Postfix) id F1AD220714; Thu, 21 Nov 2019 05:19:06 +0000 (UTC) X-Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6036A20708; Thu, 21 Nov 2019 05:19:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6036A20708 X-Received: by mail-pl1-f193.google.com with SMTP id q18so1011365pls.5; Wed, 20 Nov 2019 21:19:06 -0800 (PST) X-Gm-Message-State: aaaaaaaaaaaaaaaaaaaaaaaax1554929AA= X-Google-Smtp-Source: APXvYqyH1p+7hp3aLMytTjLJO0SS9t6/ATrY/cnkeBf8H3G0u47vfkEWkfcmPeY/HuMYs1PKroWjqQ== X-Received: by 2002:a17:902:9a05:: with SMTP id v5mr6892465plp.212.1574313545309; Wed, 20 Nov 2019 21:19:05 -0800 (PST) X-Received: from voyager.ibm.com ([36.255.48.244]) by smtp.gmail.com with ESMTPSA id r5sm1269267pfh.179.2019.11.20.21.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 21:19:04 -0800 (PST) From: Joel Stanley To: Linuxkernel+Patchwork-Soc via Email Integration Cc: linux-arm-kernel@lists.infradead.org, Luc Van Oostenryck , Andrew Jeffery Subject: [PATCH] soc: aspeed: Fix snoop_file_poll()'s return type Date: Thu, 21 Nov 2019 15:48:51 +1030 Message-Id: <20191121051851.268726-1-joel@jms.id.au> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: patchwork-soc@linux.kernel.org List-Id: Mailing-List: list patchwork-soc@linux.kernel.org; contact patchwork-soc+owner@linux.kernel.org Delivered-To: mailing list patchwork-soc@linux.kernel.org Reply-To: patchwork-soc+owner@linux.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.kernel.org; q=dns/txt; s=20140610; t=1574313548; bh=gaczc2mHhsh2Hjnhg+ZrgzvLL/tWICsBcGkLYnhhTVw=; h=Cc:Date:From:Reply-To:Subject:To; b=K1aqvAWKBS3pVPiImpIQ3MdCWtUx+XJ8EEiafdgyryruh1IcLitHnr63b3jZQ7LUEAk VUzOTMcafH2+O+v2fLdXAJdGV5F/Fd1Xv9+ZfamjcUlW9Ubdg7DNFWysg/p8/qF2JvODs Ls5ZIwTHQWeQEOfmR1UGH7bUkUnm1Fqsqf4= From: Luc Van Oostenryck snoop_file_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. Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Luc Van Oostenryck Reviewed-by: Joel Stanley Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley --- Hi ARM maintainers, can you please queue this one up for 5.5? drivers/soc/aspeed/aspeed-lpc-snoop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c index 48f7ac238861..f3d8d53ab84d 100644 --- a/drivers/soc/aspeed/aspeed-lpc-snoop.c +++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c @@ -97,13 +97,13 @@ static ssize_t snoop_file_read(struct file *file, char __user *buffer, return ret ? ret : copied; } -static unsigned int snoop_file_poll(struct file *file, +static __poll_t snoop_file_poll(struct file *file, struct poll_table_struct *pt) { struct aspeed_lpc_snoop_channel *chan = snoop_file_to_chan(file); poll_wait(file, &chan->wq, pt); - return !kfifo_is_empty(&chan->fifo) ? POLLIN : 0; + return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0; } static const struct file_operations snoop_fops = {