mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kunit: Use gfp in kunit_alloc_resource() kernel-doc
@ 2023-03-15 23:39 Stephen Boyd
  2023-03-16  3:36 ` David Gow
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2023-03-15 23:39 UTC (permalink / raw)
  To: Brendan Higgins, David Gow; +Cc: linux-kernel, linux-kselftest, kunit-dev

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>
---
 include/kunit/resource.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/kunit/resource.h b/include/kunit/resource.h
index cf6fb8f2ac1b..c0d88b318e90 100644
--- a/include/kunit/resource.h
+++ b/include/kunit/resource.h
@@ -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

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-16  3:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 23:39 [PATCH] kunit: Use gfp in kunit_alloc_resource() kernel-doc Stephen Boyd
2023-03-16  3:36 ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®