From patchwork Mon Aug 23 02:07:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 1519492 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=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=p95B/mf6; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4GtFyG5c90z9sWS for ; Mon, 23 Aug 2021 12:08:06 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234704AbhHWCIr (ORCPT ); Sun, 22 Aug 2021 22:08:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229466AbhHWCIr (ORCPT ); Sun, 22 Aug 2021 22:08:47 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87527C061575; Sun, 22 Aug 2021 19:08:05 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id e14so17707794qkg.3; Sun, 22 Aug 2021 19:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t2mLFYPvbRhohmCBCWrqGpAuTb8PU5rBQSIDrq8BWWw=; b=p95B/mf6bUGCvAcp+15LgkVJxo0OfOIVUn0oxzvXEuKsxKcY8X7OYr9ppqBmqC2F5c bHWq0uuDsS3kSXlRjEqw2RDDAiyWm+Y5D7d0b1ZIqlR4cjMx+osa1pRFYslf5j72n6Ep uq7J8FzcE2WVBjtLAS4PC0ZgV+z/lJ1qfEPIqOmONj74zs+lSowpst1aWI9U6Ip2MaaB 4oEBo5Lbb139oCylzNxSO5jzxkv3FpQCEihe3m/azH6yNP9Vk8z1OhTXtarl+8cW+HXv q+xYi87kiXpU/lpC8QwX/jbt9LVGOxwnBh28wBghu1aIFU+y6yBqGR1lLXDZPfSjFvA3 DryQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t2mLFYPvbRhohmCBCWrqGpAuTb8PU5rBQSIDrq8BWWw=; b=OZwTLdZ2faZTAK6BTFrMX/Ve+ExNmkg6qeIF89TxcrPSHlxJz38IQxnnI4Pa5ZMTHq ERNYq4ylHLrNpq8LmjotPO9BuHnQMeyRMrkefLa5PS0+UAzj7UCYMNB2b+hm/Ufrn3OX CKfM94MHBgv8PBFzhi/CWQbJHQzoV+wO+6HKOjYktryR739o/N6//yuGLbb5/aK2IRJ9 07pFMZLAmCbLqHoS+PhgFVv8JKMW6IBd46//5B/cCrNfzLKmq+HzvalaQSlEXdD0rc5F tAcKg1CT0EnP78xDieExkm8Kpov6AtJEr2vanRoKKh9+AWFziamcV0Nuo8ZqgqQBuyfV CjQQ== X-Gm-Message-State: AOAM532pUCuAn/5f0xL3Gx8GgrRdXjoJRWzhkxTZPBbmdmb+JbCLUcbv 4gjnZKZbveuHZKB97ZLaJ9JMCEwxNJA= X-Google-Smtp-Source: ABdhPJy+jjiT5kHXPURgECyBr2q52UJ4tKTQ5JVyztG7RRMijRZREk/L/Gbagv03bJeHDU8gJKs9Vg== X-Received: by 2002:ae9:de06:: with SMTP id s6mr7226321qkf.489.1629684484764; Sun, 22 Aug 2021 19:08:04 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id t26sm6688070qkm.0.2021.08.22.19.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Aug 2021 19:08:04 -0700 (PDT) From: CGEL X-Google-Original-From: CGEL To: "David S . Miller" Cc: "Eric W . Biederman" , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, Jing Yangyang , Zeal Robot Subject: [PATCH linux-next] arch/sparc/mm/fault_64.c: fix bugon.cocci warnings Date: Sun, 22 Aug 2021 19:07:56 -0700 Message-Id: <20210823020756.44246-1-jing.yangyang@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org From: Jing Yangyang Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Reported-by: Zeal Robot Signed-off-by: Jing Yangyang --- arch/sparc/mm/fault_64.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 9a9652a..672f11b 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c @@ -280,9 +280,8 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) si_code = SEGV_MAPERR; address = current_thread_info()->fault_address; - if ((fault_code & FAULT_CODE_ITLB) && - (fault_code & FAULT_CODE_DTLB)) - BUG(); + BUG_ON((fault_code & FAULT_CODE_ITLB) && + (fault_code & FAULT_CODE_DTLB)); if (test_thread_flag(TIF_32BIT)) { if (!(regs->tstate & TSTATE_PRIV)) {