Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function

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

 



> On Tuesday, November 19, 2019 1:21:20 AM CET Sean Christopherson wrote:
> > Convert acpi_wakeup_address from a raw variable into a function so that
> > x86 can wrap its dereference of the real mode boot header in a function
> > instead of broadcasting it to the world via a #define.  This sets the
> > stage for a future patch to move the definition of acpi_wakeup_address()
> > out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> 
> > --- a/drivers/acpi/sleep.c
> > +++ b/drivers/acpi/sleep.c
> > @@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
> >  #ifdef CONFIG_ACPI_SLEEP
> >  	/* do we have a wakeup address for S2 and S3? */
> >  	if (acpi_state == ACPI_STATE_S3) {
> > -		if (!acpi_wakeup_address)
> > +		if (!acpi_wakeup_address())
> >  			return -EFAULT;
> > -		acpi_set_waking_vector(acpi_wakeup_address);
> > +		acpi_set_waking_vector(acpi_wakeup_address());
> >  

You might want to store result in a variable... especially since you are
turning inline function into real one in a next patch.

And maybe function should be called get_acip_wakeup_address or
something? This way it is easy to mistake actual wakeup address from
function that gets it...

Best regards,
									Pavel
> 
> 



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux