Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp123765pxf; Wed, 17 Mar 2021 00:37:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/HqI0qct1usAAfcMnFiiM45kPUSW5vfojPBUeqF2nfRDwnVvuw2XSpAE8Psy89T2xBYkO X-Received: by 2002:aa7:c4d1:: with SMTP id p17mr40766574edr.387.1615966642079; Wed, 17 Mar 2021 00:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615966642; cv=none; d=google.com; s=arc-20160816; b=uW9CPNumUEkRrh/4QFSe4KRhLvWCGajuBYrDu0tn1VU0my5JmwDAD/V5p1TrvC3MZ8 rxtyjeL5LOctTv3odLNfCTXzrkJLzZ+kTXZckPZS9x6DjVE+wfgLiah2uoN3kmlfu4Rb xzOlSMirdHl4BiaOUEVAnuP+A9R9PtFWN0mYi7Bbd/IoeGTkWawFR7hnJMR+TUTnAw61 uoSXoI/V1UHZ0560YDm6jtu18A9x5VbTwbGen0/x6mG5FjqNkstZ2OAwDAOv3x5u0USa x9GN6BvcYQ0K98eOoYkwDLEBzG3/FNoMTk6teMLF5cA4xaVUUaQKBlj1Be4X5ppZYxav qeaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=/A+zj1dpqB2tTVfXVQvVEvyx47fxCjE8+n/55k9otaQ=; b=XCxR6iGOR76vOmGvIOPg2wXohYgBIhKrSgQldDbCUPoF0vELhCMAUOCHezGgQaVsev Z6xHbYvjghNcunXV3Rqhln/2bp+BH9lN13gySJmol48pvIIlayPxgySnJjOsnjQP9sII mKt/d/9DqiznCJLQC5YU8p6KXXCoXg0eCtgXVEfMbDl6/4xi1Z1zcpyXx7NCtkE9UPdb vw0zWX7AgkdCsbR5kAZKk9XIdC6e9CImzsJD/rsDMRCf2P1KOeuFl0ZT2V2F9kW/R+XF uWDI9VCBeb3cZFrlm66HRoNTHitycFGVdrvspBqoN91AOFDrd6IyEM1AqSqn7whaSVIY wIwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs11si7205384ejc.375.2021.03.17.00.36.58; Wed, 17 Mar 2021 00:37:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbhCQHd7 (ORCPT + 99 others); Wed, 17 Mar 2021 03:33:59 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:37334 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbhCQHdy (ORCPT ); Wed, 17 Mar 2021 03:33:54 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0USELFXx_1615966422; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USELFXx_1615966422) by smtp.aliyun-inc.com(127.0.0.1); Wed, 17 Mar 2021 15:33:52 +0800 From: Jiapeng Chong To: jk@ozlabs.org Cc: arnd@arndb.de, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH v2] sched: replace if (cond) BUG() with WARN_ON() Date: Wed, 17 Mar 2021 15:33:39 +0800 Message-Id: <1615966419-20549-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./arch/powerpc/platforms/cell/spufs/sched.c:908:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - replace BUG with WARN_ON. arch/powerpc/platforms/cell/spufs/sched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 3692064..1031448 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -904,8 +904,7 @@ static noinline void spusched_tick(struct spu_context *ctx) struct spu_context *new = NULL; struct spu *spu = NULL; - if (spu_acquire(ctx)) - BUG(); /* a kernel thread never has signals pending */ + WARN_ON(spu_acquire(ctx)); /* a kernel thread never has signals pending */ if (ctx->state != SPU_STATE_RUNNABLE) goto out; -- 1.8.3.1