From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Kaehlcke Subject: Re: [PATCH] kvm: x86: mmu: Add cast to negated bitmasks in update_permission_bitmask() Date: Tue, 19 Jun 2018 11:38:47 -0700 Message-ID: <20180619183847.GC169030@google.com> References: <20180615174731.47588-1-mka@chromium.org> <20180615182945.GN88063@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Nick Desaulniers , joe@perches.com, rkrcmar@redhat.com, Thomas Gleixner , hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, LKML To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, Jun 19, 2018 at 07:13:41PM +0200, Paolo Bonzini wrote: > On 19/06/2018 19:08, Nick Desaulniers wrote: > >> This one really makes the code uglier though, so I'm not really inclined > >> to applying the patch. > > Note that of the three variables (w, u, x), only u is used later on. > > What about declaring them as negated with the cast, that way there's > > no cast in a ternary? > > I still find it inferior, but I guess it's at least acceptable. I > prefer not_{x,w,u} though. :) Thanks Nick and Paolo for the suggestions, I'll sent an updated version soon.