Thread (20 messages) 20 messages, 6 authors, 2023-05-17

Re: [PATCH v2 3/5] locking/arch: Wire up local_try_cmpxchg

From: Charlemagne Lasse <hidden>
Date: 2023-05-17 07:42:02
Also in: linux-alpha, linux-arch, linux-mips, linux-perf-users, lkml, loongarch

+static __inline__ bool local_try_cmpxchg(local_t *l, long *old, long new)
+{
+       typeof(l->a.counter) *__old = (typeof(l->a.counter) *) old;
+       return try_cmpxchg_local(&l->a.counter, __old, new);
+}
+
This patch then causes following sparse errors:

    ./arch/x86/include/asm/local.h:131:16: warning: symbol '__old'
shadows an earlier one
    ./arch/x86/include/asm/local.h:130:30: originally declared here

This is then visible in all kinds of builds - which makes it hard to
find out actual problems with sparse.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help