From patchwork Wed Sep 15 18:13:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Aravamudan X-Patchwork-Id: 64877 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id A87B110D24B for ; Thu, 16 Sep 2010 04:13:41 +1000 (EST) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com [32.97.182.144]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e4.ny.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 456E110CCB3 for ; Thu, 16 Sep 2010 04:13:28 +1000 (EST) Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by e4.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o8FHw47k013298 for ; Wed, 15 Sep 2010 13:58:04 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o8FIDOe8373892 for ; Wed, 15 Sep 2010 14:13:24 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o8FIDM8m008879 for ; Wed, 15 Sep 2010 14:13:24 -0400 Received: from arkanoid.localdomain (sig-9-65-116-150.mts.ibm.com [9.65.116.150]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o8FIDMc5008791; Wed, 15 Sep 2010 14:13:22 -0400 Received: by arkanoid.localdomain (Postfix, from userid 1000) id EABDAF3139; Wed, 15 Sep 2010 11:13:19 -0700 (PDT) Date: Wed, 15 Sep 2010 11:13:19 -0700 From: Nishanth Aravamudan To: nacc@us.ibm.com Subject: [PATCH 01/15] ppc: fix return type of BUID_{HI,LO} macros Message-ID: <20100915181319.GB3683@us.ibm.com> References: <1284573958-8397-1-git-send-email-nacc@us.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1284573958-8397-1-git-send-email-nacc@us.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Milton Miller , Paul Mackerras , Linas Vepstas , linuxppc-dev@lists.ozlabs.org, Breno Leitao X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org BUID_HI and BUID_LO are used to pass data to call_rtas, which expects ints or u32s. But the macro doesn't cast the return, so the result is still u64. Use the upper_32_bits and lower_32_bits macros that have been added to kernel.h. Found by getting printf format errors trying to debug print the args, no actual code change for 64 bit kernels where the macros are actually used. Signed-off-by: Milton Miller Signed-off-by: Nishanth Aravamudan Acked-by: Linas Vepstas --- arch/powerpc/include/asm/ppc-pci.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index 42fdff0..43268f1 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -28,8 +28,8 @@ extern void find_and_init_phbs(void); extern struct pci_dev *isa_bridge_pcidev; /* may be NULL if no ISA bus */ /** Bus Unit ID macros; get low and hi 32-bits of the 64-bit BUID */ -#define BUID_HI(buid) ((buid) >> 32) -#define BUID_LO(buid) ((buid) & 0xffffffff) +#define BUID_HI(buid) upper_32_bits(buid) +#define BUID_LO(buid) lower_32_bits(buid) /* PCI device_node operations */ struct device_node;