All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: linux-acpi@vger.kernel.org
Cc: Robert Moore <robert.moore@intel.com>,
	Erik Kaneda <erik.kaneda@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Note about acpi_get_table_header
Date: Tue, 4 Feb 2020 10:17:07 +0100	[thread overview]
Message-ID: <20200204101707.30eaa5bb@endymion> (raw)

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

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?

Thanks,
-- 
Jean Delvare
SUSE L3 Support

             reply	other threads:[~2020-02-04  9:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  9:17 Jean Delvare [this message]
2020-02-04 10:05 ` Note about acpi_get_table_header Hanjun Guo
2020-02-04 20:26   ` Moore, Robert

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=20200204101707.30eaa5bb@endymion \
    --to=jdelvare@suse.de \
    --cc=erik.kaneda@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@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.