Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp55240imm; Thu, 30 Aug 2018 15:36:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbZt1O4BFMYqxRm1WvqDRZcZUD+5QCb9i6bk+D231u47MwKqrXihFD4pM0w3DgfY5R8Wxqu X-Received: by 2002:a65:5a81:: with SMTP id c1-v6mr11174848pgt.120.1535668609638; Thu, 30 Aug 2018 15:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535668609; cv=none; d=google.com; s=arc-20160816; b=ugfHJzN0NgR6QSe3oApwc9fuZUbrv7F/qnlwKIbsbEewCeDm6lvdawXbOKZhI5kn0H IF1ZOHions7+a82RHvrT5eXp2G1jDy1BF/JQmllVnpFaBeesz/k3jS0XqZyyYDDQSEjx ELt+xw1tnaijnvsuyPF9vMzneS3Qujsn7airgcPL75SPZ4F1Q5YCqdEqF1mz7LdD2daQ wgFGetCT68cJ59wqU1tFxBJR4289RgGD01Xl40K+NZMXQW/SWcWiOTW8DgjAncmo4EUj 2WDjF2Zn0s1wNYGr33F8YZ3xR1tv/qh1//k/3lom7/UwIio+RKKD4BWLqojjqHMITnRM dCwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qc6f3RCeMvcYS414KQk2UoalnwZYaTIGU5CNR2lJgd4=; b=IrYF9AZ4fgYmOVGZg7BInfw+/b55EyweY0f1O7syU+RxOiXpkX8EF71MeakCJneYlN PKfUKKfFDqEL6BbuVIBbCZXS7ghKp8Y/rBRrxKiakqTGDbziOc3fR/IgiJaYlf9Ijyev Rs4HfOUkS7hRiZsBDztHlSWdHvqYaK5Ai6knFRElct0iLN5vuwUuVAD3QNohnknk1w97 lHPQAozPvod3ysv+uyE0ARl+om7dUWRWHIB3rTX0N7Zbjoz70Y5s2FaNsiQ5gVo4isoR wS5GokYcRK1rfn/tAs1AJhAQtnyMajHJIRmgnuBYveGaXsQPPrj2WAlHpBrBLpMfSruh Ce9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EXodEwnG; 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 w11-v6si6334526pgm.616.2018.08.30.15.36.35; Thu, 30 Aug 2018 15:36: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EXodEwnG; 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 S1727404AbeHaCjr (ORCPT + 99 others); Thu, 30 Aug 2018 22:39:47 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:43313 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbeHaCjq (ORCPT ); Thu, 30 Aug 2018 22:39:46 -0400 Received: by mail-lf1-f65.google.com with SMTP id h64-v6so8448240lfi.10 for ; Thu, 30 Aug 2018 15:35:22 -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:in-reply-to:references; bh=qc6f3RCeMvcYS414KQk2UoalnwZYaTIGU5CNR2lJgd4=; b=EXodEwnGIpMW5E+2RkKDsdSaK+s/JKPNGZVII2/JtEGMhRxHusH3kRgiTC5Rc0HXLF QImdw81xc3yzZjXuREBzNN9AEd4+BCKyhyHZfPWxvWLZt8u+4OCkeLeNdjQOf4do4Lwg SSEGZfBFSAY1FvNBhACE52UwsIA2exx+Npu7g5aNJoSL7JF8mD8BseuOtfT039oHmBke K6hjU88ZNhKS+p6N6ihn+Yjjw2nAnXl8zn5aeyz6Gm/NkfFrRgGQSOXC7mcoXsDbrBaZ 5xID2ziWTbZiaMhhoegoPU5UE9FlcOkenKQ7RXlqTJCMbXUHuSnEFKzFeW0doe7g49r8 m7kQ== 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:in-reply-to :references; bh=qc6f3RCeMvcYS414KQk2UoalnwZYaTIGU5CNR2lJgd4=; b=nA+2CS3B6RN3iszI7eqJIoxavMcinbTbUD32hhQJDNa0AM/2i1kElQwM8Ns7G1928P z4nA/ElEAwFeovLRW+zKTh9xUD3KahwcHoVceYU0gV6TIi5W49kiKo0NJJL/chlsgvqR cCLBbu71FyCJH5UuWhDV7Eapp0W/NegEg2QWnTXMJ9sW0uEokAquHwnh+jIncOar9hEn 4ht0rhS65bKUA5flc07Q8ZofWjfL4ZEw3itYxlPjIgojfeNcd7dBv1tqW7hpJfzu7sUs uxDxmvHjl3pqiSG90ZPE/mCmdYZotrcyDN/4bRkeHd1i6tSWBZFzlo6PmMmoQFhH+UcI dD9A== X-Gm-Message-State: APzg51DZiI/m/S/gPV6xivjqTPuSHuEAr8JN9cJtASDB7H7XES9fBQne AChdxZKaFYgb8dZSHy4k1G+VJGR1AbI= X-Received: by 2002:a19:f83:: with SMTP id 3-v6mr8510414lfp.131.1535668521108; Thu, 30 Aug 2018 15:35:21 -0700 (PDT) Received: from Mort.jumbo.freeair (91-159-62-202.elisa-laajakaista.fi. [91.159.62.202]) by smtp.gmail.com with ESMTPSA id u28-v6sm1455376ljd.61.2018.08.30.15.35.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 15:35:20 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: linux-kernel@vger.kernel.org Cc: igor.stoppa@gmail.com, Igor Stoppa , Arnd Bergmann Subject: [PATCH 03/23] asm-generic: bug: add unlikely() to BUG_ON() Date: Fri, 31 Aug 2018 01:34:09 +0300 Message-Id: <20180830223429.30051-4-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180830223429.30051-1-igor.stoppa@huawei.com> References: <20180830223429.30051-1-igor.stoppa@huawei.com> 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. If BUG_ON() is used instead of BUG(), it means that probably the preferred outcome is to not BUG(). Signed-off-by: Igor Stoppa Cc: Arnd Bergmann --- 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 20561a60db9c..34c48444c942 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -183,7 +183,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.17.1