Skip to content

Commit

Permalink
scst_lib: Use gfp_mask instead of GFP_KERNEL for percpu_ref_init()
Browse files Browse the repository at this point in the history
Fix smatch-reported warning message:

drivers/scst/scst_lib.c:4198 scst_alloc_device() warn: use 'gfp_mask'
here instead of GFP_KERNEL?
  • Loading branch information
lnocturno committed Jan 10, 2024
1 parent 5433281 commit b6afb82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scst/src/scst_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b6afb82

Please sign in to comment.