[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1615949555-79881-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Wed, 17 Mar 2021 10:52:35 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: davem@...emloft.net
Cc: sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] sparc64: replace if (cond) BUG() with BUG_ON()
Fix the following coccicheck warnings:
./arch/sparc/kernel/traps_64.c:419:2-5: WARNING: Use BUG_ON instead of
if condition followed by BUG.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
arch/sparc/kernel/traps_64.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index a850dcc..fbd9097 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -415,8 +415,7 @@ static void spitfire_clean_and_reenable_l1_caches(void)
{
unsigned long va;
- if (tlb_type != spitfire)
- BUG();
+ BUG(tlb_type != spitfire);
/* Clean 'em. */
for (va = 0; va < (PAGE_SIZE << 1); va += 32) {
--
1.8.3.1
Powered by blists - more mailing lists