From patchwork Fri Dec 18 20:09:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 68787 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBIKBbLb020187 for ; Fri, 18 Dec 2009 20:11:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754089AbZLRUKz (ORCPT ); Fri, 18 Dec 2009 15:10:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755455AbZLRUKx (ORCPT ); Fri, 18 Dec 2009 15:10:53 -0500 Received: from hera.kernel.org ([140.211.167.34]:55332 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752516AbZLRUKw (ORCPT ); Fri, 18 Dec 2009 15:10:52 -0500 Received: from [10.6.76.26] (sca-ea-fw-1.Sun.COM [192.18.43.225]) (authenticated bits=0) by hera.kernel.org (8.14.3/8.14.3) with ESMTP id nBIKARTw021087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Dec 2009 20:10:28 GMT Message-ID: <4B2BE181.5090406@kernel.org> Date: Fri, 18 Dec 2009 12:09:37 -0800 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Jesse Barnes , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" CC: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: [PATCH 2/7] x86/pci: use resource_size_t in update_res -v2 References: <4B2BE063.4040704@kernel.org> In-Reply-To: <4B2BE063.4040704@kernel.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Index: linux-2.6/arch/x86/pci/bus_numa.c =================================================================== --- linux-2.6.orig/arch/x86/pci/bus_numa.c +++ linux-2.6/arch/x86/pci/bus_numa.c @@ -51,8 +51,8 @@ void x86_pci_root_bus_res_quirks(struct } } -void __devinit update_res(struct pci_root_info *info, size_t start, - size_t end, unsigned long flags, int merge) +void __devinit update_res(struct pci_root_info *info, resource_size_t start, + resource_size_t end, unsigned long flags, int merge) { int i; struct resource *res; @@ -65,20 +65,20 @@ void __devinit update_res(struct pci_roo /* try to merge it with old one */ for (i = 0; i < info->res_num; i++) { - size_t final_start, final_end; - size_t common_start, common_end; + resource_size_t final_start, final_end; + resource_size_t common_start, common_end; res = &info->res[i]; if (res->flags != flags) continue; - common_start = max((size_t)res->start, start); - common_end = min((size_t)res->end, end); + common_start = max(res->start, start); + common_end = min(res->end, end); if (common_start > common_end + 1) continue; - final_start = min((size_t)res->start, start); - final_end = max((size_t)res->end, end); + final_start = min(res->start, start); + final_end = max(res->end, end); res->start = final_start; res->end = final_end; Index: linux-2.6/arch/x86/pci/bus_numa.h =================================================================== --- linux-2.6.orig/arch/x86/pci/bus_numa.h +++ linux-2.6/arch/x86/pci/bus_numa.h @@ -22,6 +22,6 @@ extern int pci_root_num; extern struct pci_root_info pci_root_info[PCI_ROOT_NR]; extern int found_all_numa_early; -extern void update_res(struct pci_root_info *info, size_t start, - size_t end, unsigned long flags, int merge); +extern void update_res(struct pci_root_info *info, resource_size_t start, + resource_size_t end, unsigned long flags, int merge); #endif