From patchwork Thu Sep 2 21:50:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12472649 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 681A3C433F5 for ; Thu, 2 Sep 2021 21:50:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 20A33610A2 for ; Thu, 2 Sep 2021 21:50:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 20A33610A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BD9656B007E; Thu, 2 Sep 2021 17:50:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B64146B0080; Thu, 2 Sep 2021 17:50:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9E01D8D0001; Thu, 2 Sep 2021 17:50:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0121.hostedemail.com [216.40.44.121]) by kanga.kvack.org (Postfix) with ESMTP id 8B5DB6B007E for ; Thu, 2 Sep 2021 17:50:22 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3B2AD80263AB for ; Thu, 2 Sep 2021 21:50:22 +0000 (UTC) X-FDA: 78543977484.32.EF4C161 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf19.hostedemail.com (Postfix) with ESMTP id E690DB00009D for ; Thu, 2 Sep 2021 21:50:21 +0000 (UTC) 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 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=mqhuiKZH; spf=pass (imf19.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: t64pa64gpobu6a8xsxfnjjzaa7oknwsr X-Rspamd-Queue-Id: E690DB00009D X-Rspamd-Server: rspam04 X-HE-Tag: 1630619421-674285 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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);