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 42FFBC6FD1F for ; Thu, 16 Mar 2023 03:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbjCPDgi (ORCPT ); Wed, 15 Mar 2023 23:36:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjCPDgg (ORCPT ); Wed, 15 Mar 2023 23:36:36 -0400 Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A236E5A6F5 for ; Wed, 15 Mar 2023 20:36:34 -0700 (PDT) Received: by mail-vs1-xe29.google.com with SMTP id v27so374119vsa.7 for ; Wed, 15 Mar 2023 20:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678937794; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jyEmm6B81IYpOazKXaItaeJ9Lzpd2jizZengq+kwNYA=; b=YT6efm96Eff03/tp7Mjn7li27NGznOTzErf7RgXiWK0zl9dtJe/miKDL9qyYs9ATMs sJMOu8+QrEu0SKNwqSDj7gmHU8fzSWMyxKYr3ejlc6r3HFHvADip+5Nc9s6GVTCnu7DW lz1aOOj51HQic8S7WSY8YdK+sH8fMMJ4lj7Z1gvlsbC7CfKb06jR9/hYL3ivXM2qFiig fKtTD1TRjeJtaLQKWIVzAx1DYiWo9SqAwU9MGEtGuRb0+239hbLblWyB3afbGqMlIe65 schFowt9m8Fy2+Jr/Hds6tfWQ5HSzM+39WFOd5rdze6OqGUmxu9IyTJ6J5xJuyHhObSf kkKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678937794; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jyEmm6B81IYpOazKXaItaeJ9Lzpd2jizZengq+kwNYA=; b=ebO4ErioMSFGRX2R1fvu5d7/gxyLrKYxCrJFlayL4FqikjClXxFA+BJT3u7YjVD5Ln Um36VnaDxdFutHHU7m7X0kdKovpiugJQ3dipcgz/8D8l5F2lCSYWS/qbJQ9DfenLhTdn nDkCS1DJ5zMpCR9RdthiUqI38x+fxLUaJD+t5rbV90ZBH0Ln3A2qKOCK9UYcXumvnDre ayEwZXoX7UhNn3jBPd2T1/owGWrwxcN3g8aVyYjC7Z4UgGSUTdC2V+DxQx2nU4MN0IeS N7N9vqq62VUqsPJoXzkSa9LEIiLlKrN1eEBAhf/+M7opFVj9A5+WvL09JfKMKAHbCojs sVTQ== X-Gm-Message-State: AO0yUKVCBRKOeiqIcOLAM4/YHObva8ovxWaT9BW4DXNwyJ2RnjVy3ifZ ouDSRlOi5WVILHkYMOIDv/afbkecZO7dqQK7YaXKVJCg3PL926SWPOM7BQ== X-Google-Smtp-Source: AK7set8TiXK3p8I3EjglHW1NF1uK55sBs3C2dvjrsHFypim38FSpKwuJ1zp43KXWOkKxFrc+ss7CikmPwYJzLmId1k0= X-Received: by 2002:a67:fd7a:0:b0:416:f1ea:1001 with SMTP id h26-20020a67fd7a000000b00416f1ea1001mr27946120vsa.5.1678937793674; Wed, 15 Mar 2023 20:36:33 -0700 (PDT) MIME-Version: 1.0 References: <20230315233925.2416516-1-sboyd@kernel.org> In-Reply-To: <20230315233925.2416516-1-sboyd@kernel.org> From: David Gow Date: Thu, 16 Mar 2023 11:36:21 +0800 Message-ID: Subject: Re: [PATCH] kunit: Use gfp in kunit_alloc_resource() kernel-doc To: Stephen Boyd Cc: Brendan Higgins , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000cfa70805f6fc2a66" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000cfa70805f6fc2a66 Content-Type: text/plain; charset="UTF-8" On Thu, 16 Mar 2023 at 07:39, Stephen Boyd wrote: > > 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 > --- Nice catch! Reviewed-by: David Gow Cheers, -- David > 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, ¶ms); > + * kunit_kmalloc_free, gfp, ¶ms); > * } > * > * 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 > --000000000000cfa70805f6fc2a66 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPnwYJKoZIhvcNAQcCoIIPkDCCD4wCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz5MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2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