Skip to content

Commit aca1a80

Browse files
fomichevborkmann
authored andcommitted
selftests/bpf: use proper type when passing prog_type
Use bpf_prog_type instead of bpf_map_type when passing prog_type. -Wenum-conversion might be unhappy about it: error: implicit conversion from enumeration type 'enum bpf_map_type' to different enumeration type 'enum bpf_prog_type' Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent c2a20a2 commit aca1a80

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tools/testing/selftests/bpf/test_verifier.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13940,7 +13940,7 @@ static int create_map(uint32_t type, uint32_t size_key,
1394013940
return fd;
1394113941
}
1394213942

13943-
static int create_prog_dummy1(enum bpf_map_type prog_type)
13943+
static int create_prog_dummy1(enum bpf_prog_type prog_type)
1394413944
{
1394513945
struct bpf_insn prog[] = {
1394613946
BPF_MOV64_IMM(BPF_REG_0, 42),
@@ -13951,7 +13951,7 @@ static int create_prog_dummy1(enum bpf_map_type prog_type)
1395113951
ARRAY_SIZE(prog), "GPL", 0, NULL, 0);
1395213952
}
1395313953

13954-
static int create_prog_dummy2(enum bpf_map_type prog_type, int mfd, int idx)
13954+
static int create_prog_dummy2(enum bpf_prog_type prog_type, int mfd, int idx)
1395513955
{
1395613956
struct bpf_insn prog[] = {
1395713957
BPF_MOV64_IMM(BPF_REG_3, idx),
@@ -13966,7 +13966,7 @@ static int create_prog_dummy2(enum bpf_map_type prog_type, int mfd, int idx)
1396613966
ARRAY_SIZE(prog), "GPL", 0, NULL, 0);
1396713967
}
1396813968

13969-
static int create_prog_array(enum bpf_map_type prog_type, uint32_t max_elem,
13969+
static int create_prog_array(enum bpf_prog_type prog_type, uint32_t max_elem,
1397013970
int p1key)
1397113971
{
1397213972
int p2key = 1;
@@ -14037,7 +14037,7 @@ static int create_cgroup_storage(bool percpu)
1403714037

1403814038
static char bpf_vlog[UINT_MAX >> 8];
1403914039

14040-
static void do_test_fixup(struct bpf_test *test, enum bpf_map_type prog_type,
14040+
static void do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type,
1404114041
struct bpf_insn *prog, int *map_fds)
1404214042
{
1404314043
int *fixup_map_hash_8b = test->fixup_map_hash_8b;

0 commit comments

Comments
 (0)