Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933121AbdHYOQV (ORCPT ); Fri, 25 Aug 2017 10:16:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:55528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933107AbdHYOQS (ORCPT ); Fri, 25 Aug 2017 10:16:18 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2284219AA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Fri, 25 Aug 2017 10:16:15 -0400 From: Steven Rostedt To: Thomas Gleixner Cc: Boris Ostrovsky , LKML , Ingo Molnar , Peter Anvin , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Juergen Gross Subject: Re: [patch 20/41] x86: Replace access to desc_struct:a/b fields Message-ID: <20170825101615.045fd1c0@gandalf.local.home> In-Reply-To: References: <20170825103103.287814238@linutronix.de> <20170825104414.553007376@linutronix.de> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 27 On Fri, 25 Aug 2017 16:02:02 +0200 (CEST) Thomas Gleixner wrote: > On Fri, 25 Aug 2017, Boris Ostrovsky wrote: > > > > > > > > > Index: b/arch/x86/xen/enlighten_pv.c > > > =================================================================== > > > --- a/arch/x86/xen/enlighten_pv.c > > > +++ b/arch/x86/xen/enlighten_pv.c > > > @@ -494,7 +494,7 @@ static void __init xen_load_gdt_boot(con > > > static inline bool desc_equal(const struct desc_struct *d1, > > > const struct desc_struct *d2) > > > { > > > - return d1->a == d2->a && d1->b == d2->b; > > > + return memcmp(d1, d2, sizeof(*d1)); > > > } > > > > Shouldn't this be !memcmp() ? > > Bah yes. This is why I'm one of those that like to add the "== 0" to it. Because I always get this wrong :-p -- Steve