From b5693922e093f2df7458aaf83351809c4ff89cd9 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Wed, 10 Jan 2024 11:12:12 +0300 Subject: [PATCH] scst_lib: Use gfp_mask instead of GFP_KERNEL for percpu_ref_init() Fix smatch-reported warning message: drivers/scst/scst_lib.c:4198 scst_alloc_device() warn: use 'gfp_mask' here instead of GFP_KERNEL? --- scst/src/scst_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 081832227..349565fa4 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -4223,7 +4223,7 @@ int scst_alloc_device(gfp_t gfp_mask, int nodeid, struct scst_device **out_dev) memset(dev, 0, sizeof(*dev)); dev->handler = &scst_null_devtype; - res = percpu_ref_init(&dev->refcnt, scst_release_device, 0, GFP_KERNEL); + res = percpu_ref_init(&dev->refcnt, scst_release_device, 0, gfp_mask); if (res < 0) goto free_dev; #ifdef CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT