Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2119767imm; Fri, 7 Sep 2018 11:05:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdahEEXArsLGhg9oOLBlE+D+Xjk0R6bJ0LeuOqqkve8u06+yAIWY3DBOwyAa4fRgJKwraX/P X-Received: by 2002:a63:4702:: with SMTP id u2-v6mr9262119pga.95.1536343512320; Fri, 07 Sep 2018 11:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536343512; cv=none; d=google.com; s=arc-20160816; b=YCRbZARNFQ/wFjOxA/PjAVrWQViTc7MjPIUQO2nYuZkx85rrZxyHZve4JTgFICz85H QSHdG3gv6UwJbYd4+ZQ0ZzJCnD5UaYTivK6JWkywlCPcjN49oNATIccVrpIjK5BA0kpK MGUYRo+V+7HwQcdCFR/sQG98cfWPSdfVi3I3X7BNA1ID8mYTBI82RS1yWdayujuAmfqK f/Y+0GG0X9nGwZA/ujS7xtTx8l936TvIzRp+XooesKQRIQ22X4RT5NG7wrMk0Es9BnTv 3xKOs7uG155wOPvc32wzmjSXH8KjotPPASxYl2GXflqwazGQNMymZnTHeplmYbRXrHyR 8kvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=WCP4JlpgixlAuxMIVAef6ZdT4lFJWxoSXx8pBBtb2rM=; b=AZYnlMq/7ZXPiQg0CN6Rz9Ns23XvPWrXEqw3+PmNa+hswUJVy95V2ic+AX+eAGQcm1 5Zlm69Zid3/IZF+24asBjJ5c5VfqxEsssSmzKhVjX2eA9KO3rzSyJrjm6kOad9FEvcmd qqWH2+xVYcnFsFLuQsb4kMJweByEhJZCVwzvqXbyPy4d3JBcUX/3wBzOIfLxRmDrlm8Z lDu9AEnZ0RzDeILzc3nCY3WXHNzw92xNxTuDdZ8HmQJjPTSn4VWn/sJbfRxlrsEo0Uei W6zZSvCso9gIaJZU9MLLdDG3mOwzi60SEKqiEVfzEW0pka++U5rC6npSpuSFz/BXlVUz mEIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z4GflOKK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m37-v6si8517845plg.340.2018.09.07.11.04.55; Fri, 07 Sep 2018 11:05:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Z4GflOKK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727399AbeIGWpT (ORCPT + 99 others); Fri, 7 Sep 2018 18:45:19 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:39447 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbeIGWpS (ORCPT ); Fri, 7 Sep 2018 18:45:18 -0400 Received: by mail-lf1-f65.google.com with SMTP id v77-v6so12730093lfa.6 for ; Fri, 07 Sep 2018 11:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WCP4JlpgixlAuxMIVAef6ZdT4lFJWxoSXx8pBBtb2rM=; b=Z4GflOKKNMs7VJxVvWIU6K6uJDOsOHnd9GcUaYG2XKUgy/xoeGfnh70mJx2JBxTgIu 9pi/vouHMb/hjpIX05uyMWBSi9H/1iXNRyZ3AfOiTq3rKn86m4GgJ9TqJbNkFn6M3I9e 1gX44vSm//ywLN2lnHdrll5kUGjzS7EWXTCYbTt4elB+BULUf3HdO2quQD+TSWIdcSrh IRAogt++pExEYnNzi2ZlJ1Y2nGsbHSg6Jqj3TQnmT+TrRjPQ4+O/x2h9sUegPGkErAcv LePWZKCVPZDQonUN1dEugXImd97kk6Ne/1DViOt0LyOUahpjdhrOTrWlV3pW7jJ0auCb FF6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WCP4JlpgixlAuxMIVAef6ZdT4lFJWxoSXx8pBBtb2rM=; b=eezcWnYnHJI49lJYeNoX7aDvqdq8LgShYAsCwv2Y+p8bmD7wRk/a2gmcX0pMrpbOM4 lNEeP7tRSmQq3uv9vvIzjVpUwwt3NY/DZINp44QNX2fChtBgGIPsvZDL0FYZdO49Iemw ocptqwWscD2dtdqTWst/ANSS2kPLZ05pmHJPJ2/ZU2cLvS9CHfm7eDfJCz+bY1hmrZnM hOQSttdt7nokQXw52mD3dfPbMYNMs5QhBxILDesjGOeChkB2rKjSLIr7mdW01+sHYe21 YjWrNs3fNrySEG1s+f4XWSwxHmyPTJAdNm/ryvkj8VjCGRTKfj2Z1rbH2tXl7wyny7pS JGRg== X-Gm-Message-State: APzg51CgSemq1/iNGB4MdZYy8zUc9nVFbnjpakLMsxkdi5qgwHhM8hkE EViZ7MVtV2cErJ6Qu3ytAlw= X-Received: by 2002:a19:ca09:: with SMTP id a9-v6mr5666369lfg.120.1536343392744; Fri, 07 Sep 2018 11:03:12 -0700 (PDT) Received: from Mort.jumbo.freeair (91-156-179-220.elisa-laajakaista.fi. [91.156.179.220]) by smtp.gmail.com with ESMTPSA id r4-v6sm1362962ljd.70.2018.09.07.11.03.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 11:03:11 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: David Daney Cc: igor.stoppa@gmail.com, Igor Stoppa , Ralf Baechle , Paul Burton , James Hogan , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: [PATCH] mips: bug: add unlikely() to BUG_ON() Date: Fri, 7 Sep 2018 21:03:02 +0300 Message-Id: <20180907180302.656-1-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a hint to the compiler that probably it won't be necessary to BUG() Signed-off-by: Igor Stoppa Cc: David Daney Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org --- arch/mips/include/asm/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h index 745dc160a069..02101b54aec2 100644 --- a/arch/mips/include/asm/bug.h +++ b/arch/mips/include/asm/bug.h @@ -31,7 +31,7 @@ static inline void __BUG_ON(unsigned long condition) : : "r" (condition), "i" (BRK_BUG)); } -#define BUG_ON(C) __BUG_ON((unsigned long)(C)) +#define BUG_ON(C) __BUG_ON(unlikely((unsigned long)(C))) #define HAVE_ARCH_BUG_ON -- 2.17.1