From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B677BC433EF for ; Thu, 2 Sep 2021 21:50:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A10D4610E8 for ; Thu, 2 Sep 2021 21:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347444AbhIBVvW (ORCPT ); Thu, 2 Sep 2021 17:51:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:42658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347554AbhIBVvU (ORCPT ); Thu, 2 Sep 2021 17:51:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 06FB9610A0; Thu, 2 Sep 2021 21:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1630619421; bh=4zQWQF+X9qJNh/uZ3F8WU9qnlJ9U8NnbZirCDSGTLrg=; h=Date:From:To:Subject:In-Reply-To:From; b=mqhuiKZH+RSMEePyzcuzgjmmgB9IZ3t2w9KeE2Am1phmnXwab4SGrjgF2kdctRmhP hX09EFdDWQlS91VCPtCKuGw71bUfqs43ox2ngRXSVC2US0b/D/Bo7lgVh4NHbiRuWj lfv/Ysc+h+r/W/LGT4TQlK3dVGV8VdwOlXcYdV2U= Date: Thu, 02 Sep 2021 14:50:20 -0700 From: Andrew Morton To: akpm@linux-foundation.org, julia.lawall@inria.fr, julianbraha@gmail.com, linux-mm@kvack.org, lkp@intel.com, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 008/212] arch/csky/kernel/probes/kprobes.c: fix bugon.cocci warnings Message-ID: <20210902215020.21JpfD5Rg%akpm@linux-foundation.org> In-Reply-To: <20210902144820.78957dff93d7bea620d55a89@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org From: kernel test robot Subject: arch/csky/kernel/probes/kprobes.c: fix bugon.cocci warnings Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Link: https://lkml.kernel.org/r/alpine.DEB.2.22.394.2107061049150.7197@hadrien Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS") Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reported-by: kernel test robot Cc: Julian Braha Signed-off-by: Andrew Morton --- arch/csky/kernel/probes/kprobes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/arch/csky/kernel/probes/kprobes.c~lib-fix-bugoncocci-warnings +++ a/arch/csky/kernel/probes/kprobes.c @@ -283,8 +283,7 @@ int __kprobes kprobe_fault_handler(struc * normal page fault. */ regs->pc = (unsigned long) cur->addr; - if (!instruction_pointer(regs)) - BUG(); + BUG_ON(!instruction_pointer(regs)); if (kcb->kprobe_status == KPROBE_REENTER) restore_previous_kprobe(kcb); _