Re: [PATCH 2/3] acpi: add a utility function for evaluating _FIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2015-10-09 at 13:28 -0400, Jeff Moyer wrote:
> Vishal Verma <vishal.l.verma@xxxxxxxxx> 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..
��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux