Skip to contentSkip to conversation

drm/amdgpu/display: provide ASSERT macros unconditionally

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 2, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/amdgpu/display: provide ASSERT macros unconditionally

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.

---
 drivers/gpu/drm/amd/display/dc/os_types.h | 4 ----
 1 file changed, 4 deletions(-)

v2: remove accidtental comment change.

drivers/gpu/drm/amd/display/dc/os_types.h +0 -4
index 86170b40b5c5..a87c0329541f 100644
@@ -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))) { \
@@ -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(); \
Signature · 1 line
2.9.0
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Arnd Bergmann

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.

Harry

Quoted 21 lines
---
 drivers/gpu/drm/amd/display/dc/os_types.h | 4 ----
 1 file changed, 4 deletions(-)

v2: remove accidtental comment change.

drivers/gpu/drm/amd/display/dc/os_types.h +0 -2
index 86170b40b5c5..a87c0329541f 100644
@@ -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))) { \

drivers/gpu/drm/amd/display/dc/os_types.h line 89

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/os_types.h +0 -2
@@ -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(); \

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel