From patchwork Fri Aug 17 10:10:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10568577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B5551575 for ; Fri, 17 Aug 2018 10:10:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25D612B0A0 for ; Fri, 17 Aug 2018 10:10:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1934D2B2AE; Fri, 17 Aug 2018 10:10:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 805352B0A0 for ; Fri, 17 Aug 2018 10:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbeHQNNc (ORCPT ); Fri, 17 Aug 2018 09:13:32 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33506 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbeHQNNc (ORCPT ); Fri, 17 Aug 2018 09:13:32 -0400 Received: by mail-lf1-f67.google.com with SMTP id u14-v6so5532883lfu.0 for ; Fri, 17 Aug 2018 03:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id; bh=oMSxPR2dafaNe+8+1D/CXhrOaVIzspAA8XH3G63SXZg=; b=c4Z37srokmUBThDJAzTJsBIL3iFvtNmDuEVhz3LMiKwc2EB9FxW5bzr41GEWrl222C a6u/7XLnnTAJnQUrnOdqc20dQKn0vbTvpE1fW4pnAlqsQifxZqEbAt31SJhTTjkTHXaO 5FztcnFRruuO6uoWaBepoThE1XZxoVxAEB2GA= 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=oMSxPR2dafaNe+8+1D/CXhrOaVIzspAA8XH3G63SXZg=; b=KByg95v1jxy4Z+jfCLFE/drRQI5KlF8k+Ln2ae/2gsfSxZcIuzcV0Lptne5LiqLGQP MEv1+K+2YBDivJtaIVaaTPk7GsRTCWk+9Su7TBe9c5tS48cxhYfYPg9Wgk7pE2WF1812 BqIH326QGq9ohotGCC72AemU5e/24pMfi7rCoiwKydlOtQw8g1MiIizeHh90LNhrFiFU D1/TxJvNlrGijJ5gdx3TH2ONsVZCbGVLOlcVT91S/8FXzMxwcAGKtqvPfMWAnVDt670t x6MU82Hn7ceUpA+tMkUqCgzTGYTAfJ0eY93srlGZLjJb+/Q3VJKct+2gvwt2mHg21yGE tHmw== X-Gm-Message-State: AOUpUlGaqhBoDlRtfSdWPv1LQg0nibvSaG6LuckK9mqlafsg+5pwlLfO 9UzusZ/OKGQbSR4WUU4Owv7Bsw== X-Google-Smtp-Source: AA+uWPy6Q6b/CMgc/GOtFYiqC4zNusaL6K6yXJiJ5p/rroneb31InIDZ2etOyevXocvTfF7we9keZw== X-Received: by 2002:a19:4d0a:: with SMTP id a10-v6mr21049948lfb.5.1534500640916; Fri, 17 Aug 2018 03:10:40 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id p9-v6sm248800ljh.0.2018.08.17.03.10.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Aug 2018 03:10:40 -0700 (PDT) From: Rasmus Villemoes To: Andrew Morton , Christopher Li Cc: Rasmus Villemoes , linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] linux/compiler.h: don't use bool Date: Fri, 17 Aug 2018 12:10:35 +0200 Message-Id: <20180817101036.20969-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.16.4 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Appararently, it's possible to have a non-trivial TU include a few headers, including linux/build_bug.h, without ending up with linux/types.h. So the 0day bot sent me config: um-x86_64_defconfig (attached as .config) >> include/linux/compiler.h:316:3: error: unknown type name 'bool'; did you mean '_Bool'? bool __cond = !(condition); \ for something I'm working on. Rather than contributing to the #include madness and including linux/types.h from compiler.h, just use int. Signed-off-by: Rasmus Villemoes --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 42506e4d1f53..c8eab637a2a7 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -313,7 +313,7 @@ unsigned long read_word_at_a_time(const void *addr) #ifdef __OPTIMIZE__ # define __compiletime_assert(condition, msg, prefix, suffix) \ do { \ - bool __cond = !(condition); \ + int __cond = !(condition); \ extern void prefix ## suffix(void) __compiletime_error(msg); \ if (__cond) \ prefix ## suffix(); \