mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally
@ 2017-11-02 11:26 Arnd Bergmann
  2017-11-02 11:26 ` [PATCH 2/3] drm/amdgpu/display: remove unused REG_OFFSET macro Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2017-11-02 11:26 UTC (permalink / raw)
  To: Alex Deucher, Christian König
  Cc: Arnd Bergmann, David Airlie, Harry Wentland, Tony Cheng,
	Dave Airlie, Edward O'Callaghan, amd-gfx, dri-devel,
	linux-kernel

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 <arnd@arndb.de>
---
 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(); \
-- 
2.9.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-02 14:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 11:26 [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally Arnd Bergmann
2017-11-02 11:26 ` [PATCH 2/3] drm/amdgpu/display: remove unused REG_OFFSET macro Arnd Bergmann
2017-11-02 11:26 ` [PATCH 3/3] drm/amdgpu/display: fix integer arithmetic problem Arnd Bergmann
2017-11-02 14:02   ` Harry Wentland
2017-11-02 14:09 ` [PATCH 1/3] drm/amdgpu/display: provide ASSERT macros unconditionally Felix Kuehling
2017-11-02 14:20   ` Arnd Bergmann
2017-11-02 14:26     ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome