[PATCH] Documentation: kunit: Correct MODULE_IMPORT_NS() syntax

Brian Norris posted 1 patch 3 months, 3 weeks ago
Documentation/dev-tools/kunit/usage.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] Documentation: kunit: Correct MODULE_IMPORT_NS() syntax
Posted by Brian Norris 3 months, 3 weeks ago
The argument should be the string "EXPORTED_FOR_KUNIT_TESTING", not a
bare identifier.

Signed-off-by: Brian Norris <briannorris@chromium.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 038f480074fd..066ecda1dd98 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -699,7 +699,7 @@ the template below.
 	#include <kunit/visibility.h>
 	#include <my_file.h>
 	...
-	MODULE_IMPORT_NS(EXPORTED_FOR_KUNIT_TESTING);
+	MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
 	...
 	// Use do_interesting_thing() in tests
 
-- 
2.50.0.rc2.692.g299adb8693-goog
Re: [PATCH] Documentation: kunit: Correct MODULE_IMPORT_NS() syntax
Posted by David Gow 3 months, 3 weeks ago
On Tue, 17 Jun 2025 at 05:16, Brian Norris <briannorris@chromium.org> wrote:
>
> The argument should be the string "EXPORTED_FOR_KUNIT_TESTING", not a
> bare identifier.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---

Nice catch, thanks!

Reviewed-by: David Gow <davidgow@google.com>

Cheers,
-- David