Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp99135pxf; Tue, 16 Mar 2021 23:49:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcEHzj7wFbrgk5b5VQPql1hhliAyWiQuFReG1qBnSPzumykWpPxeauT7+bPw8CZ+qasnUS X-Received: by 2002:a17:907:3d8d:: with SMTP id he13mr13608607ejc.530.1615963752283; Tue, 16 Mar 2021 23:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615963752; cv=none; d=google.com; s=arc-20160816; b=BrUeFqorcLXbPDiDTv9rvH5Xud0k4rt8HUL7RYXi1r/nbsmWDeod7mVKdJ9nOOaVPe l8lt79OB7A7y61OJ3MuL6zCuSRGmF2issgdQzHum5NrACFsqJi2VKLgTqJFdVOJnwypG Qmn4mR5XFLjSzQ1x9chQDX1HjvNx5ieeh6Q7j/Cx4m91nYFN1z9HtQkmiDCDUsEbx4As 0ZMZXsr1Y74B3BsGpKNNEuEd2ZW9WGFsPM1tpRReW2fkAd3Ve5Sev9eOoLvM0vWchN4v s0JcMTmbh0KmcBM3i+/G5bmvk4nB/6P3kRyLMQG4cAQziL0jxihg8QBA+QyDkqdAzVXo mriQ== 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=ofRr4ru6nBvJ1fe+ToGPq80PiSXIeBVTLagKQHyK14A=; b=eZIVbRCUR7sHg1gtyJHtgNigvU3dp9LtLO8aVa7uA6am6Xk/7YfX9CsvMEaD2QS1kQ 9E/dhmuPT6QO4aI31vRhj/z9HhhWyLp7lXkbPs2mxeFK4vFOV1yVfcts8YJVzKAYcmeb 6NNOGzZ2W9z2zWmYSibMphe5QwOBUcJzJoWfHw3AzCgk+POa/7eBSxlsqBU9q/98ALEm zgRYeRqx32UaIXeV7HYS7yUXXR7JXUVu2OLJpHNPmpVfons7f9LRT1Rr1qGXCt3ctcal W1qcxbOL+nUJVwNRKMK2VnmLXmwCXW48IoXWl3yB5JEt1jojyfndn/iKmAUuB3rWjqA4 pdLg== 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 c8si15927446edw.367.2021.03.16.23.48.50; Tue, 16 Mar 2021 23:49:12 -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 S230020AbhCQGp3 (ORCPT + 99 others); Wed, 17 Mar 2021 02:45:29 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:48312 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbhCQGpV (ORCPT ); Wed, 17 Mar 2021 02:45:21 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;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_---0USESfUc_1615963512; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USESfUc_1615963512) by smtp.aliyun-inc.com(127.0.0.1); Wed, 17 Mar 2021 14:45:17 +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] sched: replace if (cond) BUG() with BUG_ON() Date: Wed, 17 Mar 2021 14:45:10 +0800 Message-Id: <1615963510-89830-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 --- 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..139a6ec 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 */ + BUG_ON(spu_acquire(ctx)); /* a kernel thread never has signals pending */ if (ctx->state != SPU_STATE_RUNNABLE) goto out; -- 1.8.3.1