Skip to content

Commit

Permalink
kunit: Use gfp in kunit_alloc_resource() kernel-doc
Browse files Browse the repository at this point in the history
Copy/pasting the code from the kernel-doc here doesn't compile because
kunit_alloc_resource() takes a gfp flags argument. Pass the gfp
argument from the caller to complete the example.

Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Stephen Boyd authored and Shuah Khan committed Mar 17, 2023
1 parent 1da2e62 commit 99be658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/kunit/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ typedef void (*kunit_resource_free_t)(struct kunit_resource *);
* params.gfp = gfp;
*
* return kunit_alloc_resource(test, kunit_kmalloc_init,
* kunit_kmalloc_free, &params);
* kunit_kmalloc_free, gfp, &params);
* }
*
* Resources can also be named, with lookup/removal done on a name
Expand Down

0 comments on commit 99be658

Please sign in to comment.