linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Bob Moore <robert.moore@intel.com>
Subject: Re: [PATCH] ACPICA: Use uintptr_t and offsetof() in Linux kernel builds
Date: Wed, 12 Jan 2022 09:45:06 +0100	[thread overview]
Message-ID: <CAK8P3a1vQj10a4ztj8KfSuxGkOfooB=6q0xj_s5pmhzoS00S1w@mail.gmail.com> (raw)
In-Reply-To: <2614912.mvXUDI8C0e@kreacher>

On Tue, Jan 11, 2022 at 4:55 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> To avoid "performing pointer subtraction with a null pointer has
> undefined behavior" compiler warnings, use uintptr_t and offsetof()
> that are always available during Linux kernel builds to define
> acpi_uintptr_t and the ACPI_TO_INTEGER() and ACPI_OFFSET() macros.
>
> Based on earlier proposal from Arnd Bergmann.
>
> Link: https://lore.kernel.org/linux-acpi/20210927121338.938994-1-arnd@kernel.org
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Thanks for the follow-up. I can't easily test this at the moment, but
it looks correct to
me. I had a different approach that I had planned to eventually
submit, but yours
looks better anyway, so let's go with this.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

  reply	other threads:[~2022-01-12  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 15:55 [PATCH] ACPICA: Use uintptr_t and offsetof() in Linux kernel builds Rafael J. Wysocki
2022-01-12  8:45 ` Arnd Bergmann [this message]
2022-01-25 17:43   ` Rafael J. Wysocki

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='CAK8P3a1vQj10a4ztj8KfSuxGkOfooB=6q0xj_s5pmhzoS00S1w@mail.gmail.com' \
    --to=arnd@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).