summaryrefslogtreecommitdiff
path: root/arch/parisc
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@toblux.com>2024-07-04 07:51:34 +0300
committerHelge Deller <deller@gmx.de>2024-07-04 23:37:26 +0300
commit2fd4e52e442c42e01722f5d4cfef693a2da478dd (patch)
tree611699f84beae74de9bd32d69633a41600126178 /arch/parisc
parent4c29ab84cfec17081aae7a7a28f8d2c93c42dcae (diff)
downloadlinux-2fd4e52e442c42e01722f5d4cfef693a2da478dd.tar.xz
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>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/cache.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 483bfafd930c..db531e58d70e 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -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);
}