The format specifier in fprintf is "%u", that "%u" should use
unsigned int type instead.the problem is discovered by reading code.
Signed-off-by: Zhu Jun
---
v1->v2:
modify commit info add how to find the problem in the log
v2->v3:
Seems this can use
The format specifier in fprintf is "%u", that "%u" should use
unsigned int type instead.the problem is discovered by reading code.
Signed-off-by: Zhu Jun
---
v1->v2:
modify commit info add how to find the problem in the log
v2->v3:
Seems this can use
'%u' in format string requires 'unsigned int' in __wait_for_test()
but the argument type is 'signed int' that this problem was discovered
by reading code.use macro WTERMSIG like those above usage to
fix the wrong format specifier.
Signed-off-by: Zhu Jun
---
Changes
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
Changes in v2:
- check for cg_fd >= 0 and have just one out label
tools/testing/selftests/bpf/test_sockmap.c | 11 +++
1 file changed, 7 insertions(+)
'%u' in format string requires 'unsigned int' in __wait_for_test()
but the argument type is 'signed int' that this problem was discovered
by reading code
Signed-off-by: Zhu Jun
---
Changes in v2:
- modify commit info add how to find the problem in the
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
Changes in v2:
- check for cg_fd >= 0 and have just one out label
tools/testing/selftests/bpf/test_sockmap.c | 11 +++
1 file changed, 7 insertions(+)
'%u' in format string requires 'unsigned int' in __wait_for_test()
but the argument type is 'signed int' that this problem was discovered
by reading code
Signed-off-by: Zhu Jun
---
Changes in v2:
- modify commit info add how to find the problem in the
The opened file should be closed before exit, otherwise resource leak
will occur that this problem was discovered by code reading
Signed-off-by: Zhu Jun
---
>From a good programming practice perspective, especially in more complex
>programs,
explicitly freeing allocated memory is a good
>From a good programming practice perspective, especially in more
complex programs, explicitly freeing allocated memory is a good habit.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/memfd/memfd_test.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/me
The variable are never referenced in the code, just remove it
that this problem was discovered by reading code
Signed-off-by: Zhu Jun
---
tools/testing/selftests/dma/dma_map_benchmark.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c
b/tools
The opened file should be closed in main(), otherwise resource
leak will occur that this problem was discovered by reading code
Signed-off-by: Zhu Jun
---
tools/testing/selftests/dma/dma_map_benchmark.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/dma
The opened file should be closed before exit, otherwise resource leak
will occur that this problem was discovered by reading code
Signed-off-by: Zhu Jun
---
tools/testing/selftests/rtc/setdate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/rtc/setdate.c
b/tools
'%u' in format string requires 'unsigned int' in __wait_for_test()
but the argument type is 'signed int'.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/kselftest_harness.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/se
Main function return value is int type, so add return
value in the end that this problem was discovered by reading the code
Signed-off-by: Zhu Jun
---
Changes in v2:
- modify commit info
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
1 file changed, 3 insertions
This variable is never referenced in the code, just remove them
that this problem was discovered by reading the code
Signed-off-by: Zhu Jun
---
Changes in v2:
- modify commit info
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
Changes in v2:
- check for cg_fd >= 0 and have just one out label
tools/testing/selftests/bpf/test_sockmap.c | 11 +++
1 file changed, 7 insertions(+)
Main function return value is int type, so add return
value in the end
Signed-off-by: Zhu Jun
---
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
b
This variable is never referenced in the code, just remove them.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
b/tools/testing/selftests
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
v1 -> v2: check for cg_fd >= 0 and have just one out label
tools/testing/selftests/bpf/test_sockmap.c | 11 +++
1 file changed, 7 insertions(+), 4 del
Main function return value is int type, so add return
value in the end
Signed-off-by: Zhu Jun
---
.../testing/selftests/breakpoints/step_after_suspend_test.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
This variable is never referenced in the code, just remove them.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
b/tools/testing/selftests
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
tools/testing/selftests/bpf/test_sockmap.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/bpf
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
tools/testing/selftests/bpf/test_sockmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools
Delete extra blank lines inside of test_selftest()
Signed-off-by: Zhu Jun
---
tools/testing/selftests/bpf/test_sockmap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing/selftests/bpf/test_sockmap.c
index 92752f5eeded..a34e95040994
Add memset to initialize the requested memory
Signed-off-by: Zhu Jun
---
tools/testing/selftests/alsa/test-pcmtest-driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/alsa/test-pcmtest-driver.c
b/tools/testing/selftests/alsa/test-pcmtest-driver.c
index
Using calloc to handling memory allocation, calloc
can initialize the allocated memory
Signed-off-by: Zhu Jun
---
tools/testing/selftests/alsa/test-pcmtest-driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/alsa/test-pcmtest-driver.c
b/tools/testing/selftests
Inside of test_pcm_time() arguments are printed via printf
but '%d' is used to print @flags (of type unsigned int).
Use '%u' instead, just like we do everywhere else.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/alsa/pcm-test.c | 2 +-
1 file changed, 1 insertion(+),
conventions
thanks,
[Zhu Jun]
tools/testing/selftests/media_tests/media_device_open.c | 2 ++
tools/testing/selftests/media_tests/media_device_test.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/tools/testing/selftests/media_tests/media_device_open.c
b/tools/testing/selftests/media_tests
28 matches
Mail list logo