Re: [PATCH] acpi: remove dead code

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

 



On Tue, 19 Oct 2010, Lin Ming wrote:

> On Tue, Oct 19, 2010 at 12:49 AM, Len Brown <lenb@xxxxxxxxxx> wrote:
> > On Mon, 18 Oct 2010, Stephen Hemminger wrote:
> >
> >> Found by running make namespacecheck on linux-next
> >>
> >> Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxx>
> >>
> >> --- a/drivers/acpi/osl.c      2010-10-06 13:42:58.722974685 +0900
> > ...
> >>  /*
> >> - * Allocate the memory for a spinlock and initialize it.
> >> - */
> >> -acpi_status acpi_os_create_lock(acpi_spinlock * handle)
> >> -{
> >> -     spin_lock_init(*handle);
> >> -
> >> -     return AE_OK;
> >> -}
> >
> > ACPICA declares acpi_os_create_lock in acpiosxf.h,
> > but never calls it.  Bob, can we do away with it?
> 
> In ACPICA code (AcpiUtMutexInitialize),
> 
>     Status = AcpiOsCreateLock (&AcpiGbl_GpeLock);
>     if (ACPI_FAILURE (Status))
>     {
>         return_ACPI_STATUS (Status);
>     }
> 
>     Status = AcpiOsCreateLock (&AcpiGbl_HardwareLock);
>     if (ACPI_FAILURE (Status))
>     {
>         return_ACPI_STATUS (Status);
>     }
> 
> In Linux code (acpi_ut_mutex_initialize)
> 
>         spin_lock_init(acpi_gbl_gpe_lock);
>         spin_lock_init(acpi_gbl_hardware_lock);
> 
> This is another divergence between ACPICA and Linux code.

Lin-Ming,

Thanks for the explanation.

I've applied Stephen's patch, since it is correct.
If you later want to send me patches to reduce the divergence
between ACPICA and Linux/ACPICA, I'll be happy to accept them.

thanks,
Len Brown, Intel Open Source Technology Center

[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