From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>
Cc: "Brian Cain" <bcain@quicinc.com>,
"richard.henderson@linaro.org" <richard.henderson@linaro.org>,
"anjo@rev.ng" <anjo@rev.ng>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"Matheus Bernardino (QUIC)" <quic_mathbern@quicinc.com>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"ale@rev.ng" <ale@rev.ng>,
"Marco Liebel (QUIC)" <quic_mliebel@quicinc.com>,
"ltaylorsimpson@gmail.com" <ltaylorsimpson@gmail.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 3/3] target/hexagon: avoid shadowing globals
Date: Tue, 10 Oct 2023 11:10:12 +0200 [thread overview]
Message-ID: <5705bd47-fcaf-09ba-a749-5773ecd71cae@redhat.com> (raw)
In-Reply-To: <eb92e802-de68-27ac-a22a-706039906939@linaro.org>
On 10/10/2023 09.34, Philippe Mathieu-Daudé wrote:
> On 10/10/23 08:04, Markus Armbruster wrote:
>> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>>
>> [...]
>>
>>> If we have to clean that for -Wshadow=global, I'm tempted to rename
>>> the typedef as 'vaddr_t' and keep the 'vaddr' variable names.
>>
>> POSIX reserves suffix _t, see
>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02
>
> Alternatives: tvaddr, VAddr, TargetVirtualAddress.
>
> Naming is hard.
>
>> Do we care?
According to our docs/devel/style.rst :
"Scalar type
names are lower_case_with_underscores_ending_with_a_t, like the POSIX
uint64_t and family. Note that this last convention contradicts POSIX
and is therefore likely to be changed."
Maybe this would be a good point in time now to revisit our coding style,
update it and then to change the "vaddr" type accordingly?
My 0.02 €: If enum types should already be in CamelCase, why not also use
that for scalar types? So I'd vote for VirtAddr or VAddr here.
Thomas
next prev parent reply other threads:[~2023-10-10 9:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 22:22 [PATCH v2 0/3] hexagon: GETPC() and shadowing fixes Brian Cain
2023-10-05 22:22 ` [PATCH v2 1/3] target/hexagon: move GETPC() calls to top level helpers Brian Cain
2023-10-05 22:22 ` [PATCH v2 2/3] target/hexagon: fix some occurrences of -Wshadow=local Brian Cain
2023-10-06 5:49 ` Philippe Mathieu-Daudé
2023-10-06 14:59 ` ltaylorsimpson
2023-10-05 22:22 ` [PATCH v2 3/3] target/hexagon: avoid shadowing globals Brian Cain
2023-10-06 16:00 ` ltaylorsimpson
2023-10-08 13:49 ` Brian Cain
2023-10-09 18:59 ` ltaylorsimpson
2023-10-09 6:09 ` Philippe Mathieu-Daudé
2023-10-09 6:43 ` Philippe Mathieu-Daudé
2023-10-09 20:53 ` Brian Cain
2023-10-10 5:22 ` Philippe Mathieu-Daudé
2023-10-10 6:04 ` Markus Armbruster
2023-10-10 7:34 ` Philippe Mathieu-Daudé
2023-10-10 9:10 ` Thomas Huth [this message]
2023-10-18 3:11 ` Brian Cain
2023-10-10 4:57 ` Markus Armbruster
2023-10-06 9:00 ` [PATCH v2 0/3] hexagon: GETPC() and shadowing fixes Markus Armbruster
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=5705bd47-fcaf-09ba-a749-5773ecd71cae@redhat.com \
--to=thuth@redhat.com \
--cc=ale@rev.ng \
--cc=anjo@rev.ng \
--cc=armbru@redhat.com \
--cc=bcain@quicinc.com \
--cc=berrange@redhat.com \
--cc=ltaylorsimpson@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quic_mathbern@quicinc.com \
--cc=quic_mliebel@quicinc.com \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.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).