Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1399343ybl; Wed, 28 Aug 2019 14:10:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfSEIDSZ3y3xItL4CcPGvOEmlFY31s8/a6HTKuMRNFAAhZhiBXHhuHhZATabQ/WSZkI9QU X-Received: by 2002:a17:902:20e3:: with SMTP id v32mr6067607plg.142.1567026649679; Wed, 28 Aug 2019 14:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567026649; cv=none; d=google.com; s=arc-20160816; b=QfsMTJc+sxOb88ssOfAMFHS/vsxVUGAlAkHTuUdF10pLaHpHq3zVxgXfoerryd73Uu hEUbY/pCZmKr2TuwR6gS7OArHuwuzv3VGcw0DeqZEyBcYGFwE9ADlkmhvzjU6W007Iyu oShoGpJC029T10N4JT6MCSjp7/f5pOFuoDpBM9T6+UZlkY/3r0SFomNvhSEpGXYsW5+v QHLm2XzD8FP7fHdfM2kxQaSZPJuYsxjj22fLAUsYf3nHHwvEE4ZatiMErAeHUJJPTKXK xm3Li5SNTVLV1Q33KUY4kfk4Xs9fENISX1VLQrjhDIFgsJNAeEAfuycO2iT9xDQ1iW58 DE+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=6A42lJeJnLJ8M4juk0mvSEa+/hVqH6gniCUyxaWPy0A=; b=p+1Qp44v6bCnCxGAbC0zS0Lu2xAMMCxb0NlSvHpA0RvsTy3IIAjkZZX6p7EI1hFkXZ DJ9f81uI+kEXpZ7BIELRqkm71trLFn5maNbwNRMYVgs0JNUu6N1MRlYSHc/GbxEch1kX 0loFsHUsscdbK4LNe12JRqxvRvj6oLfN+zBi7QKKJX/hRi50r6a9XVuIqTmABBuAowR0 YiyJzNds7wyizaW7O+BzrwJSIViqDxeU8Shb0L2xjwE7a7+zudDSSIBBtCvUqiKjEs5X 4GQaHyoZPl75H5yGCd2iIEtPvQrTAmFRsTCXKalztvrADPUF9ee/4TlFsGwCttJ8cRvp jVSw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id co10si53763plb.358.2019.08.28.14.10.33; Wed, 28 Aug 2019 14:10:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbfH1VJl (ORCPT + 99 others); Wed, 28 Aug 2019 17:09:41 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:50735 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbfH1VJk (ORCPT ); Wed, 28 Aug 2019 17:09:40 -0400 Received: by mail-wm1-f65.google.com with SMTP id v15so1515136wml.0; Wed, 28 Aug 2019 14:09:39 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=6A42lJeJnLJ8M4juk0mvSEa+/hVqH6gniCUyxaWPy0A=; b=tbXo7fiiWXcce8idgBc/4Sg0k08FJ+HEl2xGsD4axeBx4LfWmeRy2+O+jpwTbhJEJY yF8CQ5Hk2uZiql+tCFT8013RRbqerIIfRy7JKxiGaAnZNCazhlepOxQA3jbTw3VGPMYW Rg+9dNnOLUyOamO/18daMwGs0o4LC8sPMxPiT/l48z0NOXEMze4aewz+H/7/ci18hxJW TFrnK3brF2BowYScErgGwaGerWRdzmMeNKwMuO0Q5aciOVrYfMUZ2IoXCK2VQCcQDFGy lpvIJQ3pxq2rSjClGDMovtKLWbulL5HtUKeR9CovVe0HNIdl3yWIWQCbdusd+PonplVy gidg== X-Gm-Message-State: APjAAAUjPJjy3D9Xsz5Ah9N00rQfwUJpvfP/lN9HlHB9GgdOZu5M6QfP 92Bjy/RNRvfa2dgTiUCXF6UxkZN6 X-Received: by 2002:a05:600c:144:: with SMTP id w4mr7586256wmm.94.1567026578737; Wed, 28 Aug 2019 14:09:38 -0700 (PDT) Received: from black.home (broadband-188-32-48-208.ip.moscow.rt.ru. [188.32.48.208]) by smtp.googlemail.com with ESMTPSA id r1sm541838wro.13.2019.08.28.14.09.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Aug 2019 14:09:37 -0700 (PDT) From: Denis Efremov Cc: Denis Efremov , linux-kernel@vger.kernel.org, Arnd Bergmann , linux-arch@vger.kernel.org Subject: [PATCH] asm-generic: add unlikely to default BUG_ON(x) Date: Thu, 29 Aug 2019 00:09:34 +0300 Message-Id: <20190828210934.17711-1-efremov@linux.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add unlikely to default BUG_ON(x) in !CONFIG_BUG. It makes the define consistent with BUG_ON(x) in CONFIG_BUG. Signed-off-by: Denis Efremov Cc: Arnd Bergmann Cc: --- include/asm-generic/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index aa6c093d9ce9..7357a3c942a0 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -185,7 +185,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint, #endif #ifndef HAVE_ARCH_BUG_ON -#define BUG_ON(condition) do { if (condition) BUG(); } while (0) +#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) #endif #ifndef HAVE_ARCH_WARN_ON -- 2.21.0