Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757540AbZINXk0 (ORCPT ); Mon, 14 Sep 2009 19:40:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757493AbZINXkY (ORCPT ); Mon, 14 Sep 2009 19:40:24 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:51667 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753655AbZINXkY (ORCPT ); Mon, 14 Sep 2009 19:40:24 -0400 Date: Mon, 14 Sep 2009 16:39:46 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: David Daney cc: Brian Gerst , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Ingo Molnar Subject: Re: [PATCH 11/11] Use unreachable() in asm-generic/bug.h for !CONFIG_BUG case. In-Reply-To: <4AAED18E.7030903@caviumnetworks.com> Message-ID: References: <4AAEBAC2.1050905@caviumnetworks.com> <1252965340-31735-11-git-send-email-ddaney@caviumnetworks.com> <73c1f2160909141612i32f46361q7430cecf0b68d07b@mail.gmail.com> <4AAED18E.7030903@caviumnetworks.com> User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 733 Lines: 21 On Mon, 14 Sep 2009, David Daney wrote: > > The existing code just falls through to whatever happens to follow the BUG(). Brian was talking BUG_ON(). And the existing !CONFIG_BUG BUG_ON() is actually set up so that gcc will just optimize it away entirely (yet give the same compile-time warnings as the "real" BUG_ON() does). Changing it to "if (cond) unreachable()" is likely to generate _more_ code, which is against the whole point of wanting to disable CONFIG_BUG. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/