Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3511997pxx; Mon, 2 Nov 2020 10:48:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJHx38AIwW2y1mG0TMypDHM9PNw6JHHZzZhxiaDjXf5NjjwHkB7GZFZwwdfywf1DCNR6KF X-Received: by 2002:aa7:df89:: with SMTP id b9mr18058010edy.335.1604342937570; Mon, 02 Nov 2020 10:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604342937; cv=none; d=google.com; s=arc-20160816; b=lGjc6dQ68VqDvrab0Tmbo7xh3/y1EjjQqs8+WkquQnT/lNFV7tNKjQS30U+AfB4lK/ KnQCJ8DiEx8cgvse2sUKlpnHfLQul48R4RjyuVknEVJcBAmCV1do1qCeFZiumFjwwjEH 2yJGOHBNavp7tWG1MfHjtMw5yCjmMhVbSfJb0yYeVkakFHkFZIM4k+JJ+U8ZaOdnQFJw PCvThXa4g/B0Tx7G9vdXvqvQhtaHclSUMS4gnPoIaHany4T7zUjThNKLJ352eRWcqq4R JRxRMLEE+OIanzJov0hw0H4mFq+LS4aXFvzlfMht2fo7MJdtZloHtkxHuRGyEJO5CqsK ZBVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=m9xa0Q50hB51kyL00HPQc1iIAciQpiHFcfPK31KVln8=; b=L2VORO5RJPFlXTVorqsQSs/3HuIvpzyUYkhiLiRkTe4dFWlykwkeeQZNwjk0Y9EjJp bSDqUa5whMSpqIygPIJ2fp1Vo7iZsutUD4/F+uMrO6l+HhXh34UsQu0X1ONPYHGjUgtD jLzgpwZFKd5eNM4z+BXLUD73OgjxmBbNiV+HyaIwqZ4xKYZ8Ht1zNzA0UVvii9Te1yse 1Co11fu7qMe+zXe+uiVV5rauw3AZ8bBmQf9g7sgHn191KxXzOQTP2Vvq/iB5jI1bx74P b+KfFjSTpCTYIHZ0zm47Pj3FzDbpfJeqBnsq5O3kUUs5PX/dOVjzBSh2dhGhRBimiWxd BR9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=j31NjeJH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v17si3401785ejr.127.2020.11.02.10.48.34; Mon, 02 Nov 2020 10:48:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=j31NjeJH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbgKBSn7 (ORCPT + 99 others); Mon, 2 Nov 2020 13:43:59 -0500 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:14767 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbgKBSn5 (ORCPT ); Mon, 2 Nov 2020 13:43:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1604342637; x=1635878637; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=m9xa0Q50hB51kyL00HPQc1iIAciQpiHFcfPK31KVln8=; b=j31NjeJHPsVjZ1xtVHgliwmaw2efQko798QSGRamXpLvlsROkDMCKUVs GBFKTxV/WKBCTVb/G/3/ghXYq5nLBLqemGoa35QgkapEEAPjsDeyGgfDD okeJ+IRu2KvZWOrUYgh6vRrYmLeMTYnBewE4M7qENSH8rlsx9bPCKvn0I M=; X-IronPort-AV: E=Sophos;i="5.77,445,1596499200"; d="scan'208";a="82850716" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2b-a7fdc47a.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 02 Nov 2020 18:34:02 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2b-a7fdc47a.us-west-2.amazon.com (Postfix) with ESMTPS id D1F23C0696; Mon, 2 Nov 2020 18:29:40 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.160.229) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 2 Nov 2020 18:29:31 +0000 Subject: Re: [PATCH v2] nitro_enclaves: Fixup type and simplify logic of the poll mask setup To: Alexander Graf , linux-kernel , Greg Kroah-Hartman CC: Anthony Liguori , Benjamin Herrenschmidt , Colm MacCarthaigh , "David Duncan" , Bjoern Doebel , "David Woodhouse" , Frank van der Linden , Karen Noel , Martin Pohlack , "Matt Wilson" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Stewart Smith , Uwe Dannowski , "Vitaly Kuznetsov" , kvm , ne-devel-upstream References: <20201102173622.32169-1-andraprs@amazon.com> <405f71a6-9699-759d-2398-a17120d3fb96@amazon.de> From: "Paraschiv, Andra-Irina" Message-ID: Date: Mon, 2 Nov 2020 20:29:20 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <405f71a6-9699-759d-2398-a17120d3fb96@amazon.de> Content-Language: en-US X-Originating-IP: [10.43.160.229] X-ClientProxiedBy: EX13P01UWA003.ant.amazon.com (10.43.160.197) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Content-Type: text/plain; charset="windows-1252"; format="flowed" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/2020 19:50, Alexander Graf wrote: > > > On 02.11.20 18:36, Andra Paraschiv wrote: >> Update the assigned value of the poll result to be EPOLLHUP instead of >> POLLHUP to match the __poll_t type. >> >> While at it, simplify the logic of setting the mask result of the poll >> function. >> >> Changelog >> >> v1 -> v2 >> >> * Simplify the mask setting logic from the poll function. >> >> Signed-off-by: Andra Paraschiv >> Reported-by: kernel test robot > > Reviewed-by: Alexander Graf > > Greg, let me know if there is anything remaining to be done for this = patch. Otherwise, can you please add the patch to the char-misc tree. Thanks, Andra > >> --- >> =A0 drivers/virt/nitro_enclaves/ne_misc_dev.c | 6 ++---- >> =A0 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/virt/nitro_enclaves/ne_misc_dev.c = >> b/drivers/virt/nitro_enclaves/ne_misc_dev.c >> index f06622b48d695..f1964ea4b8269 100644 >> --- a/drivers/virt/nitro_enclaves/ne_misc_dev.c >> +++ b/drivers/virt/nitro_enclaves/ne_misc_dev.c >> @@ -1505,10 +1505,8 @@ static __poll_t ne_enclave_poll(struct file = >> *file, poll_table *wait) >> =A0 =A0=A0=A0=A0=A0 poll_wait(file, &ne_enclave->eventq, wait); >> =A0 -=A0=A0=A0 if (!ne_enclave->has_event) >> -=A0=A0=A0=A0=A0=A0=A0 return mask; >> - >> -=A0=A0=A0 mask =3D POLLHUP; >> +=A0=A0=A0 if (ne_enclave->has_event) >> +=A0=A0=A0=A0=A0=A0=A0 mask |=3D EPOLLHUP; >> =A0 =A0=A0=A0=A0=A0 return mask; >> =A0 } >> Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar= Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in R= omania. Registration number J22/2621/2005.