RE: Note about acpi_get_table_header

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

 




-----Original Message-----
From: Hanjun Guo <guohanjun@xxxxxxxxxx> 
Sent: Tuesday, February 04, 2020 2:05 AM
To: Jean Delvare <jdelvare@xxxxxxx>; linux-acpi@xxxxxxxxxxxxxxx
Cc: Moore, Robert <robert.moore@xxxxxxxxx>; Kaneda, Erik <erik.kaneda@xxxxxxxxx>; Wysocki, Rafael J <rafael.j.wysocki@xxxxxxxxx>
Subject: Re: Note about acpi_get_table_header

On 2020/2/4 17:17, Jean Delvare wrote:
> Hello,
> 
> The description block before acpi_get_table_header() in 
> drivers/acpi/acpica/tbxface.c includes the following comment:
> 
>  * NOTE:        Caller is responsible in unmapping the header with
>  *              acpi_os_unmap_memory

I'm confused as well when I was reading the code.

> 
> However, looking at the code, it seems that we are already calling
> acpi_os_unmap_memory() internally as appropriate, and we always return 
> a copy of the header, not a pointer to it. So I see no reason why the 
> caller would ever need to call acpi_os_unmap_memory(). As a matter of 
> fact the only current caller of this function does NOT call
> acpi_os_unmap_memory() afterwards.
> 
> So I believe this note is wrong and should be removed?

Yes, the note is obsolete. I'll remove it.

Bob

I think so.

Thanks
Hanjun






[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