Kees Cook
unread,Sep 20, 2026, 8:00:29 PMSep 20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Brendan Higgins, Kees Cook, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan, kuni...@googlegroups.com, linu...@vger.kernel.org, Randy Dunlap, linux-...@vger.kernel.org, linux-k...@vger.kernel.org, linux-h...@vger.kernel.org
The macro is
#define KUNIT_DEFINE_ACTION_WRAPPER(wrapper, orig, arg_type) ...
so it defines "wrapper" which calls orig(arg_type). The example names
them the other way round. Swap the two order.
Fixes: 56778b49c9a2c ("kunit: Add a macro to wrap a deferred action function")
Assisted-by: LLM
Signed-off-by: Kees Cook <
ke...@kernel.org>
---
Cc: Brendan Higgins <
brendan...@linux.dev>
Cc: David Gow <
da...@davidgow.net>
Cc: Rae Moar <
raem...@gmail.com>
Cc: Jonathan Corbet <
cor...@lwn.net>
Cc: Shuah Khan <
sk...@linuxfoundation.org>
Cc: <
kuni...@googlegroups.com>
Cc: <
linu...@vger.kernel.org>
---
Documentation/dev-tools/kunit/usage.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
index 1c78dfff94e8..8fec131f8ee7 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -1028,7 +1028,7 @@ with the ``KUNIT_DEFINE_ACTION_WRAPPER()`` macro, for example:
.. code-block:: C
- KUNIT_DEFINE_ACTION_WRAPPER(device_unregister, device_unregister_wrapper, struct device *);
+ KUNIT_DEFINE_ACTION_WRAPPER(device_unregister_wrapper, device_unregister, struct device *);
kunit_add_action(test, &device_unregister_wrapper, &dev);
You should do this in preference to manually casting to the ``kunit_action_t`` type,
--
2.34.1