6262 * If/when we decide to add ARCv2 instructions that do use register pairs,
6363 * the mapping, hopefully, doesn't need to be revisited.
6464 */
65- const u8 bpf2arc [][2 ] = {
65+ static const u8 bpf2arc [][2 ] = {
6666 /* Return value from in-kernel function, and exit value from eBPF */
6767 [BPF_REG_0 ] = {ARC_R_8 , ARC_R_9 },
6868 /* Arguments from eBPF program to in-kernel function */
@@ -1302,7 +1302,7 @@ static u8 arc_b(u8 *buf, s32 offset)
13021302
13031303/************* Packers (Deal with BPF_REGs) **************/
13041304
1305- inline u8 zext (u8 * buf , u8 rd )
1305+ u8 zext (u8 * buf , u8 rd )
13061306{
13071307 if (rd != BPF_REG_FP )
13081308 return arc_movi_r (buf , REG_HI (rd ), 0 );
@@ -2235,6 +2235,7 @@ u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext)
22352235 break ;
22362236 default :
22372237 /* The caller must have handled this. */
2238+ break ;
22382239 }
22392240 } else {
22402241 /*
@@ -2253,6 +2254,7 @@ u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext)
22532254 break ;
22542255 default :
22552256 /* The caller must have handled this. */
2257+ break ;
22562258 }
22572259 }
22582260
@@ -2517,7 +2519,7 @@ u8 arc_epilogue(u8 *buf, u32 usage, u16 frame_size)
25172519#define JCC64_NR_OF_JMPS 3 /* Number of jumps in jcc64 template. */
25182520#define JCC64_INSNS_TO_END 3 /* Number of insn. inclusive the 2nd jmp to end. */
25192521#define JCC64_SKIP_JMP 1 /* Index of the "skip" jump to "end". */
2520- const struct {
2522+ static const struct {
25212523 /*
25222524 * "jit_off" is common between all "jmp[]" and is coupled with
25232525 * "cond" of each "jmp[]" instance. e.g.:
@@ -2883,7 +2885,7 @@ u8 gen_jmp_64(u8 *buf, u8 rd, u8 rs, u8 cond, u32 curr_off, u32 targ_off)
28832885 * The "ARC_CC_SET" becomes "CC_unequal" because of the "tst"
28842886 * instruction that precedes the conditional branch.
28852887 */
2886- const u8 arcv2_32_jmps [ARC_CC_LAST ] = {
2888+ static const u8 arcv2_32_jmps [ARC_CC_LAST ] = {
28872889 [ARC_CC_UGT ] = CC_great_u ,
28882890 [ARC_CC_UGE ] = CC_great_eq_u ,
28892891 [ARC_CC_ULT ] = CC_less_u ,
0 commit comments