From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751941AbbCJXPQ (ORCPT ); Tue, 10 Mar 2015 19:15:16 -0400 Received: from gate.crashing.org ([63.228.1.57]:58463 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbbCJXPO (ORCPT ); Tue, 10 Mar 2015 19:15:14 -0400 Message-ID: <1426029296.17565.11.camel@kernel.crashing.org> Subject: Re: [PATCH v5 03/29] vfio: powerpc/spapr: Check that TCE page size is equal to it_page_size From: Benjamin Herrenschmidt To: Alex Williamson Cc: Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org, Paul Mackerras , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 11 Mar 2015 10:14:56 +1100 In-Reply-To: <1426028606.25026.86.camel@redhat.com> References: <1425910045-26167-1-git-send-email-aik@ozlabs.ru> <1425910045-26167-4-git-send-email-aik@ozlabs.ru> <1426017408.25026.79.camel@redhat.com> <54FF76F4.5020503@ozlabs.ru> <1426028606.25026.86.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-03-10 at 17:03 -0600, Alex Williamson wrote: > > > return (PAGE_SHIFT + compound_order(compound_head(page) >= page_shift); > > > > This won't be "bool" though. > > Yes, it will. Don't you have your parenthesis in the wrong place, Alex ? :-) > > This will (I'll do this) > > > > shift = PAGE_SHIFT + compound_order(compound_head(page)); > > return (shift >= page_shift);