lkml.org 
[lkml]   [2012]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] ACPI: Replace acpi_get_table_with_size() with acpi_get_table()
On Wed, 1 Aug 2012 16:59:39 -0400
Don Dutile <ddutile@redhat.com> 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<feng.tang@intel.com>
> > ---
> > 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





\
 
 \ /
  Last update: 2012-08-02 08:01    [W:0.488 / U:0.928 seconds]
©2003-2014 Jasper Spaans. Advertise on this site