From patchwork Tue Jul 6 08:51:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12360077 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=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 30133C07E9B for ; Tue, 6 Jul 2021 08:51:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 90A59613C9 for ; Tue, 6 Jul 2021 08:51:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90A59613C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 595DC6B0011; Tue, 6 Jul 2021 04:51:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5456C6B0036; Tue, 6 Jul 2021 04:51:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40D016B005D; Tue, 6 Jul 2021 04:51:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id 06DF56B0011 for ; Tue, 6 Jul 2021 04:51:41 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 79B3982499A8 for ; Tue, 6 Jul 2021 08:51:41 +0000 (UTC) X-FDA: 78331544802.11.39F0273 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by imf23.hostedemail.com (Postfix) with ESMTP id 75C3190000B4 for ; Tue, 6 Jul 2021 08:51:40 +0000 (UTC) IronPort-HdrOrdr: A9a23:1t88c6ozTPK+ByJwCQ9JSEMaV5pOeYIsimQD101hICG9vPb1qynOpoV56faaslgssR0b8+xoW5PhfZq/z/9ICOAqVN/IYOCMggSVxe9ZgLff/w== X-IronPort-AV: E=Sophos;i="5.83,328,1616454000"; d="scan'208";a="518501364" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 10:51:38 +0200 Date: Tue, 6 Jul 2021 10:51:38 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Julian Braha cc: Andrew Morton , Linux Memory Management List , linux-kernel@vger.kernel.org, kbuild-all@lists.01.org Subject: [PATCH] lib: fix bugon.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf23.hostedemail.com: domain of julia.lawall@inria.fr designates 192.134.164.83 as permitted sender) smtp.mailfrom=julia.lawall@inria.fr X-Stat-Signature: wemh6ahxc1t3erbbn8urr1upsetfe4dr X-Rspamd-Queue-Id: 75C3190000B4 X-Rspamd-Server: rspam06 X-HE-Tag: 1625561500-780750 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 Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS") CC: Julian Braha Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a180bd1d7e16173d965b263c5a536aa40afa2a2a commit: 7d37cb2c912dc5c25ffac784a4f9b98c06c6bd08 lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS :::::: branch date: 21 hours ago :::::: commit date: 3 months ago kprobes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/arch/csky/kernel/probes/kprobes.c +++ b/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);