From patchwork Wed Mar 15 23:39:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 13176773 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B050EC61DA4 for ; Wed, 15 Mar 2023 23:42:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233322AbjCOXmA (ORCPT ); Wed, 15 Mar 2023 19:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233182AbjCOXlq (ORCPT ); Wed, 15 Mar 2023 19:41:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA221A676E; Wed, 15 Mar 2023 16:40:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D74A5B81E92; Wed, 15 Mar 2023 23:39:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55682C433EF; Wed, 15 Mar 2023 23:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678923566; bh=HF+8Bo+oSK76QvKqEQTGyvfPu3BTSjpOqnEATCDSp/Q=; h=From:To:Cc:Subject:Date:From; b=NrocMtD9jzHuAP+2J9aGrwleB7geFU/qV2gLjCIKktagruw7OlFwfFHUlHpYFL1Fi jDFiMKKXu1ZzupdZq9jZuozJUwTGg3Z5lOB2FRuwe5PDtKMKv9r1C/47NFej5Q6vqA R7qcGdo0dkJ+Iz4iwQYvtO/YVD54tfQkxo952+oNGlcDUR67FlboqPtCdc8f1N1QvF F0b2OqzRAmU7EVt9DMB7xZMKhfqOGZ7K+Ryibwt3XX4I0cEnq5zQgTJuAtjYN+9IIr B8r48SwasDul4ZOVn4xiUMdEI9bC55AEcJABZ5rtXCSU/HM++iR+ea9lbt2HGTnA2u y3weP7k5EaB2g== From: Stephen Boyd To: Brendan Higgins , David Gow Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Subject: [PATCH] kunit: Use gfp in kunit_alloc_resource() kernel-doc Date: Wed, 15 Mar 2023 16:39:25 -0700 Message-Id: <20230315233925.2416516-1-sboyd@kernel.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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 Reviewed-by: David Gow --- include/kunit/resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 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, ¶ms); + * kunit_kmalloc_free, gfp, ¶ms); * } * * Resources can also be named, with lookup/removal done on a name