[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-alpha
Subject:    Re: [PATCH v2 3/5] locking/arch: Wire up local_try_cmpxchg
From:       Charlemagne Lasse <charlemagnelasse () gmail ! com>
Date:       2023-05-17 7:41:41
Message-ID: CAFGhKbyxtuk=LoW-E3yLXgcmR93m+Dfo5-u9oQA_YC5Fcy_t9g () mail ! gmail ! com
[Download RAW message or body]

> +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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic