lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ACPICA: Use uintptr_t and offsetof() in Linux kernel builds
On Wed, Jan 12, 2022 at 9:45 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> 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>

Thank you, I've applied this patch as 5.18 material.

A pull request for the analogous change in the upstream code base has
been submitted and Bob is going to take it AFAICS.

\
 
 \ /
  Last update: 2022-01-25 18:44    [W:0.039 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site