linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Feng Tang <feng.tang@intel.com>
To: Don Dutile <ddutile@redhat.com>
Cc: len.brown@intel.com, linux-acpi@vger.kernel.org,
	yinghai@kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org,
	robert.moore@intel.com, agordeev@redhat.com,
	suresh.b.siddha@intel.com
Subject: Re: [PATCH v2 1/2] ACPI: Replace acpi_get_table_with_size() with acpi_get_table()
Date: Thu, 2 Aug 2012 13:10:21 +0800	[thread overview]
Message-ID: <20120802131021.7ee648e5@feng-i7> (raw)
In-Reply-To: <501998BB.8060507@redhat.com>

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




      reply	other threads:[~2012-08-02  5:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01  6:37 [PATCH v2 1/2] ACPI: Replace acpi_get_table_with_size() with acpi_get_table() Feng Tang
2012-08-01 20:59 ` Don Dutile
2012-08-02  5:10   ` Feng Tang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120802131021.7ee648e5@feng-i7 \
    --to=feng.tang@intel.com \
    --cc=agordeev@redhat.com \
    --cc=ddutile@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.moore@intel.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).