All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>
Cc: "jmoyer@redhat.com" <jmoyer@redhat.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
	"linux-nvdimm@ml01.01.org" <linux-nvdimm@ml01.01.org>
Subject: Re: [PATCH 2/3] acpi: add a utility function for evaluating _FIT
Date: Fri, 9 Oct 2015 10:56:26 -0700	[thread overview]
Message-ID: <CAPcyv4ihZa4LRxwsgnWFDGwBcRGw-Jb5n29iMBVPcHKF5538yQ@mail.gmail.com> (raw)
In-Reply-To: <1444413246.9638.7.camel@intel.com>

On Fri, Oct 9, 2015 at 10:54 AM, Verma, Vishal L
<vishal.l.verma@intel.com> wrote:
> On Fri, 2015-10-09 at 13:28 -0400, Jeff Moyer wrote:
>> Vishal Verma <vishal.l.verma@intel.com> writes:
>>
>> >  /**
>> > + * acpi_evaluate_fit: Evaluate _FIT method to get an updated NFIT
>> > + * @handle: ACPI device handle
>> > + * @buf: buffer for the updated NFIT
>> > + *
>> > + * Evaluate device's _FIT method if present to get an updated NFIT
>> > + */
>> > +acpi_status acpi_evaluate_fit(acpi_handle handle, struct
>> > acpi_buffer **buf)
>> > +{
>> > +   acpi_status status;
>> > +   struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL
>> > };
>> > +
>> > +   status = acpi_evaluate_object(handle, "_FIT", NULL,
>> > &buffer);
>> > +
>> > +   if (ACPI_FAILURE(status))
>> > +           return status;
>> > +
>> > +   *buf = &buffer;
>>
>> Umm, unless I'm missing something, you're returning a stack address.
>
> Good point, you're right. Dan/Rafael, is it OK to just remove this
> patch entirely, and call acpi_evaluate_object directly from nfit.c? The
> current way did feel a bit kludgey to me any way because I was
> allocating a buffer here (above), but trying to free it in the caller,
> which seems very ugly..

Open coding a call to acpi_evaluate_object() sounds good to me.

  reply	other threads:[~2015-10-09 17:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 21:49 [PATCH 0/3] Hotplug support for libnvdimm Vishal Verma
2015-10-07 21:49 ` [PATCH 1/3] nfit: in acpi_nfit_init, break on a 0-length table Vishal Verma
2015-10-09 17:23   ` Jeff Moyer
2015-10-09 17:27     ` Dan Williams
2015-10-09 17:51       ` Verma, Vishal L
2015-10-07 21:49 ` [PATCH 2/3] acpi: add a utility function for evaluating _FIT Vishal Verma
2015-10-09 17:28   ` Jeff Moyer
2015-10-09 17:54     ` Verma, Vishal L
2015-10-09 17:56       ` Dan Williams [this message]
2015-10-09 21:14         ` Rafael J. Wysocki
2015-10-07 21:49 ` [PATCH 3/3] acpi: nfit: Add support for hotplug Vishal Verma
2015-10-09 17:33   ` Jeff Moyer
2015-10-09 18:08     ` Verma, Vishal L
2015-10-09 18:13       ` Dan Williams
2015-10-09 19:44   ` Dan Williams
2015-10-13  0:35     ` Toshi Kani

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=CAPcyv4ihZa4LRxwsgnWFDGwBcRGw-Jb5n29iMBVPcHKF5538yQ@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=vishal.l.verma@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.