Skip to content

Commit 92a6805

Browse files
akawashiroshuahkh
authored andcommitted
Documentation: KUnit: Fix usage bug
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>
1 parent de4d73b commit 92a6805

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/dev-tools/kunit/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ example:
242242
243243
int rectangle_area(struct shape *this)
244244
{
245-
struct rectangle *self = container_of(this, struct shape, parent);
245+
struct rectangle *self = container_of(this, struct rectangle, parent);
246246
247247
return self->length * self->width;
248248
};

0 commit comments

Comments
 (0)