]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
kunit: skb: use "gfp" variable instead of hardcoding GFP_KERNEL
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 4 Nov 2024 17:16:30 +0000 (20:16 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 11 Nov 2024 17:25:40 +0000 (10:25 -0700)
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@linaro.org>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
include/kunit/skbuff.h

index 44d12370939a90aead0c6daefb52a99bed3cb72c..345e1e8f031235719c7b04b655b5a4e104d15f80 100644 (file)
@@ -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;