Re: [PATCH 2/3] drm/tests: Use KUNIT_DEFINE_ACTION_WRAPPER()

2023-11-15 Thread Maxime Ripard
Hi David, On Sat, Nov 11, 2023 at 04:08:27AM +0800, David Gow wrote: > In order to pass functions to kunit_add_action(), they need to be of the > kunit_action_t type. While casting the function pointer can work, it > will break control-flow integrity. > > drm_kunit_helpers already defines wrapper

[PATCH 2/3] drm/tests: Use KUNIT_DEFINE_ACTION_WRAPPER()

2023-11-10 Thread David Gow
In order to pass functions to kunit_add_action(), they need to be of the kunit_action_t type. While casting the function pointer can work, it will break control-flow integrity. drm_kunit_helpers already defines wrappers, but we now have a macro which does this automatically. Using this greatly red