Re: [PATCH v2] percpu: do not put btf_type_tag on per-cpu variable declarations
From: Alexei Starovoitov
Date: Wed Dec 02 2026 - 20:35:23 EST
On Wed, Dec 02, 2026 at 12:04 PM Vineet Gupta <vineet.gupta@xxxxxxxxx> wrote:
>> It's really GCC behavior. clang does fine as-is.
>
> Because clang ignores the construct GCC warns about.
For the variable, yes.
But clang keeps the tag in the type of &var.
this_cpu_ptr(&var) gives PTR -> TYPE_TAG 'percpu' -> T.
So this commit will remove 140 such valid tags?
Doesn't seem fair to clang.
I'm probably missing something.
if not should we push/pop -Wno-attributes around that one construct?