mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 16:09:09 -05:00
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 <thorsten.blum@toblux.com> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
committed by
Helge Deller
parent
4c29ab84cf
commit
2fd4e52e44
@@ -611,11 +611,7 @@ void __init parisc_setup_cache_timing(void)
|
||||
threshold/1024);
|
||||
|
||||
set_tlb_threshold:
|
||||
if (threshold > FLUSH_TLB_THRESHOLD)
|
||||
parisc_tlb_flush_threshold = threshold;
|
||||
else
|
||||
parisc_tlb_flush_threshold = FLUSH_TLB_THRESHOLD;
|
||||
|
||||
parisc_tlb_flush_threshold = max(threshold, FLUSH_TLB_THRESHOLD);
|
||||
printk(KERN_INFO "TLB flush threshold set to %lu KiB\n",
|
||||
parisc_tlb_flush_threshold/1024);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user