Skip to contentSkip to conversation

drm/panic: Add missing static inline to drm_panic_is_enabled()

PATCH Superseded Jocelyn Falempe 2 participants 5 messages Jul 19, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panic: Add missing static inline to drm_panic_is_enabled()

This breaks build if DRM_PANIC is not enabled.

Fixes de338c754d40 ("drm/panic: Add missing static inline to drm_panic_is_enabled()")
---
 drivers/gpu/drm/drm_crtc_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc_internal.h +1 -1
index c10de39cbe83..bbac5350774e 100644
@@ -321,7 +321,7 @@ drm_edid_load_firmware(struct drm_connector *connector)
 #ifdef CONFIG_DRM_PANIC
 bool drm_panic_is_enabled(struct drm_device *dev);
 #else
-bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
+static inline bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
 #endif
 
 #endif /* __DRM_CRTC_INTERNAL_H__ */
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jocelyn Falempe

This breaks build if DRM_PANIC is not enabled.

Fixes de338c754d40 ("drm/panic: Add missing static inline to drm_panic_is_enabled()")

Thanks for the quick fix:

Quoted 20 lines
---
 drivers/gpu/drm/drm_crtc_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc_internal.h +1 -1
index c10de39cbe83..bbac5350774e 100644
@@ -321,7 +321,7 @@ drm_edid_load_firmware(struct drm_connector *connector)
 #ifdef CONFIG_DRM_PANIC
 bool drm_panic_is_enabled(struct drm_device *dev);
 #else
-bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
+static inline bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
 #endif
 
 #endif /* __DRM_CRTC_INTERNAL_H__ */
Signature · 1 line
2.45.2
#2 lore raw
Quoted 4 lines · Imre Deak
Quoted 3 lines · Jocelyn Falempe

This breaks build if DRM_PANIC is not enabled.

Fixes de338c754d40 ("drm/panic: Add missing static inline to drm_panic_is_enabled()")

The fix is actually for 9f774c42a908 ("drm/panic: Add drm_panic_is_enabled()")

Quoted 25 lines
Quoted 1 line

Thanks for the quick fix:

Quoted 20 lines
---
 drivers/gpu/drm/drm_crtc_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc_internal.h +1 -1
index c10de39cbe83..bbac5350774e 100644
@@ -321,7 +321,7 @@ drm_edid_load_firmware(struct drm_connector *connector)
 #ifdef CONFIG_DRM_PANIC
 bool drm_panic_is_enabled(struct drm_device *dev);
 #else
-bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
+static inline bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
 #endif
 
 #endif /* __DRM_CRTC_INTERNAL_H__ */
Signature · 1 line
2.45.2
#3 lore raw
Quoted 7 lines · Imre Deak
Quoted 4 lines · Imre Deak
Quoted 3 lines · Jocelyn Falempe

This breaks build if DRM_PANIC is not enabled.

Fixes de338c754d40 ("drm/panic: Add missing static inline to drm_panic_is_enabled()")

The fix is actually for 9f774c42a908 ("drm/panic: Add drm_panic_is_enabled()")

A related issue, DRM_CONFIG_PANIC=y is also borked for me:

CC [M] drivers/gpu/drm/drm_panic.o
drivers/gpu/drm/drm_panic.c:712:6: error: no previous prototype for ‘drm_panic_is_enabled’ [-Werror=missing-prototypes]
712 | bool drm_panic_is_enabled(struct drm_device *dev)

      |      ^~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors

Quoted 25 lines
Quoted 25 lines
Quoted 1 line

Thanks for the quick fix:

Quoted 20 lines
---
 drivers/gpu/drm/drm_crtc_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc_internal.h +1 -1
index c10de39cbe83..bbac5350774e 100644
@@ -321,7 +321,7 @@ drm_edid_load_firmware(struct drm_connector *connector)
 #ifdef CONFIG_DRM_PANIC
 bool drm_panic_is_enabled(struct drm_device *dev);
 #else
-bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
+static inline bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
 #endif
 
 #endif /* __DRM_CRTC_INTERNAL_H__ */
Signature · 1 line
2.45.2
#4 lore raw
Quoted 8 lines · Imre Deak
Quoted 7 lines · Imre Deak
Quoted 4 lines · Imre Deak
Quoted 3 lines · Jocelyn Falempe

This breaks build if DRM_PANIC is not enabled.

Fixes de338c754d40 ("drm/panic: Add missing static inline to drm_panic_is_enabled()")

The fix is actually for 9f774c42a908 ("drm/panic: Add drm_panic_is_enabled()")

Yes, picked up the wrong sha1.

Quoted 9 lines

A related issue, DRM_CONFIG_PANIC=y is also borked for me:

CC [M] drivers/gpu/drm/drm_panic.o
drivers/gpu/drm/drm_panic.c:712:6: error: no previous prototype for ‘drm_panic_is_enabled’ [-Werror=missing-prototypes]
712 | bool drm_panic_is_enabled(struct drm_device *dev)

       |      ^~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors

ok it's missing the #include "drm_crtc_internal.h" in drm_panic.c. how did I missed that :(
let me send a v2.

Signature · 1 line
Jocelyn
Quoted 26 lines
Quoted 25 lines
Quoted 25 lines
Quoted 1 line

Thanks for the quick fix:

Quoted 20 lines
---
  drivers/gpu/drm/drm_crtc_internal.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc_internal.h +1 -1
index c10de39cbe83..bbac5350774e 100644
@@ -321,7 +321,7 @@ drm_edid_load_firmware(struct drm_connector *connector)
  #ifdef CONFIG_DRM_PANIC
  bool drm_panic_is_enabled(struct drm_device *dev);
  #else
-bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
+static inline bool drm_panic_is_enabled(struct drm_device *dev) {return false; }
  #endif
 
  #endif /* __DRM_CRTC_INTERNAL_H__ */
Signature · 1 line
2.45.2