From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] qemu/atomic: Rename atomic128-cas.h headers using .h.inc suffix
Date: Thu, 12 Dec 2024 16:17:47 +0100 [thread overview]
Message-ID: <ad7c3026-e307-4ae0-a985-c447ffa68aa0@linaro.org> (raw)
In-Reply-To: <5e8c7bd6-4afa-45bd-af79-3e03b9e6075a@linaro.org>
On 12/12/24 16:11, Richard Henderson wrote:
> On 12/12/24 09:09, Philippe Mathieu-Daudé wrote:
>> On 12/12/24 16:02, Richard Henderson wrote:
>>> On 12/12/24 08:10, Philippe Mathieu-Daudé wrote:
>>>> Since commit 139c1837db ("meson: rename included C source files
>>>> to .c.inc"), QEMU standard procedure for included C files is to
>>>> use *.c.inc.
>>>>
>>>> Besides, since commit 6a0057aa22 ("docs/devel: make a statement
>>>> about includes") this is documented in the Coding Style:
>>>>
>>>> If you do use template header files they should be named with
>>>> the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
>>>> being included for expansion.
>>>>
>>>> Therefore rename 'atomic128-cas.h' as 'atomic128-cas.h.inc'.
>>>
>>> But these are not templates, nor included multiple times, so...
>>> I don't get it.
>> I wanted to avoid including "qemu/atomic.h" in each of them due to:
>>
>> host/include/generic/host/atomic128-cas.h:23:11: error: call to
>> undeclared function 'qatomic_cmpxchg__nocheck'; ISO C99 and later do
>> not support implicit function declarations [-Wimplicit-function-
>> declaration]
>> 23 | r.i = qatomic_cmpxchg__nocheck(ptr_align, c.i, n.i);
>> | ^
>> 1 error generated.
>
> And why would you ever have that?
To have "not template" headers self-contained; but I'm fine discarding
these 2 patches and keeping the last one of this series.
next prev parent reply other threads:[~2024-12-12 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 14:10 [PATCH 0/3] qemu/atomic: Header cleanups Philippe Mathieu-Daudé
2024-12-12 14:10 ` [PATCH 1/3] qemu/atomic: Rename atomic128-cas.h headers using .h.inc suffix Philippe Mathieu-Daudé
2024-12-12 15:02 ` Richard Henderson
2024-12-12 15:09 ` Philippe Mathieu-Daudé
2024-12-12 15:11 ` Richard Henderson
2024-12-12 15:17 ` Philippe Mathieu-Daudé [this message]
2024-12-12 15:20 ` Richard Henderson
2024-12-12 14:10 ` [PATCH 2/3] qemu/atomic: Rename atomic128-ldst.h " Philippe Mathieu-Daudé
2024-12-12 14:10 ` [PATCH 3/3] qemu/atomic128: Include missing 'qemu/atomic.h' header Philippe Mathieu-Daudé
2024-12-12 15:03 ` Richard Henderson
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=ad7c3026-e307-4ae0-a985-c447ffa68aa0@linaro.org \
--to=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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.