]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Documentation: KUnit: Fix usage bug
authorAkira Kawata <akirakawata1@gmail.com>
Mon, 7 Feb 2022 11:20:44 +0000 (20:20 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 8 Feb 2022 20:16:20 +0000 (13:16 -0700)
Fix a bug of kunit documentation.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=205773
: Quoting Steve Pfetsch:
:
: kunit documentation is incorrect:
: https://kunit.dev/third_party/stable_kernel/docs/usage.html
: struct rectangle *self = container_of(this, struct shape, parent);
:
:
: Shouldn't it be:
: struct rectangle *self = container_of(this, struct rectangle, parent);
: ?

Signed-off-by: Akira Kawata <akirakawata1@gmail.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Documentation/dev-tools/kunit/usage.rst

index 76af931a332cda24e9c9afc354b26e45160a1060..1c83e7d60a8a973dc1f679cce1f280e7f969aba1 100644 (file)
@@ -242,7 +242,7 @@ example:
 
        int rectangle_area(struct shape *this)
        {
-               struct rectangle *self = container_of(this, struct shape, parent);
+               struct rectangle *self = container_of(this, struct rectangle, parent);
 
                return self->length * self->width;
        };