Skip to content

Commit 1de5848

Browse files
image-dragonAlexei Starovoitov
authored andcommitted
selftests/bpf: remove reduplicated s32 casting in "crafted_cases"
The "S32_MIN" is already defined with s32 casting, so there is no need to do it again. Signed-off-by: Menglong Dong <menglong8.dong@gmail.com> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20231219134800.1550388-3-menglong8.dong@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent d028f87 commit 1de5848

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/testing/selftests/bpf/prog_tests/reg_bounds.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,10 +2097,10 @@ static struct subtest_case crafted_cases[] = {
20972097

20982098
{U32, S32, {0, U32_MAX}, {U32_MAX, U32_MAX}},
20992099

2100-
{S32, U64, {(u32)(s32)S32_MIN, (u32)(s32)S32_MIN}, {(u32)(s32)-255, 0}},
2101-
{S32, S64, {(u32)(s32)S32_MIN, (u32)(s32)-255}, {(u32)(s32)-2, 0}},
2102-
{S32, S64, {0, 1}, {(u32)(s32)S32_MIN, (u32)(s32)S32_MIN}},
2103-
{S32, U32, {(u32)(s32)S32_MIN, (u32)(s32)S32_MIN}, {(u32)(s32)S32_MIN, (u32)(s32)S32_MIN}},
2100+
{S32, U64, {(u32)S32_MIN, (u32)S32_MIN}, {(u32)(s32)-255, 0}},
2101+
{S32, S64, {(u32)S32_MIN, (u32)(s32)-255}, {(u32)(s32)-2, 0}},
2102+
{S32, S64, {0, 1}, {(u32)S32_MIN, (u32)S32_MIN}},
2103+
{S32, U32, {(u32)S32_MIN, (u32)S32_MIN}, {(u32)S32_MIN, (u32)S32_MIN}},
21042104
};
21052105

21062106
/* Go over crafted hard-coded cases. This is fast, so we do it as part of

0 commit comments

Comments
 (0)