From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071Ab2HBFPf (ORCPT ); Thu, 2 Aug 2012 01:15:35 -0400 Received: from mga03.intel.com ([143.182.124.21]:5274 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751716Ab2HBFPd (ORCPT ); Thu, 2 Aug 2012 01:15:33 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="176028221" Date: Thu, 2 Aug 2012 13:10:21 +0800 From: Feng Tang To: Don Dutile Cc: , , , , , , , Subject: Re: [PATCH v2 1/2] ACPI: Replace acpi_get_table_with_size() with acpi_get_table() Message-ID: <20120802131021.7ee648e5@feng-i7> In-Reply-To: <501998BB.8060507@redhat.com> References: <1343803064-5389-1-git-send-email-feng.tang@intel.com> <501998BB.8060507@redhat.com> Organization: intel X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; i486-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 On Wed, 1 Aug 2012 16:59:39 -0400 Don Dutile wrote: > On 08/01/2012 02:37 AM, Feng Tang wrote: > > This is a preparation for removing the acpi_get_table_with_size(), as this > > function could be well covered by acpi_get_table(), and there is no need > > to have both of them to exist. > > > > v2: As reminded by Yinghai, apply the replacment to > > drivers/iommu/amd_iommu_init.c which is a new user of the > > acpi_get_table_with_size(). > > > > Signed-off-by: Feng Tang > > --- > > arch/x86/kernel/apic/es7000_32.c | 7 +++---- > > drivers/acpi/tables.c | 21 +++++++++------------ > > drivers/iommu/amd_iommu_init.c | 10 ++++------ > > drivers/iommu/dmar.c | 14 +++++++------- > > 4 files changed, 23 insertions(+), 29 deletions(-) > > > > diff --git a/arch/x86/kernel/apic/es7000_32.c > > b/arch/x86/kernel/apic/es7000_32.c index 0874799..ae30b39 100644 > > --- a/arch/x86/kernel/apic/es7000_32.c > > +++ b/arch/x86/kernel/apic/es7000_32.c > > @@ -242,19 +242,18 @@ static int __init find_unisys_acpi_oem_table(unsigned > > long *oem_addr) { > > struct acpi_table_header *header = NULL; > > struct es7000_oem_table *table; > > - acpi_size tbl_size; > > acpi_status ret; > > int i = 0; > > > > struct acpi_table_header * __initdata dmar_tbl; > > -static acpi_size dmar_tbl_size; > > > > static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) > > { > > @@ -285,10 +284,8 @@ static int __init dmar_table_detect(void) > > acpi_status status = AE_OK; > > > > /* if we could find DMAR table, then there are DMAR devices */ > > - status = acpi_get_table_with_size(ACPI_SIG_DMAR, 0, > > - (struct acpi_table_header **)&dmar_tbl, > > - &dmar_tbl_size); > > - > > + status = acpi_get_table(ACPI_SIG_DMAR, 0, > > + (struct acpi_table_header **)&dmar_tbl); > why is this cast needed if dmar_tbl is defined as struct acpi_table_header * ? Good catch, this is from the original code and I didn't notice that when making patch, will send a fix for it. Thanks, Feng