diff options
| author | Arnd Bergmann <[email protected]> | 2024-02-13 09:54:08 +0000 |
|---|---|---|
| committer | Richard Weinberger <[email protected]> | 2024-02-25 20:22:21 +0000 |
| commit | ec724e534dfdd592abc5ac066be77ef15c455ccc (patch) | |
| tree | 1628a8ac167254b8fcd488ea0872f2ffd79cc0d4 /fs/ubifs/lpt_commit.c | |
| parent | ubifs: fix sort function prototype (diff) | |
| download | kernel-ec724e534dfdd592abc5ac066be77ef15c455ccc.tar.gz kernel-ec724e534dfdd592abc5ac066be77ef15c455ccc.zip | |
ubifs: fix function pointer cast warnings
ubifs has a number of callback functions for ubifs_lpt_scan_nolock() using
two different prototypes, either passing a struct scan_data or
a struct ubifs_lp_stats, but the caller expects a void pointer instead.
clang-16 now warns about this:
fs/ubifs/find.c:170:9: error: cast from 'int (*)(struct ubifs_info *, const struct ubifs_lprops *, int, struct scan_data *)' to 'ubifs_lpt_scan_callback' (aka 'int (*)(struct ubifs_info *, const struct ubifs_lprops *, int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
170 | (ubifs_lpt_scan_callback)scan_for_dirty_cb,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ubifs/find.c:449:9: error: cast from 'int (*)(struct ubifs_info *, const struct ubifs_lprops *, int, struct scan_data *)' to 'ubifs_lpt_scan_callback' (aka 'int (*)(struct ubifs_info *, const struct ubifs_lprops *, int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
449 | (ubifs_lpt_scan_callback)scan_for_free_cb,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change all of these callback functions to actually take the void * argument
that is passed by their caller.
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Zhihao Cheng <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
Diffstat (limited to 'fs/ubifs/lpt_commit.c')
0 files changed, 0 insertions, 0 deletions
