Skip to contentSkip to conversation

drm/drm_file.c: Define drm_send_event_helper() as 'static'

PATCH Superseded Fabio M. De Francesco 2 participants 2 messages Apr 22, 2021 – Apr 26, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/drm_file.c: Define drm_send_event_helper() as 'static'

drm_send_event_helper() has not prototype, it has internal linkage and therefore it should be defined with storage class 'static'.

---
 drivers/gpu/drm/drm_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_file.c +1 -1
index 7efbccffc2ea..17f38d873972 100644
@@ -786,7 +786,7 @@ EXPORT_SYMBOL(drm_event_cancel_free);
  * The timestamp variant of dma_fence_signal is used when the caller
  * sends a valid timestamp.
  */
-void drm_send_event_helper(struct drm_device *dev,
+static void drm_send_event_helper(struct drm_device *dev,
 			   struct drm_pending_event *e, ktime_t timestamp)
 {
 	assert_spin_locked(&dev->event_lock);
Signature · 1 line
2.31.1
#1 lore raw
Quoted 13 lines · Fabio M. De Francesco

drm_send_event_helper() has not prototype, it has internal linkage and therefore it should be defined with storage class 'static'.

---
 drivers/gpu/drm/drm_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_file.c +0 -0
index 7efbccffc2ea..17f38d873972 100644

drivers/gpu/drm/drm_file.c EXPORT_SYMBOL(drm_event_cancel_free); · line 788

Quoted 3 lines
drivers/gpu/drm/drm_file.c +0 -0
@@ -786,7 +786,7 @@ EXPORT_SYMBOL(drm_event_cancel_free);
  * The timestamp variant of dma_fence_signal is used when the caller
  * sends a valid timestamp.
  */

Right above is the kerneldoc comment for documented the driver api that teh subsystem exposes. Generally we remove those when there's nothing interesting in there when making a function static, which is the case here. Can you pls do that too in v2?

Thanks, Daniel

Quoted 8 lines
drivers/gpu/drm/drm_file.c +1 -1
-void drm_send_event_helper(struct drm_device *dev,
+static void drm_send_event_helper(struct drm_device *dev,
 			   struct drm_pending_event *e, ktime_t timestamp)
 {
 	assert_spin_locked(&dev->event_lock);
Signature · 1 line
2.31.1
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch