Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4621831pxf; Tue, 16 Mar 2021 19:47:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUZYAk1ORQRGlv8YpEeTJ/IHXrrmFHK/+0VT33fRjIhiElSYo4VSyH0qGOf9HH5Z7LdCNN X-Received: by 2002:a17:907:3e21:: with SMTP id hp33mr32619372ejc.313.1615949246858; Tue, 16 Mar 2021 19:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615949246; cv=none; d=google.com; s=arc-20160816; b=yeW6YKiIcjiW+KBS9WdN3mkY1G+GGA9kP72tFT5lzz+9V33JZzWRqkhN8I6B5RcqL2 ftE1zwyVWliRddPs+JUuFyHb1RVyvNOI+4cayYyNjyd2jZCJPJC5CyHQaDHS+r5Ojjgt 9q/CWC2G99bZlcuhoPRlOM70E0qFpbylhO9/kjRSjYVjd3WXbf7x76fcV+trttWTZslc jKz+r5j2+3PU/RqL7uf2by/PhhNZh1nmtPDaKxsm+dO4b5jAxzCxOIcsFQw/qecmwYqQ pQhNHaVpj4IIKQCMU1XoDfda4nit+SCRTOeIn33xlAyKEa1MzBUuTwJAbQv91px6/gv3 74XA== 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=29101LSCLjUgLhBxWfc96njtXx/PFH4dkJ5c1Rc76fc=; b=eQnHi03acaqWJG0k/XunoozerVXC2jew/Lq4Yb/VpRECFAHWOyGHJmzYOpyGHzz1cj zbwQXphKWc9RJx5hmTU7aZAlK6zsmTBSA4Cf1I5Y9iX03HhK9cBgowlKr/XCeSo5ZHDL cVvQ6trqiUsgKnNfVKzsDFCOg85hGc3pHAbNK1wQFW/o6VBzy9e1noq3lsOwgACAm2lQ I4YdIWiZPFhcSllClpH5/lfDLFJ4+Qh4eQfhhFGsENNULgeIRpZB/SJ0662nQRr+FYqs IPH4pYNMbi/UzsAa3n9dEi8GjIiIhLS23IQC53bfv0XdmUY7reJkQkBfwMf8zMz0Yjcs /kYw== 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 i25si15163017ejf.656.2021.03.16.19.47.04; Tue, 16 Mar 2021 19:47:26 -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 S229741AbhCQCqB (ORCPT + 99 others); Tue, 16 Mar 2021 22:46:01 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:56565 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbhCQCpa (ORCPT ); Tue, 16 Mar 2021 22:45:30 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R931e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0USD1E.T_1615949122; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USD1E.T_1615949122) by smtp.aliyun-inc.com(127.0.0.1); Wed, 17 Mar 2021 10:45:27 +0800 From: Jiapeng Chong To: mingo@redhat.com Cc: peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] sched: replace if (cond) BUG() with BUG_ON() Date: Wed, 17 Mar 2021 10:45:21 +0800 Message-Id: <1615949121-70877-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: ./kernel/sched/core.c:8039:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- kernel/sched/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9819121..7392bc0 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8035,8 +8035,7 @@ void __init sched_init_smp(void) mutex_unlock(&sched_domains_mutex); /* Move init over to a non-isolated CPU */ - if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0) - BUG(); + BUG(set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0); sched_init_granularity(); init_sched_rt_class(); -- 1.8.3.1