drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:2022:1: warning: unused function 'mlxsw_afa_sampler_mirror_agent_get'

From: kernel test robot
Date: Tue Sep 28 2021 - 14:07:39 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6fd3ec5c7af58d5d6b598fba22ac387645af33f4
commit: ca19ea63f739c7a4e5dad64951706fea789e1f1a mlxsw: core_acl_flex_actions: Add mirror sampler action
date: 7 months ago
config: mips-randconfig-r013-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca19ea63f739c7a4e5dad64951706fea789e1f1a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ca19ea63f739c7a4e5dad64951706fea789e1f1a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/ethernet/mellanox/mlxsw/ mm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:119:1: note: expanded from here
mlxsw_afa_polcnt_c_p_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1736:1: warning: unused function 'mlxsw_afa_polcnt_counter_set_type_get'
MLXSW_ITEM32(afa, polcnt, counter_set_type, 0x04, 24, 8);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:152:1: note: expanded from here
mlxsw_afa_polcnt_counter_set_type_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1741:1: warning: unused function 'mlxsw_afa_polcnt_counter_index_get'
MLXSW_ITEM32(afa, polcnt, counter_index, 0x04, 0, 24);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:185:1: note: expanded from here
mlxsw_afa_polcnt_counter_index_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1747:1: warning: unused function 'mlxsw_afa_polcnt_pid_get'
MLXSW_ITEM32(afa, polcnt, pid, 0x08, 0, 14);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:26:1: note: expanded from here
mlxsw_afa_polcnt_pid_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1859:1: warning: unused function 'mlxsw_afa_virfwd_fid_cmd_get'
MLXSW_ITEM32(afa, virfwd, fid_cmd, 0x08, 29, 3);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:113:1: note: expanded from here
mlxsw_afa_virfwd_fid_cmd_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1864:1: warning: unused function 'mlxsw_afa_virfwd_fid_get'
MLXSW_ITEM32(afa, virfwd, fid, 0x08, 0, 16);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:146:1: note: expanded from here
mlxsw_afa_virfwd_fid_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1905:1: warning: unused function 'mlxsw_afa_mcrouter_rpf_action_get'
MLXSW_ITEM32(afa, mcrouter, rpf_action, 0x00, 28, 3);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:33:1: note: expanded from here
mlxsw_afa_mcrouter_rpf_action_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1908:1: warning: unused function 'mlxsw_afa_mcrouter_expected_irif_get'
MLXSW_ITEM32(afa, mcrouter, expected_irif, 0x00, 0, 16);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:66:1: note: expanded from here
mlxsw_afa_mcrouter_expected_irif_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1911:1: warning: unused function 'mlxsw_afa_mcrouter_min_mtu_get'
MLXSW_ITEM32(afa, mcrouter, min_mtu, 0x08, 0, 16);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:99:1: note: expanded from here
mlxsw_afa_mcrouter_min_mtu_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1921:1: warning: unused function 'mlxsw_afa_mcrouter_vrmid_get'
MLXSW_ITEM32(afa, mcrouter, vrmid, 0x0C, 31, 1);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:132:1: note: expanded from here
mlxsw_afa_mcrouter_vrmid_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1929:1: warning: unused function 'mlxsw_afa_mcrouter_rigr_rmid_index_get'
MLXSW_ITEM32(afa, mcrouter, rigr_rmid_index, 0x0C, 0, 24);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:165:1: note: expanded from here
mlxsw_afa_mcrouter_rigr_rmid_index_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1979:1: warning: unused function 'mlxsw_afa_l4port_s_d_get'
MLXSW_ITEM32(afa, l4port, s_d, 0x00, 31, 1);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:30:1: note: expanded from here
mlxsw_afa_l4port_s_d_get
^
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:1984:1: warning: unused function 'mlxsw_afa_l4port_l4_port_get'
MLXSW_ITEM32(afa, l4port, l4_port, 0x08, 0, 16);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:63:1: note: expanded from here
mlxsw_afa_l4port_l4_port_get
^
>> drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:2022:1: warning: unused function 'mlxsw_afa_sampler_mirror_agent_get'
MLXSW_ITEM32(afa, sampler, mirror_agent, 0x04, 0, 3);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:112:1: note: expanded from here
mlxsw_afa_sampler_mirror_agent_get
^
>> drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c:2030:1: warning: unused function 'mlxsw_afa_sampler_mirror_probability_rate_get'
MLXSW_ITEM32(afa, sampler, mirror_probability_rate, 0x08, 0, 24);
^
drivers/net/ethernet/mellanox/mlxsw/item.h:355:19: note: expanded from macro 'MLXSW_ITEM32'
static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(const char ^
<scratch space>:145:1: note: expanded from here
mlxsw_afa_sampler_mirror_probability_rate_get
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 153, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $1, $2 # atomic_fetch_add
addu $0, $1, $3
sc $0, $2
beqz $0, 1b
.set pop
move $0, $1
'
clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
Target: mipsel-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-dc6e8dfdfe/bin
clang-14: note: diagnostic msg:
Makefile arch drivers fs include kernel mm net nr_bisected scripts source usr


vim +/mlxsw_afa_sampler_mirror_agent_get +2022 drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c

2018
2019 /* afa_sampler_mirror_agent
2020 * Mirror (SPAN) agent.
2021 */
> 2022 MLXSW_ITEM32(afa, sampler, mirror_agent, 0x04, 0, 3);
2023
2024 #define MLXSW_AFA_SAMPLER_RATE_MAX (BIT(24) - 1)
2025
2026 /* afa_sampler_mirror_probability_rate
2027 * Mirroring probability.
2028 * Valid values are 1 to 2^24 - 1
2029 */
> 2030 MLXSW_ITEM32(afa, sampler, mirror_probability_rate, 0x08, 0, 24);
2031

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip