Skip to contentSkip to conversation

drm: mark drm_of_component_match_add dummy inline

PATCH Applied Arnd Bergmann 2 participants 2 messages Oct 26, 2016

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

PATCH 1/1 drm: mark drm_of_component_match_add dummy inline

The newly added drm_of_component_match_add helper is defined as 'static' in a header when CONFIG_OF is disabled, causing a warning each time the header is included:

In file included from /git/arm-soc/drivers/gpu/drm/bridge/dw-hdmi.c:23:0:
include/drm/drm_of.h:33:13: error: 'drm_of_component_match_add' defined but not used [-Werror=unused-function]

This marks it 'inline' like the other such helpers in this file.

Fixes 97ac0e47aed5 ("drm: convert DT component matching to component_match_add_release()")
---
 include/drm/drm_of.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
include/drm/drm_of.h +5 -4
index d6b4c5587bbe..26a64805cc15 100644
@@ -30,10 +30,11 @@ static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
 	return 0;
 }
 
-static void drm_of_component_match_add(struct device *master,
-				       struct component_match **matchptr,
-				       int (*compare)(struct device *, void *),
-				       struct device_node *node)
+static inline void
+drm_of_component_match_add(struct device *master,
+			   struct component_match **matchptr,
+			   int (*compare)(struct device *, void *),
+			   struct device_node *node)
 {
 }
 
Signature · 6 lines
2.9.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Applied
#1 lore raw
Quoted 11 lines · Arnd Bergmann

The newly added drm_of_component_match_add helper is defined as 'static' in a header when CONFIG_OF is disabled, causing a warning each time the header is included:

In file included from /git/arm-soc/drivers/gpu/drm/bridge/dw-hdmi.c:23:0:
include/drm/drm_of.h:33:13: error: 'drm_of_component_match_add' defined but not used [-Werror=unused-function]

This marks it 'inline' like the other such helpers in this file.

Fixes 97ac0e47aed5 ("drm: convert DT component matching to component_match_add_release()")

Applied to drm-misc, thanks

Sean

Quoted 27 lines
---
 include/drm/drm_of.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
include/drm/drm_of.h +5 -5
index d6b4c5587bbe..26a64805cc15 100644
@@ -30,10 +30,11 @@ static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
        return 0;
 }
 
-static void drm_of_component_match_add(struct device *master,
-                                      struct component_match **matchptr,
-                                      int (*compare)(struct device *, void *),
-                                      struct device_node *node)
+static inline void
+drm_of_component_match_add(struct device *master,
+                          struct component_match **matchptr,
+                          int (*compare)(struct device *, void *),
+                          struct device_node *node)
 {
 }
 
--

2.9.0