From patchwork Mon Jan 14 18:04:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 10763265 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 EB04C91E for ; Mon, 14 Jan 2019 18:04:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC3C82974C for ; Mon, 14 Jan 2019 18:04:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D08792974F; Mon, 14 Jan 2019 18:04:32 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 69F202974C for ; Mon, 14 Jan 2019 18:04:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12FD36EAF6; Mon, 14 Jan 2019 18:04:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 684996EAF6 for ; Mon, 14 Jan 2019 18:04:28 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id v1-v6so19891964ljd.0 for ; Mon, 14 Jan 2019 10:04:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=pr4VSGQ+xCXh7J434IbHVi/8WROjp4XrzhM5ajPph1M=; b=LMeNKlMauKqSJHa8wOhk+E8infHZ26ihjxbOrJm7X2xB8sqt6/VBzg8U+2oWqMOJN+ RetLqCFQL+61ad05rfAZe1LOW7ldPI+THf0/8dqDUc6QZZkP4kCiIQ2rogfPHXiqKFHP NR2irjVV0PjQNI7O3AJCRIhi9BhnnW54E3t729k00IDdG/PWnua9PnWTVbgGE5Q1fiAH X4PkJrd3ewtiY8PPNQ7sdC16IYbMlTjGdJ4UdaHmetAI49DbNSKWy3Y7ei303t751wbg OCB+nszznsh31sUMANVzTs60s2FVyaqQn+QBHrmOT772hGu283NhK50B64yUykO58NdX QUGg== X-Gm-Message-State: AJcUukfVW1GYHf7h23wu+tQpCeEuIUgLlVzYfp6/59CAonSsOJM4wp/1 psmzNCDPGB6ui4rp+5Puk3+upxhN X-Google-Smtp-Source: ALg8bN56S56YGSYx7vf4eE/212CCseprUqsVePjHC3N5Qh5UPI1mC+o+inkVQERHTCyXj7/mVfH1Mw== X-Received: by 2002:a2e:9356:: with SMTP id m22-v6mr15231521ljh.135.1547489066409; Mon, 14 Jan 2019 10:04:26 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id e5-v6sm184255ljj.91.2019.01.14.10.04.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 10:04:25 -0800 (PST) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org Subject: [PATCH v1 1/1] drm: fix alpha build after drm_util.h change Date: Mon, 14 Jan 2019 19:04:13 +0100 Message-Id: <20190114180413.18117-1-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Sam Ravnborg , David Airlie , Sean Paul MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 0-DAY reported the following bug: tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next head: 21376e2c3c5bad5e87ba700c055c8a8235c2bfd5 commit: e9eafcb589213395232084a2378e2e90f67feb29 [1/2] drm: move drm_can_sleep() to drm_util.h config: alpha-allmodconfig (attached as .config) ... In file included from include/linux/irqflags.h:16:0, from include/drm/drm_util.h:35, from drivers/gpu/drm/qxl/qxl_cmd.c:28: >> arch/alpha/include/asm/irqflags.h:58:15: error: unknown type name 'bool' static inline bool arch_irqs_disabled_flags(unsigned long flags) ^~~~ ... So we have a situation where we do not pull in when building for alpha. An quick grep shows that roughly half of the declarations of arch_irqs_disabled_flags() uses int as return type, the other half bool. Two invasive fixes where considered: - Change all declarations of arch_irqs_disabled_flags() to use bool - Add include of to all files that uses bool for arch_irqs_disabled_flags To invases with a too high pain/benefit ratio, so dropped. Some less invasive fixes was also considered: - Add include of to irqflags.h - Add include of to qxl_cmd.c - Add include of to drm_util.h The first was dropped as irqflags.h did not use bool, so no need for the types.h header file. The latter was considered the best option as there could be other similar cases and we would like the header files below include/drm/ to be selfcontained. It turns out that using the standard alphabetical order did not work well as we then included irqflags.h before types.h. It was considered just to pull in interrupt.h but that would pull in a lot of unused stuff. So in the end types.h was included with a comment that it must be first. Build tested with alpha allmodconfig. Fixes: 733748ac37b45 ("drm: move drm_can_sleep() to drm_util.h") Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter --- include/drm/drm_util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h index 0500da65b1d1..0f550bc91db1 100644 --- a/include/drm/drm_util.h +++ b/include/drm/drm_util.h @@ -32,6 +32,8 @@ * Macros and inline functions that does not naturally belong in other places */ +#include /* Due to header dependencies this must be first */ + #include #include #include