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=-28.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 597A2C43381 for ; Wed, 17 Mar 2021 03:36:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35D1D64F96 for ; Wed, 17 Mar 2021 03:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbhCQDgQ (ORCPT ); Tue, 16 Mar 2021 23:36:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbhCQDgF (ORCPT ); Tue, 16 Mar 2021 23:36:05 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44122C06174A for ; Tue, 16 Mar 2021 20:36:05 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id a22-20020a17090aa516b02900c1215e9b33so2445317pjq.5 for ; Tue, 16 Mar 2021 20:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=Nav6mcWfw/USeXNpusZjhfVUHBOlNE7i+AI86mi5prE=; b=tUkwp+07TZCjIQIyTSq0vz15bgDf1PW1A8evGPCNPejxw+fBCgMR0/oY3Cjyf/tjtY tBoDctkxWqrJ4SmLvoL+hHe1oy7wDBJpazoNB9msNjZ/m9lZL69h/ijuo7ua2PDN06Vz Ar0S7rIk6xu08pebcyjeu5Npj4X9HDaQOwwB/J367phYwvcs7O5msQwAkp2gdRyDYX4N 7Uyhd1+pzsey3KvKerMt6UKiKh6O+oUBKaQs3JAz/11hyc3uPBbOYBq+JN3ZE1jVf/Zo L44Ez3rpH7fAZwrYvUrFbc5s47pgZOANdrRtqquS/Q8/qQH4lnK2YmGHFMTAdkOeYSGd AjOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=Nav6mcWfw/USeXNpusZjhfVUHBOlNE7i+AI86mi5prE=; b=KOpFap2vibWkf2krlGoum2mdM4OgkyF1pGsFwaqZZ2XLNayMvGgANFVITpKDLkxrQb 5pvDEVa3tg9ZXw9Ylpbp4IhI/016PYw3kuestiRCTrVx+AyI4CSwC6MjBlPkuFLVPQCZ o8gFbY8IFF4DcTbxSvrWolC6MYehVrGJVvmSdlXhowUS1MEn/q9jSLBw3e+kvq3lQLPY gig0A4K00t6dktv16j/g2i84H7OfCym4YeIyKX8/afVnckGIW6Ukjei8Th0InXEFeboa AZCEArIo0NefHy9gcYBwFlXddq51Q50E+oBANDlqbSMTFVLtsGuOEQJuJuVp+fVtje6H FJIA== X-Gm-Message-State: AOAM531PVv5/O5E3blt47xpxWurk11kS0pmZZjL3Fpd+jPRtUWjjXTdA SLwVIYufm3kbZ67qZto2JhPjoA== X-Google-Smtp-Source: ABdhPJwrpqK9m9xXSzmlkZzk6wyRJdBar8WqT87OfUdubmm6aY1IK5BLMn4W9+NDf1gvOD00CKrdkA== X-Received: by 2002:a17:902:441:b029:e6:364a:5f55 with SMTP id 59-20020a1709020441b02900e6364a5f55mr2550843ple.7.1615952164671; Tue, 16 Mar 2021 20:36:04 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id v3sm17340635pff.217.2021.03.16.20.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 20:36:04 -0700 (PDT) Date: Tue, 16 Mar 2021 20:36:04 -0700 (PDT) X-Google-Original-Date: Tue, 16 Mar 2021 20:31:14 PDT (-0700) Subject: Re: [PATCH] riscv: fix bugon.cocci warnings In-Reply-To: CC: guoren@linux.alibaba.com, me@packi.ch, penberg@kernel.org, linux-kernel@vger.kernel.org, kbuild-all@lists.01.org From: Palmer Dabbelt To: julia.lawall@inria.fr Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 28 Feb 2021 03:10:22 PST (-0800), julia.lawall@inria.fr wrote: > From: kernel test robot > > Use BUG_ON instead of a if condition followed by BUG. > > Generated by: scripts/coccinelle/misc/bugon.cocci > > Fixes: c22b0bcb1dd0 ("riscv: Add kprobes supported") > CC: Guo Ren > 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: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4 > commit: c22b0bcb1dd024cb9caad9230e3a387d8b061df5 riscv: Add kprobes supported > :::::: branch date: 3 hours ago > :::::: commit date: 6 weeks ago > > kprobes.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > --- a/arch/riscv/kernel/probes/kprobes.c > +++ b/arch/riscv/kernel/probes/kprobes.c > @@ -256,8 +256,7 @@ int __kprobes kprobe_fault_handler(struc > * normal page fault. > */ > regs->epc = (unsigned long) cur->addr; > - if (!instruction_pointer(regs)) > - BUG(); > + BUG_ON(!instruction_pointer(regs)); > > if (kcb->kprobe_status == KPROBE_REENTER) > restore_previous_kprobe(kcb); Thanks, this is on fixes.