Commit fe69a1b
selftests: bpf: xskxceiver: ksft_print_msg: fix format type error
Crossbuilding selftests/bpf for architecture arm64, format specifies
type error show up like.
xskxceiver.c:912:34: error: format specifies type 'int' but the argument
has type '__u64' (aka 'unsigned long long') [-Werror,-Wformat]
ksft_print_msg("[%s] expected meta_count [%d], got meta_count [%d]\n",
~~
%llu
__func__, pkt->pkt_nb, meta->count);
^~~~~~~~~~~
xskxceiver.c:929:55: error: format specifies type 'unsigned long long' but
the argument has type 'u64' (aka 'unsigned long') [-Werror,-Wformat]
ksft_print_msg("Frag invalid addr: %llx len: %u\n", addr, len);
~~~~ ^~~~
Fixing the issues by casting to (unsigned long long) and changing the
specifiers to be %llu from %d and %u, since with u64s it might be %llx
or %lx, depending on architecture.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Link: https://lore.kernel.org/r/20231109174328.1774571-1-anders.roxell@linaro.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent 89cdf9d commit fe69a1b
1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
912 | | - | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
913 | 914 | | |
914 | 915 | | |
915 | 916 | | |
| |||
926 | 927 | | |
927 | 928 | | |
928 | 929 | | |
929 | | - | |
| 930 | + | |
| 931 | + | |
930 | 932 | | |
931 | 933 | | |
932 | 934 | | |
933 | | - | |
| 935 | + | |
| 936 | + | |
934 | 937 | | |
935 | 938 | | |
936 | 939 | | |
| |||
1029 | 1032 | | |
1030 | 1033 | | |
1031 | 1034 | | |
1032 | | - | |
| 1035 | + | |
| 1036 | + | |
1033 | 1037 | | |
1034 | 1038 | | |
1035 | 1039 | | |
| |||
1513 | 1517 | | |
1514 | 1518 | | |
1515 | 1519 | | |
1516 | | - | |
1517 | | - | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1518 | 1523 | | |
1519 | 1524 | | |
1520 | 1525 | | |
| |||
0 commit comments