From: Dan Williams <dan.j.williams@intel.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
clang-built-linux <clang-built-linux@googlegroups.com>,
Jason Gunthorpe <jgg@mellanox.com>
Subject: Re: [PATCH] libnvdimm/nfit_test: Fix acpi_handle redefinition
Date: Wed, 18 Sep 2019 16:40:18 -0700 [thread overview]
Message-ID: <CAPcyv4g-aCrn7pq967rFJ+K_ENifNkZ_azLg6S03V8TGuFdOhg@mail.gmail.com> (raw)
In-Reply-To: <20190918042148.77553-1-natechancellor@gmail.com>
On Tue, Sep 17, 2019 at 9:23 PM Nathan Chancellor
<natechancellor@gmail.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@gmail.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.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
prev parent reply other threads:[~2019-09-18 23:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 4:21 [PATCH] libnvdimm/nfit_test: Fix acpi_handle redefinition Nathan Chancellor
2019-09-18 21:45 ` Ira Weiny
2019-09-18 23:40 ` Dan Williams [this message]
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=CAPcyv4g-aCrn7pq967rFJ+K_ENifNkZ_azLg6S03V8TGuFdOhg@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=jgg@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=natechancellor@gmail.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).