diff options
author | Brian Behlendorf <[email protected]> | 2018-02-07 11:49:38 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2018-02-07 11:49:38 -0800 |
commit | 5461eefe50427a8f8caf0b92f0195c754bed8ec6 (patch) | |
tree | f3ffcd8012094c4af84519c4c8a6ed4f0f74fd8d /module/spl/spl-taskq.c | |
parent | 23602fdb39e1254c669707ec9d2d0e6bcdbf1771 (diff) |
Fix cstyle warnings
This patch contains no functional changes. It is solely intended
to resolve cstyle warnings in order to facilitate moving the spl
source code in to the zfs repository.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #681
Diffstat (limited to 'module/spl/spl-taskq.c')
-rw-r--r-- | module/spl/spl-taskq.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index ae26bdb2e..2919a942a 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -87,7 +87,7 @@ taskq_find_by_name(const char *name) list_for_each_prev(tql, &tq_list) { tq = list_entry(tql, taskq_t, tq_taskqs); if (strcmp(name, tq->tq_name) == 0) - return tq->tq_instance; + return (tq->tq_instance); } return (-1); } @@ -573,7 +573,8 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(tq->tq_nactive <= tq->tq_nthreads); if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) { /* Dynamic taskq may be able to spawn another thread */ - if (!(tq->tq_flags & TASKQ_DYNAMIC) || taskq_thread_spawn(tq) == 0) + if (!(tq->tq_flags & TASKQ_DYNAMIC) || + taskq_thread_spawn(tq) == 0) goto out; } @@ -686,7 +687,8 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, if ((flags & TQ_NOQUEUE) && (tq->tq_nactive == tq->tq_nthreads)) { /* Dynamic taskq may be able to spawn another thread */ - if (!(tq->tq_flags & TASKQ_DYNAMIC) || taskq_thread_spawn(tq) == 0) + if (!(tq->tq_flags & TASKQ_DYNAMIC) || + taskq_thread_spawn(tq) == 0) goto out2; flags |= TQ_FRONT; } @@ -786,7 +788,8 @@ taskq_thread_spawn_task(void *arg) if (taskq_thread_create(tq) == NULL) { /* restore spawning count if failed */ - spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); tq->tq_nspawn--; spin_unlock_irqrestore(&tq->tq_lock, flags); } @@ -1146,7 +1149,8 @@ taskq_destroy(taskq_t *tq) while (tq->tq_nspawn) { spin_unlock_irqrestore(&tq->tq_lock, flags); schedule_timeout_interruptible(1); - spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); + spin_lock_irqsave_nested(&tq->tq_lock, flags, + tq->tq_lock_class); } /* @@ -1239,16 +1243,16 @@ param_set_taskq_kick(const char *val, struct kernel_param *kp) #ifdef module_param_cb static const struct kernel_param_ops param_ops_taskq_kick = { - .set = param_set_taskq_kick, - .get = param_get_uint, + .set = param_set_taskq_kick, + .get = param_get_uint, }; module_param_cb(spl_taskq_kick, ¶m_ops_taskq_kick, &spl_taskq_kick, 0644); #else module_param_call(spl_taskq_kick, param_set_taskq_kick, param_get_uint, - &spl_taskq_kick, 0644); + &spl_taskq_kick, 0644); #endif MODULE_PARM_DESC(spl_taskq_kick, - "Write nonzero to kick stuck taskqs to spawn more threads"); + "Write nonzero to kick stuck taskqs to spawn more threads"); int spl_taskq_init(void) |