Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1453628ybc; Tue, 19 Nov 2019 21:44:59 -0800 (PST) X-Google-Smtp-Source: APXvYqx4Tfw8AhQkWFSRMZxLfT/2AxJ+ottKtPsHhswQ913J/egZoogd1xQmYqEpr6khoW/1y+9d X-Received: by 2002:a17:906:c293:: with SMTP id r19mr2679710ejz.69.1574228699247; Tue, 19 Nov 2019 21:44:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574228699; cv=none; d=google.com; s=arc-20160816; b=SN3BPXt/8kuZzHbjUDfnz1vNqeh7hyRwv6jVztfSV232pDRlOJ6uP+TDG9oJVid+Vz KnxPSaiIEIUhgiTs0f6q6npfQCbVvuoCe6sii4YvByx+LYxC6IEZj6uArciIuaVGQb7/ R5IPrzKEA1v6LG+6D0Y8e5SJYtv9JNXerI58CG17jCqxjm98xXDuTWvHThKxxd6jXPQ/ 3NvR6nWZwcgnv48b0mSMSv0Wh4MznrxCgxIpKXbDYDcXwL2GM/YU88g7ZcSVXlmeT5Wa F0PlDXgzAu3OjTY5AZcFHAb9pZ7X+jm9jUEj6HJjhWxArDQmA8dJs5wHb6Cp6mC50cuN YAfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:user-agent:dkim-signature :dkim-signature; bh=Lnorfs1rp+zeMCoeD57/2AmXPyjOL0Ha6BaQrOFchsU=; b=06YpRG8q+5D2rjuG6xq5Wi5+lRRYo6yUImWXmxZd9jpWfNm9o1wEw7cjnYvOxHXuTO gPTJxuweqHbk13FzVFyOZd8ejGK0bZycC49jLWI5en2Ffq1+9NFgwvrEtrSL95NxV9e8 IlTMqR/YoqlAzoERE+P3KjyLsCZutuMXc4j/khz+kS1hiacXxYueq5Xq8ZulrsVVN6OP jDyNOPOUqovlxudfbuxlcIxUUjTTTeJI9Bg6on87nGw/hO+dJiiK8byU7TsuY71jNCl9 J8kYDIw6eYIvSPiU7jAYAI/0xl3jMmPdctnCuhkVs20qcFhFHvb0DAqpif2iaDUQu8Hm 2tQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm1 header.b=o3qGQUUe; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RnqnHsG5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o57si18118170edc.240.2019.11.19.21.44.25; Tue, 19 Nov 2019 21:44:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm1 header.b=o3qGQUUe; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RnqnHsG5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbfKTFmx (ORCPT + 99 others); Wed, 20 Nov 2019 00:42:53 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:54467 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbfKTFmw (ORCPT ); Wed, 20 Nov 2019 00:42:52 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DCCF544D; Wed, 20 Nov 2019 00:42:49 -0500 (EST) Received: from imap2 ([10.202.2.52]) by compute4.internal (MEProxy); Wed, 20 Nov 2019 00:42:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=Lnorfs1rp+zeMCoeD57/2AmXPyjOL0H a6BaQrOFchsU=; b=o3qGQUUe6InpOAYfXy8pZ4Aqs4r7RB1G35quGiCXZDIklgV 45j60gck2g/zQszAqi8c5Za9uuFa5OToie9TG5wKf3NeoRnlvwagMRfc//Pk0rYF Kp0HVwjVqIUqToU3xq5+rXif9s6UpACLMZAkRRCmwD5Si7rJP0tbTT2QE/WFQrE7 7VuKvrMKtD2juGIk6FP0krdUfbgTJezKfvtUjqvYGxLAtovkGV5Fv0pyKDa660Cj Ydmasn6PPM9s6FrItrawAHkv4na+e4PssTrh1Gw5Rd4NjOJbUIlskIlSnVJTjx/H VKAqBkMlAYYu2/hW2uhZSv5Mfm4ySiVTzwVC4hg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Lnorfs 1rp+zeMCoeD57/2AmXPyjOL0Ha6BaQrOFchsU=; b=RnqnHsG5F6inIIh5Q4zjgm jhT8HWunrIhBUgPDBTzdY+IWPi5/RIUCil/IMKaxvwJStupYTq2x4Nfai/529Ew/ CbSkQXByeHdM9Zn9jr6Aak2WeoWvz+zCIOzdEPis/Pj43NpTZUhzrAU2LCvEg5At Ob90D1o6vVMxq6i6iLhSYOClZhVI0j7bZhnyhTpVnypYpe18cS/iSanEk2EGNsZU AFX9JbHLDzBuSM31HA/uwhdD+4JNEcbxRUFMZCSRKl1zORz/LfrqUMtZ3Wzhm/Zk MBlSniBn3RO6TNRZe4c4wMYGd6vAKtX7P7U6oQ8s2CnSsm20lmILh0INSbO5RmPw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudegledgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdetnhgu rhgvficulfgvfhhfvghrhidfuceorghnughrvgifsegrjhdrihgurdgruheqnecurfgrrh grmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghunecuvehluhhsthgv rhfuihiivgeptd X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id C89EFE00A3; Wed, 20 Nov 2019 00:42:48 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-578-g826f590-fmstable-20191119v1 Mime-Version: 1.0 Message-Id: <787e54c2-2fe3-4afc-a69b-94771726194b@www.fastmail.com> In-Reply-To: <20191120000647.30551-1-luc.vanoostenryck@gmail.com> References: <20191120000647.30551-1-luc.vanoostenryck@gmail.com> Date: Wed, 20 Nov 2019 16:14:12 +1030 From: "Andrew Jeffery" To: "Luc Van Oostenryck" , linux-kernel@vger.kernel.org, "Robert Lippert" , "Patrick Venture" Cc: "Joel Stanley" , linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] aspeed: fix snoop_file_poll()'s return type Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Nov 2019, at 10:36, Luc Van Oostenryck wrote: > 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. > > CC: Joel Stanley > CC: Andrew Jeffery > CC: linux-aspeed@lists.ozlabs.org > CC: linux-arm-kernel@lists.infradead.org > Signed-off-by: Luc Van Oostenryck > --- > 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; Looks fine to me as POLLIN and EPOLLIN evaluate to the same value despite the type difference. Patrick, Rob: can you take a look / test? Andrew