mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
rcu: Simplify param_set_next_fqs_jiffies() by applying clamp_val()
This commit replaces a nested ?: sequence with clamp_val(). This does not reduce the number of lines of code, but it does simplify the line that it modifies. Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
This commit is contained in:
committed by
Uladzislau Rezki (Sony)
parent
5f136351ed
commit
d9b4d36b8c
@@ -492,7 +492,7 @@ static int param_set_next_fqs_jiffies(const char *val, const struct kernel_param
|
||||
int ret = kstrtoul(val, 0, &j);
|
||||
|
||||
if (!ret) {
|
||||
WRITE_ONCE(*(ulong *)kp->arg, (j > HZ) ? HZ : (j ?: 1));
|
||||
WRITE_ONCE(*(ulong *)kp->arg, clamp_val(j, 1, HZ));
|
||||
adjust_jiffies_till_sched_qs();
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user