Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp690558pxv; Thu, 1 Jul 2021 07:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwN3ixlzT+vs74Is22BOFax75w/xqiheyOfMKcgP4x5zkj9M1WYNv5PTC4IU/hDhlClxs2 X-Received: by 2002:aa7:dcd9:: with SMTP id w25mr54599edu.372.1625148978908; Thu, 01 Jul 2021 07:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625148978; cv=none; d=google.com; s=arc-20160816; b=wsWjUu0rmht2m4R+fm0UGbQXgxnxgMOzZKseJdXqJHFMqJb3evMj4zfn8Lu/yj+q5L Jdc4mQ3IeasTwKvI3+uoVGr7HJ1QsTd9bXIBNfjkP/VAFc+OJtZ7nLu0hiZDtfnvU+qt 8UVBBiteuiz/1h7FJfcfZN3ZI9DANMeB+bxdYeOTql6tP23ykW204aO4tw37I5Trhv1X FROXg9N//pqkDcBy6D9UqQaLIiVuPXBQ1xXLsef0NM9/H6qUQru4qWl3XuS8XdiOEnxI kQIWGUfuRjvdug0wGpaIhwQIwqgXPW6zzpDwIomH+Io5tRa+SJGafaMRPaK822bEfSDR Qrew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=r4db3OPkr9yWPIm/LiJhnbtIVg9gLfq1RwgzscxX+C0=; b=iviIlbSvi/OavqdliljsdbHCfz/+kX3AGvAmGJgBUxbUMhWavyrz6mYgEcsWXH8nrY i4ecrK7hY8IDdjK05cUlQH0a/3Atbv29rvSYx6R32yG5aBX+K8rDAp596e+CY8MyR80U vyN6zE2/L2e88x3bvEOfz5dzD90kWL1tjx6azCXi8qlwcgWnao+aoshbkjAWsJQ1SGEu 6te4prHGmfPaL4jiOTT9QTfzZ7TRmy0TLp/p4e0xdl6a88G6twBAWfQomYlqNXl4YkkC 27rhPMw+EOBZYGH5pEzkeuIQ+AMBKP8OGVareOxy+CoOEegmgk7mRIxg8vFlJNEy7lHc XoEA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dz9si2635976edb.354.2021.07.01.07.15.53; Thu, 01 Jul 2021 07:16:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232607AbhGAOOc (ORCPT + 99 others); Thu, 1 Jul 2021 10:14:32 -0400 Received: from smtpbg704.qq.com ([203.205.195.105]:59269 "EHLO smtpproxy21.qq.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232081AbhGAOOb (ORCPT ); Thu, 1 Jul 2021 10:14:31 -0400 X-QQ-mid: bizesmtp54t1625148715t01joxvb Received: from localhost.localdomain (unknown [182.148.13.55]) by esmtp6.qq.com (ESMTP) with id ; Thu, 01 Jul 2021 22:11:54 +0800 (CST) X-QQ-SSF: 0100000000800040B000D00A0000000 X-QQ-FEAT: 9waYh4jnNPyqOv0ygbC1/m0a12KsCMqDbI1aToSne+xL3DjS7+G9rBaosHAWB dEe7NJmbOC9e1dhde2jrjIwUlbQUvm7RWjW5/sYo8+unHRDgvcf/ayyTawMlzFSYWlW0C3W rQpGomGd9IqITzL7R4yLpOvme4n73ht1Q7lni582decm5Lng+pYfLOT/qqfSgOWU9d8sUAx bDCh3JgWv245YQNsBXrfiPnKybpT4J4tbms3SXsZ1H4jdr/8ZFyJUNbEo87J64eQ5q+n3+o OSYFPt21WhC0i2uXTijHaYMDGX3PooGpVbiPdzYs7272WJa9vH/gem1ajNqw30UGOawu3MP eRebsxwCQ10VfvOdvMhPkQg1wL13DgwWDtSXDl1 X-QQ-GoodBg: 0 From: Jason Wang 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, Jason Wang Subject: [PATCH v2] sched: Use BUG_ON Date: Thu, 1 Jul 2021 22:11:30 +0800 Message-Id: <20210701141130.940-1-wangborong@cdjrlc.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:cdjrlc.com:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The BUG_ON macro simplifies the if condition followed by BUG, so that we can use BUG_ON instead of if condition followed by BUG. Signed-off-by: Jason Wang --- arch/powerpc/platforms/cell/spufs/sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 369206489895..0f218d9e5733 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -904,8 +904,8 @@ 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 */ + /* a kernel thread never has signals pending */ + BUG_ON(spu_acquire(ctx)); if (ctx->state != SPU_STATE_RUNNABLE) goto out; -- 2.32.0