mm: percpu: remove unnecessary unlikely()
Subsystems (2)
PATCH RESEND 1/1 mm: percpu: remove unnecessary unlikely()
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another.
Signed-off-by Igor Stoppa <[email protected]>
Acked-by Dennis Zhou <[email protected]>
Cc Tejun Heo <[email protected]>
Cc zijun_hu <[email protected]>
Cc Christoph Lameter <[email protected]>
--- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/percpu.c +1 -1
@@ -2588,7 +2588,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size,BUG_ON (ai->nr_groups !=1 ); upa = ai->alloc_size/ai->unit_size; nr_g0_units =roundup (num_possible_cpus (), upa); -if (unlikely (WARN_ON (ai->groups[0 ].nr_units != nr_g0_units))) { +if (WARN_ON (ai->groups[0 ].nr_units != nr_g0_units)) {pcpu_free_alloc_info (ai);return -EINVAL ; }
Signature · 1 line
2.17.1
Hi Igor,
Quoted 30 lines · Igor Stoppa
WARN_ON()already contains anunlikely(), so it's not necessary to wrap it into another.Signed-off-by Igor Stoppa <[email protected]>Acked-by Dennis Zhou <[email protected]>Cc Tejun Heo <[email protected]>Cc zijun_hu <[email protected]>Cc Christoph Lameter <[email protected]>--- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/percpu.c +1
-1@@ -2588,7 +2588,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size,BUG_ON (ai->nr_groups !=1 ); upa = ai->alloc_size/ai->unit_size; nr_g0_units =roundup (num_possible_cpus (), upa); -if (unlikely (WARN_ON (ai->groups[0 ].nr_units != nr_g0_units))) { +if (WARN_ON (ai->groups[0 ].nr_units != nr_g0_units)) {pcpu_free_alloc_info (ai);return -EINVAL ; }Signature · 1 line
2.17.1
Sorry for the delay. I'll be taking over the percpu tree and am in the process of getting a tree. I'm still keeping track of this and will take it for the next release.
Thanks,
Dennis
Quoted 3 lines · Dennis Zhou
Sorry for the delay. I'll be taking over the percpu tree and am in the process of getting a tree. I'm still keeping track of this and will take it for the next release.
ok, np!
--
thank you, igor