arch/arc/net/bpf_jit.h:42:15: sparse: sparse: marked inline, but without a definition

kernel test robot lkp at intel.com
Wed May 22 08:05:31 PDT 2024


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   29c73fc794c83505066ee6db893b2a83ac5fac63
commit: f122668ddcce450c2585f0be4bf4478d6fd6176b ARC: Add eBPF JIT support
date:   10 days ago
config: arc-randconfig-r133-20240522 (https://download.01.org/0day-ci/archive/20240522/202405222314.UG5F2NHn-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240522/202405222314.UG5F2NHn-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405222314.UG5F2NHn-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   arch/arc/net/bpf_jit_core.c: note: in included file:
>> arch/arc/net/bpf_jit.h:42:15: sparse: sparse: marked inline, but without a definition
--
>> arch/arc/net/bpf_jit_arcv2.c:2238:17: sparse: sparse: statement expected after case label
   arch/arc/net/bpf_jit_arcv2.c:2256:17: sparse: sparse: statement expected after case label
   arch/arc/net/bpf_jit_arcv2.c:2872:9: sparse: sparse: statement expected after case label
>> arch/arc/net/bpf_jit_arcv2.c:65:10: sparse: sparse: symbol 'bpf2arc' was not declared. Should it be static?
>> arch/arc/net/bpf_jit_arcv2.c:2536:3: sparse: sparse: symbol 'arcv2_64_jccs' was not declared. Should it be static?
>> arch/arc/net/bpf_jit_arcv2.c:2886:10: sparse: sparse: symbol 'arcv2_32_jmps' was not declared. Should it be static?

vim +42 arch/arc/net/bpf_jit.h

    39	
    40	/************** Functions that the back-end must provide **************/
    41	/* Extension for 32-bit operations. */
  > 42	inline u8 zext(u8 *buf, u8 rd);
    43	/***** Moves *****/
    44	u8 mov_r32(u8 *buf, u8 rd, u8 rs, u8 sign_ext);
    45	u8 mov_r32_i32(u8 *buf, u8 reg, s32 imm);
    46	u8 mov_r64(u8 *buf, u8 rd, u8 rs, u8 sign_ext);
    47	u8 mov_r64_i32(u8 *buf, u8 reg, s32 imm);
    48	u8 mov_r64_i64(u8 *buf, u8 reg, u32 lo, u32 hi);
    49	/***** Loads and stores *****/
    50	u8 load_r(u8 *buf, u8 rd, u8 rs, s16 off, u8 size, bool sign_ext);
    51	u8 store_r(u8 *buf, u8 rd, u8 rs, s16 off, u8 size);
    52	u8 store_i(u8 *buf, s32 imm, u8 rd, s16 off, u8 size);
    53	/***** Addition *****/
    54	u8 add_r32(u8 *buf, u8 rd, u8 rs);
    55	u8 add_r32_i32(u8 *buf, u8 rd, s32 imm);
    56	u8 add_r64(u8 *buf, u8 rd, u8 rs);
    57	u8 add_r64_i32(u8 *buf, u8 rd, s32 imm);
    58	/***** Subtraction *****/
    59	u8 sub_r32(u8 *buf, u8 rd, u8 rs);
    60	u8 sub_r32_i32(u8 *buf, u8 rd, s32 imm);
    61	u8 sub_r64(u8 *buf, u8 rd, u8 rs);
    62	u8 sub_r64_i32(u8 *buf, u8 rd, s32 imm);
    63	/***** Multiplication *****/
    64	u8 mul_r32(u8 *buf, u8 rd, u8 rs);
    65	u8 mul_r32_i32(u8 *buf, u8 rd, s32 imm);
    66	u8 mul_r64(u8 *buf, u8 rd, u8 rs);
    67	u8 mul_r64_i32(u8 *buf, u8 rd, s32 imm);
    68	/***** Division *****/
    69	u8 div_r32(u8 *buf, u8 rd, u8 rs, bool sign_ext);
    70	u8 div_r32_i32(u8 *buf, u8 rd, s32 imm, bool sign_ext);
    71	/***** Remainder *****/
    72	u8 mod_r32(u8 *buf, u8 rd, u8 rs, bool sign_ext);
    73	u8 mod_r32_i32(u8 *buf, u8 rd, s32 imm, bool sign_ext);
    74	/***** Bitwise AND *****/
    75	u8 and_r32(u8 *buf, u8 rd, u8 rs);
    76	u8 and_r32_i32(u8 *buf, u8 rd, s32 imm);
    77	u8 and_r64(u8 *buf, u8 rd, u8 rs);
    78	u8 and_r64_i32(u8 *buf, u8 rd, s32 imm);
    79	/***** Bitwise OR *****/
    80	u8 or_r32(u8 *buf, u8 rd, u8 rs);
    81	u8 or_r32_i32(u8 *buf, u8 rd, s32 imm);
    82	u8 or_r64(u8 *buf, u8 rd, u8 rs);
    83	u8 or_r64_i32(u8 *buf, u8 rd, s32 imm);
    84	/***** Bitwise XOR *****/
    85	u8 xor_r32(u8 *buf, u8 rd, u8 rs);
    86	u8 xor_r32_i32(u8 *buf, u8 rd, s32 imm);
    87	u8 xor_r64(u8 *buf, u8 rd, u8 rs);
    88	u8 xor_r64_i32(u8 *buf, u8 rd, s32 imm);
    89	/***** Bitwise Negate *****/
    90	u8 neg_r32(u8 *buf, u8 r);
    91	u8 neg_r64(u8 *buf, u8 r);
    92	/***** Bitwise left shift *****/
    93	u8 lsh_r32(u8 *buf, u8 rd, u8 rs);
    94	u8 lsh_r32_i32(u8 *buf, u8 rd, u8 imm);
    95	u8 lsh_r64(u8 *buf, u8 rd, u8 rs);
    96	u8 lsh_r64_i32(u8 *buf, u8 rd, s32 imm);
    97	/***** Bitwise right shift (logical) *****/
    98	u8 rsh_r32(u8 *buf, u8 rd, u8 rs);
    99	u8 rsh_r32_i32(u8 *buf, u8 rd, u8 imm);
   100	u8 rsh_r64(u8 *buf, u8 rd, u8 rs);
   101	u8 rsh_r64_i32(u8 *buf, u8 rd, s32 imm);
   102	/***** Bitwise right shift (arithmetic) *****/
   103	u8 arsh_r32(u8 *buf, u8 rd, u8 rs);
   104	u8 arsh_r32_i32(u8 *buf, u8 rd, u8 imm);
   105	u8 arsh_r64(u8 *buf, u8 rd, u8 rs);
   106	u8 arsh_r64_i32(u8 *buf, u8 rd, s32 imm);
   107	/***** Frame related *****/
   108	u32 mask_for_used_regs(u8 bpf_reg, bool is_call);
   109	u8 arc_prologue(u8 *buf, u32 usage, u16 frame_size);
   110	u8 arc_epilogue(u8 *buf, u32 usage, u16 frame_size);
   111	/***** Jumps *****/
   112	/*
   113	 * Different sorts of conditions (ARC enum as opposed to BPF_*).
   114	 *
   115	 * Do not change the order of enums here. ARC_CC_SLE+1 is used
   116	 * to determine the number of JCCs.
   117	 */
   118	enum ARC_CC {
   119		ARC_CC_UGT = 0,		/* unsigned >  */
   120		ARC_CC_UGE,		/* unsigned >= */
   121		ARC_CC_ULT,		/* unsigned <  */
   122		ARC_CC_ULE,		/* unsigned <= */
   123		ARC_CC_SGT,		/*   signed >  */
   124		ARC_CC_SGE,		/*   signed >= */
   125		ARC_CC_SLT,		/*   signed <  */
   126		ARC_CC_SLE,		/*   signed <= */
   127		ARC_CC_AL,		/* always      */
   128		ARC_CC_EQ,		/*          == */
   129		ARC_CC_NE,		/*          != */
   130		ARC_CC_SET,		/* test        */
   131		ARC_CC_LAST
   132	};
   133	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the linux-snps-arc mailing list