[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOS=frTi_VDRrGsoGTg6+wA0A8aReM5OvX+TsCa+ZedCCDw@mail.gmail.com>
Date: Sat, 9 Nov 2024 17:33:06 +0800
From: David Gow <davidgow@...gle.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Benjamin Berg <benjamin.berg@...el.com>, Brendan Higgins <brendan.higgins@...ux.dev>,
Rae Moar <rmoar@...gle.com>, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] kunit: skb: use "gfp" variable instead of hardcoding GFP_KERNEL
On Tue, 5 Nov 2024 at 01:16, Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> The intent here was clearly to use the gfp variable flags instead of
> hardcoding GFP_KERNEL. All the callers pass GFP_KERNEL as the gfp
> flags so this doesn't affect runtime.
>
> Fixes: b3231d353a51 ("kunit: add a convenience allocation wrapper for SKBs")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>\
> ---
Nice catch, thanks.
Reviewed-by: David Gow <davidgow@...gle.com>
Cheers,
-- David
> include/kunit/skbuff.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/kunit/skbuff.h b/include/kunit/skbuff.h
> index 44d12370939a..345e1e8f0312 100644
> --- a/include/kunit/skbuff.h
> +++ b/include/kunit/skbuff.h
> @@ -29,7 +29,7 @@ static void kunit_action_kfree_skb(void *p)
> static inline struct sk_buff *kunit_zalloc_skb(struct kunit *test, int len,
> gfp_t gfp)
> {
> - struct sk_buff *res = alloc_skb(len, GFP_KERNEL);
> + struct sk_buff *res = alloc_skb(len, gfp);
>
> if (!res || skb_pad(res, len))
> return NULL;
> --
> 2.45.2
>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5294 bytes)
Powered by blists - more mailing lists