From patchwork Wed Mar 17 02:52:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 1454407 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=sparclinux-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4F0ZVB5JmPz9sWP for ; Wed, 17 Mar 2021 13:53:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229541AbhCQCxG (ORCPT ); Tue, 16 Mar 2021 22:53:06 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:41649 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbhCQCwn (ORCPT ); Tue, 16 Mar 2021 22:52:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0USCjvVa_1615949556; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USCjvVa_1615949556) by smtp.aliyun-inc.com(127.0.0.1); Wed, 17 Mar 2021 10:52:41 +0800 From: Jiapeng Chong To: davem@davemloft.net Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] sparc64: replace if (cond) BUG() with BUG_ON() Date: Wed, 17 Mar 2021 10:52:35 +0800 Message-Id: <1615949555-79881-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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 Signed-off-by: Jiapeng Chong --- 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) {