qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/3] target/hexagon: avoid shadowing globals


From: Thomas Huth
Subject: Re: [PATCH v2 3/3] target/hexagon: avoid shadowing globals
Date: Tue, 10 Oct 2023 11:10:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]