From: Alexander Graf <graf@amazon.de>
To: Andra Paraschiv <andraprs@amazon.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Anthony Liguori <aliguori@amazon.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Colm MacCarthaigh <colmmacc@amazon.com>,
"David Duncan" <davdunc@amazon.com>,
Bjoern Doebel <doebel@amazon.de>,
"David Woodhouse" <dwmw@amazon.co.uk>,
Frank van der Linden <fllinden@amazon.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Karen Noel <knoel@redhat.com>,
Martin Pohlack <mpohlack@amazon.de>, Matt Wilson <msw@amazon.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Stewart Smith <trawets@amazon.com>,
Uwe Dannowski <uwed@amazon.de>,
Vitaly Kuznetsov <vkuznets@redhat.com>, kvm <kvm@vger.kernel.org>,
ne-devel-upstream <ne-devel-upstream@amazon.com>
Subject: Re: [PATCH v2] nitro_enclaves: Fixup type and simplify logic of the poll mask setup
Date: Mon, 2 Nov 2020 18:50:51 +0100 [thread overview]
Message-ID: <405f71a6-9699-759d-2398-a17120d3fb96@amazon.de> (raw)
In-Reply-To: <20201102173622.32169-1-andraprs@amazon.com>
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 <andraprs@amazon.com>
> Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
Alex
> ---
> drivers/virt/nitro_enclaves/ne_misc_dev.c | 6 ++----
> 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)
>
> poll_wait(file, &ne_enclave->eventq, wait);
>
> - if (!ne_enclave->has_event)
> - return mask;
> -
> - mask = POLLHUP;
> + if (ne_enclave->has_event)
> + mask |= EPOLLHUP;
>
> return mask;
> }
>
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
next prev parent reply other threads:[~2020-11-02 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 17:36 [PATCH v2] nitro_enclaves: Fixup type and simplify logic of the poll mask setup Andra Paraschiv
2020-11-02 17:50 ` Alexander Graf [this message]
2020-11-02 18:29 ` Paraschiv, Andra-Irina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=405f71a6-9699-759d-2398-a17120d3fb96@amazon.de \
--to=graf@amazon.de \
--cc=aliguori@amazon.com \
--cc=andraprs@amazon.com \
--cc=benh@kernel.crashing.org \
--cc=colmmacc@amazon.com \
--cc=davdunc@amazon.com \
--cc=doebel@amazon.de \
--cc=dwmw@amazon.co.uk \
--cc=fllinden@amazon.com \
--cc=gregkh@linuxfoundation.org \
--cc=knoel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpohlack@amazon.de \
--cc=msw@amazon.com \
--cc=ne-devel-upstream@amazon.com \
--cc=pbonzini@redhat.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=trawets@amazon.com \
--cc=uwed@amazon.de \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox