• Sabrina Dubroca's avatar
    net: fix sparse warnings in SNMP_UPD_PO_STATS(_BH) · 54003f11
    Sabrina Dubroca authored
    ptr used to be a non __percpu pointer (result of a this_cpu_ptr
    assignment, 7d720c3e ("percpu: add __percpu sparse annotations to
    net")). Since d25398df ("net: avoid reloads in SNMP_UPD_PO_STATS"),
    that's no longer the case, SNMP_UPD_PO_STATS uses this_cpu_add and ptr
    is now __percpu.
    
    Silence sparse warnings by preserving the original type and
    annotation, and remove the out-of-date comment.
    
    warning: incorrect type in initializer (different address spaces)
       expected unsigned long long *ptr
       got unsigned long long [noderef] <asn:3>*<noident>
    warning: incorrect type in initializer (different address spaces)
       expected void const [noderef] <asn:3>*__vpp_verify
       got unsigned long long *<noident>
    warning: incorrect type in initializer (different address spaces)
       expected void const [noderef] <asn:3>*__vpp_verify
       got unsigned long long *<noident>
    Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
    Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    54003f11
snmp.h 5.75 KB