mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 12:21:15 -04:00
staging: comedi: tests: Correct unittest_fptr
The definition of the `unittest_fptr` function pointer type has the wrong function return type `void *` instead of `void`. The problem is hidden by a bunch of unnecessary type-casts. Fix the type definition and remove the type-casts. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407140142.447250-6-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
228e55617c
commit
07a696a886
@@ -53,7 +53,7 @@ void test0(void)
|
||||
static int __init unittest_enter(void)
|
||||
{
|
||||
const unittest_fptr unit_tests[] = {
|
||||
(unittest_fptr)test0,
|
||||
test0,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
@@ -578,22 +578,22 @@ void test_ni_get_reg_value(void)
|
||||
static int __init ni_routes_unittest(void)
|
||||
{
|
||||
const unittest_fptr unit_tests[] = {
|
||||
(unittest_fptr)test_ni_assign_device_routes,
|
||||
(unittest_fptr)test_ni_sort_device_routes,
|
||||
(unittest_fptr)test_ni_find_route_set,
|
||||
(unittest_fptr)test_ni_route_set_has_source,
|
||||
(unittest_fptr)test_ni_route_to_register,
|
||||
(unittest_fptr)test_ni_lookup_route_register,
|
||||
(unittest_fptr)test_route_is_valid,
|
||||
(unittest_fptr)test_ni_is_cmd_dest,
|
||||
(unittest_fptr)test_channel_is_pfi,
|
||||
(unittest_fptr)test_channel_is_rtsi,
|
||||
(unittest_fptr)test_ni_count_valid_routes,
|
||||
(unittest_fptr)test_ni_get_valid_routes,
|
||||
(unittest_fptr)test_ni_find_route_source,
|
||||
(unittest_fptr)test_route_register_is_valid,
|
||||
(unittest_fptr)test_ni_check_trigger_arg,
|
||||
(unittest_fptr)test_ni_get_reg_value,
|
||||
test_ni_assign_device_routes,
|
||||
test_ni_sort_device_routes,
|
||||
test_ni_find_route_set,
|
||||
test_ni_route_set_has_source,
|
||||
test_ni_route_to_register,
|
||||
test_ni_lookup_route_register,
|
||||
test_route_is_valid,
|
||||
test_ni_is_cmd_dest,
|
||||
test_channel_is_pfi,
|
||||
test_channel_is_rtsi,
|
||||
test_ni_count_valid_routes,
|
||||
test_ni_get_valid_routes,
|
||||
test_ni_find_route_source,
|
||||
test_route_register_is_valid,
|
||||
test_ni_check_trigger_arg,
|
||||
test_ni_get_reg_value,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ static struct unittest_results {
|
||||
int failed;
|
||||
} unittest_results;
|
||||
|
||||
typedef void *(*unittest_fptr)(void);
|
||||
typedef void (*unittest_fptr)(void);
|
||||
|
||||
#define unittest(result, fmt, ...) ({ \
|
||||
bool failed = !(result); \
|
||||
|
||||
Reference in New Issue
Block a user