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=-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 3B9BEC07E96 for ; Tue, 6 Jul 2021 08:51:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A7946198E for ; Tue, 6 Jul 2021 08:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230504AbhGFIyT (ORCPT ); Tue, 6 Jul 2021 04:54:19 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:54235 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbhGFIyS (ORCPT ); Tue, 6 Jul 2021 04:54:18 -0400 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3A1t88c6ozTPK+ByJwCQ9JSEMaV5pOeYIsimQD?= =?us-ascii?q?101hICG9vPb1qynOpoV56faaslgssR0b8+xoW5PhfZq/z/9ICOAqVN/IYOCMgg?= =?us-ascii?q?SVxe9ZgLff/w=3D=3D?= 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 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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);