From patchwork Thu Nov 2 11:26:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10038545 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D7A3B6032D for ; Thu, 2 Nov 2017 11:27:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBD7428E45 for ; Thu, 2 Nov 2017 11:27:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C09E528E90; Thu, 2 Nov 2017 11:27:13 +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=-4.2 required=2.0 tests=BAYES_00, 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 551A728E45 for ; Thu, 2 Nov 2017 11:27:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A334F6E0B0; Thu, 2 Nov 2017 11:27:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B4486E0B0 for ; Thu, 2 Nov 2017 11:27:11 +0000 (UTC) Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0LeLdN-1dMeIT2HZF-00qEmb; Thu, 02 Nov 2017 12:27:00 +0100 From: Arnd Bergmann To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally Date: Thu, 2 Nov 2017 12:26:41 +0100 Message-Id: <20171102112657.111405-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:nPVo576yWmfLJzdFbR4Wbr2roa7QJz21Zm7Zf+WvBbVgIzkxEmp p91FRUxYiletfCT2YpTcd/y6SZ+FdVwhaPsXD06jvCMtV5bBsZ09vWGC/+aBc1iQAgBRcQT Y6iVt+Pa8jeaQcpG8uvdlvvQLJtriJfC3UNeh5F9W3+u0jULCesyocpRmafnTD5LOPM4MYk gnI4c3lKFDgWa4srhmwng== X-UI-Out-Filterresults: notjunk:1; V01:K0:7di+JGZOLbs=:NxQQ8Qhr0ozwzp+uONkmbQ woWXic5IwOh5sGTjnprf/e2ADnRtDqxKzaEyRJWK897W59UuSOo4GCd679s/CBFYZACbuo48s GwpNGyVsZVRRMI/c2xEZmoodLtdVUxyVHgxFqy8jeWDlivJ4wTLrC7abDl5H+VGIsyEyRGWvW cL8DVFLRdVmPGlTwSI7buEqJKCXJTQ5x+vaElWtjSDJcPf/UFFdFIEZCP0ertkuxeNgXoEAGP ItrgLZlHf1rC9L4AEKHlAOz5tgCgyeI3jPfpCzissZEV0ua3OsOrc4MMy6kI4aFiRcHDtqjR5 dSZAZyXQr8Vl+VSDEFio5Z4JJHKPNzVKOCqnTXBUEI459oqvJh1bIckp0x5y673qVTpFNsLff xQVzypg85SzKbDqFiFywhEF6egDZ1KlR+ddaPoPLczFIakIuTOhdDyiV5g7vc+qXCJb2f6/cS qaLfX67aEJ7A5sR/XAYvBC+j8YYg5CxQUjGXPscusjXujuvuja6DuHFH7E56hlaydr3xk+bjB 7FacgrJuSkeVIPnGxzBa5Izj/j6RMahD23as4jxKGP0GQeS+5ZwgXz9wp0ksnRrhQKv0wfbsS lYhrdWTmwQcoqSb1U8uCVMETZj1/QHybtNQtHpfVhQ5OAK1oJ3uIuZEFh34JJsgF49WtAIjch JnGxayioB3yN0iu3D4qn9xWMNQUV/z6rs4/k7ceSU2bPYGTCujJPZksj9qZ10uiSmSM97E11F /RWnzYh2D9fVpZQE7EkOsSWTPjhsOz40PCWzyg== Cc: Arnd Bergmann , David Airlie , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Dave Airlie , Edward O'Callaghan , Tony Cheng X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It seems impossible to build this driver without setting either CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function 'set_reg_field_value_ex': drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:132:2: error: implicit declaration of function 'ASSERT'; did you mean 'IS_ERR'? [-Werror=implicit-function-declaration] This moves the ASSERT() macro and related helpers outside of the #ifdef to get it to build again. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/os_types.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/os_types.h b/drivers/gpu/drm/amd/display/dc/os_types.h index 86170b40b5c5..499bd52004cf 100644 --- a/drivers/gpu/drm/amd/display/dc/os_types.h +++ b/drivers/gpu/drm/amd/display/dc/os_types.h @@ -61,8 +61,6 @@ * general debug capabilities * */ -#if defined(CONFIG_DEBUG_KERNEL) || defined(CONFIG_DEBUG_DRIVER) - #if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB) #define ASSERT_CRITICAL(expr) do { \ if (WARN_ON(!(expr))) { \ @@ -75,7 +73,7 @@ ; \ } \ } while (0) -#endif +#endif /* CONFIG_DEBUG_KERNEL || CONFIG_DEBUG_DRIVER */ #if defined(CONFIG_DEBUG_KERNEL_DC) #define ASSERT(expr) ASSERT_CRITICAL(expr) @@ -86,8 +84,6 @@ #define BREAK_TO_DEBUGGER() ASSERT(0) -#endif /* CONFIG_DEBUG_KERNEL || CONFIG_DEBUG_DRIVER */ - #define DC_ERR(...) do { \ dm_error(__VA_ARGS__); \ BREAK_TO_DEBUGGER(); \