[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPcyv4g-aCrn7pq967rFJ+K_ENifNkZ_azLg6S03V8TGuFdOhg@mail.gmail.com>
Date: Wed, 18 Sep 2019 16:40:18 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Keith Busch <keith.busch@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Jason Gunthorpe <jgg@...lanox.com>,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] libnvdimm/nfit_test: Fix acpi_handle redefinition
On Tue, Sep 17, 2019 at 9:23 PM Nathan Chancellor
<natechancellor@...il.com> wrote:
>
> After commit 62974fc389b3 ("libnvdimm: Enable unit test infrastructure
> compile checks"), clang warns:
>
> In file included from
> ../drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.c:15:
> ../drivers/nvdimm/../../tools/testing/nvdimm/test/nfit_test.h:206:15:
> warning: redefinition of typedef 'acpi_handle' is a C11 feature
> [-Wtypedef-redefinition]
> typedef void *acpi_handle;
> ^
> ../include/acpi/actypes.h:424:15: note: previous definition is here
> typedef void *acpi_handle; /* Actually a ptr to a NS Node */
> ^
> 1 warning generated.
>
> The include chain:
>
> iomap.c ->
> linux/acpi.h ->
> acpi/acpi.h ->
> acpi/actypes.h
> nfit_test.h
>
> Avoid this by including linux/acpi.h in nfit_test.h, which allows us to
> remove both the typedef and the forward declaration of acpi_object.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/660
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
>
> I know that every maintainer has their own thing with the number of
> includes in each header file; this issue can be solved in a various
> number of ways, I went with the smallest diff stat. Please solve it in a
> different way if you see fit :)
>
Looks good to me. I'll pick this up for a post v5.4-rc1 push.
Powered by blists - more mailing lists