• Nathan Chancellor's avatar
    RDS: IB: Use DEFINE_PER_CPU_SHARED_ALIGNED for rds_ib_stats · 8360ed67
    Nathan Chancellor authored
    Clang warns when two declarations' section attributes don't match.
    
    net/rds/ib_stats.c:40:1: warning: section does not match previous
    declaration [-Wsection]
    DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_ib_statistics, rds_ib_stats);
    ^
    ./include/linux/percpu-defs.h:142:2: note: expanded from macro
    'DEFINE_PER_CPU_SHARED_ALIGNED'
            DEFINE_PER_CPU_SECTION(type, name,
    PER_CPU_SHARED_ALIGNED_SECTION) \
            ^
    ./include/linux/percpu-defs.h:93:9: note: expanded from macro
    'DEFINE_PER_CPU_SECTION'
            extern __PCPU_ATTRS(sec) __typeof__(type) name;
    \
                   ^
    ./include/linux/percpu-defs.h:49:26: note: expanded from macro
    '__PCPU_ATTRS'
            __percpu __attribute__((section(PER_CPU_BASE_SECTION sec)))
    \
                                    ^
    net/rds/ib.h:446:1: note: previous attribute is here
    DECLARE_PER_CPU(struct rds_ib_statistics, rds_ib_stats);
    ^
    ./include/linux/percpu-defs.h:111:2: note: expanded from macro
    'DECLARE_PER_CPU'
            DECLARE_PER_CPU_SECTION(type, name, "")
            ^
    ./include/linux/percpu-defs.h:87:9: note: expanded from macro
    'DECLARE_PER_CPU_SECTION'
            extern __PCPU_ATTRS(sec) __typeof__(type) name
                   ^
    ./include/linux/percpu-defs.h:49:26: note: expanded from macro
    '__PCPU_ATTRS'
            __percpu __attribute__((section(PER_CPU_BASE_SECTION sec)))
    \
                                    ^
    1 warning generated.
    
    The initial definition was added in commit ec16227e ("RDS/IB:
    Infiniband transport") and the cache aligned definition was added in
    commit e6babe4c ("RDS/IB: Stats and sysctls") right after. The
    definition probably should have been updated in net/rds/ib.h, which is
    what this patch does.
    
    Link: https://github.com/ClangBuiltLinux/linux/issues/114Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8360ed67
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
af_rds.c Loading commit data...
bind.c Loading commit data...
cong.c Loading commit data...
connection.c Loading commit data...
ib.c Loading commit data...
ib.h Loading commit data...
ib_cm.c Loading commit data...
ib_fmr.c Loading commit data...
ib_frmr.c Loading commit data...
ib_mr.h Loading commit data...
ib_rdma.c Loading commit data...
ib_recv.c Loading commit data...
ib_ring.c Loading commit data...
ib_send.c Loading commit data...
ib_stats.c Loading commit data...
ib_sysctl.c Loading commit data...
info.c Loading commit data...
info.h Loading commit data...
loop.c Loading commit data...
loop.h Loading commit data...
message.c Loading commit data...
page.c Loading commit data...
rdma.c Loading commit data...
rdma_transport.c Loading commit data...
rdma_transport.h Loading commit data...
rds.h Loading commit data...
rds_single_path.h Loading commit data...
recv.c Loading commit data...
send.c Loading commit data...
stats.c Loading commit data...
sysctl.c Loading commit data...
tcp.c Loading commit data...
tcp.h Loading commit data...
tcp_connect.c Loading commit data...
tcp_listen.c Loading commit data...
tcp_recv.c Loading commit data...
tcp_send.c Loading commit data...
tcp_stats.c Loading commit data...
threads.c Loading commit data...
transport.c Loading commit data...