kunit: Use gfp in kunit_alloc_resource() kernel-doc
authorStephen Boyd <sboyd@kernel.org>
Wed, 15 Mar 2023 23:39:25 +0000 (16:39 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 17 Mar 2023 18:28:40 +0000 (12:28 -0600)
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>
include/kunit/resource.h

index cf6fb8f..c0d88b3 100644 (file)
@@ -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