Skip to content

Commit 2fd4e52

Browse files
tobluxhdeller
authored andcommitted
parisc: Use max() to calculate parisc_tlb_flush_threshold
Use max() to reduce 4 lines of code to a single line and improve its readability. Fixes the following Coccinelle/coccicheck warning reported by minmax.cocci: WARNING opportunity for max() Signed-off-by: Thorsten Blum <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 4c29ab8 commit 2fd4e52

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

arch/parisc/kernel/cache.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,7 @@ void __init parisc_setup_cache_timing(void)
611611
threshold/1024);
612612

613613
set_tlb_threshold:
614-
if (threshold > FLUSH_TLB_THRESHOLD)
615-
parisc_tlb_flush_threshold = threshold;
616-
else
617-
parisc_tlb_flush_threshold = FLUSH_TLB_THRESHOLD;
618-
614+
parisc_tlb_flush_threshold = max(threshold, FLUSH_TLB_THRESHOLD);
619615
printk(KERN_INFO "TLB flush threshold set to %lu KiB\n",
620616
parisc_tlb_flush_threshold/1024);
621617
}

0 commit comments

Comments
 (0)