Skip to content

Commit

Permalink
bpf: change bpf_alu_sign_string and bpf_movsx_string to static
Browse files Browse the repository at this point in the history
The bpf_alu_sign_string and bpf_movsx_string introduced in commit
f835bb6 ("bpf: Add kernel/bpftool asm support for new instructions")
are only used in disasm.c now, change them to static.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308050615.wxAn1v2J-lkp@intel.com/
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230803023128.3753323-1-yangyingliang@huawei.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
  • Loading branch information
Yang Yingliang authored and Martin KaFai Lau committed Aug 4, 2023
1 parent dde3979 commit 1e8e2ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/bpf/disasm.c
Expand Up @@ -87,12 +87,12 @@ const char *const bpf_alu_string[16] = {
[BPF_END >> 4] = "endian",
};

const char *const bpf_alu_sign_string[16] = {
static const char *const bpf_alu_sign_string[16] = {
[BPF_DIV >> 4] = "s/=",
[BPF_MOD >> 4] = "s%=",
};

const char *const bpf_movsx_string[4] = {
static const char *const bpf_movsx_string[4] = {
[0] = "(s8)",
[1] = "(s16)",
[3] = "(s32)",
Expand Down

0 comments on commit 1e8e2ef

Please sign in to comment.