diff options
author | Chaitanya Kulkarni <kch@nvidia.com> | 2024-10-29 23:47:37 -0700 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-11-05 08:43:24 -0800 |
commit | 43d5d3b417410edcbe1584b17ac90bea9e633493 (patch) | |
tree | a967ab9e0b85698147c39f9e3790c9490f3145e5 /drivers/nvme | |
parent | c74649b6e400edae67eba56e5285a92619dfb647 (diff) | |
download | linux-43d5d3b417410edcbe1584b17ac90bea9e633493.tar.gz linux-43d5d3b417410edcbe1584b17ac90bea9e633493.tar.bz2 linux-43d5d3b417410edcbe1584b17ac90bea9e633493.zip |
nvme-core: remove repeated wq flags
In nvme_core_init() nvme_wq, nvme_reset_wq, nvme_delete_wq share same
flags :- WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS.
Insated of repeating these flags in each call use the common variable.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 84cb859a911d..e9aac07f4c26 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -5009,22 +5009,20 @@ static inline void _nvme_check_size(void) static int __init nvme_core_init(void) { + unsigned int wq_flags = WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS; int result = -ENOMEM; _nvme_check_size(); - nvme_wq = alloc_workqueue("nvme-wq", - WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS, 0); + nvme_wq = alloc_workqueue("nvme-wq", wq_flags, 0); if (!nvme_wq) goto out; - nvme_reset_wq = alloc_workqueue("nvme-reset-wq", - WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS, 0); + nvme_reset_wq = alloc_workqueue("nvme-reset-wq", wq_flags, 0); if (!nvme_reset_wq) goto destroy_wq; - nvme_delete_wq = alloc_workqueue("nvme-delete-wq", - WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS, 0); + nvme_delete_wq = alloc_workqueue("nvme-delete-wq", wq_flags, 0); if (!nvme_delete_wq) goto destroy_reset_wq; |