Skip to contentSkip to conversation

drm/syncobj: Include the <drm/drm_utils.h> header

PATCH In review Fabio Estevam 2 participants 2 messages May 27, 2019

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

PATCH 1/1 drm/syncobj: Include the <drm/drm_utils.h> header

The prototype for 'drm_timeout_abs_to_jiffies' is provided by the <drm/drm_utils.h> header.

Include this header to fix the following sparse warning:

drivers/gpu/drm/drm_syncobj.c:937:13: warning: symbol 'drm_timeout_abs_to_jiffies' was not declared. Should it be static?

---
 drivers/gpu/drm/drm_syncobj.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_syncobj.c +1 -0
index 3d400905100b..b06fa424bd44 100644
@@ -46,6 +46,7 @@
  * The file takes a reference on the kref.
  */
 
+#include <drm/drm_utils.h>
 #include <drm/drmP.h>
 #include <linux/file.h>
 #include <linux/fs.h>
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 8 lines · Fabio Estevam

The prototype for 'drm_timeout_abs_to_jiffies' is provided by the <drm/drm_utils.h> header.

Include this header to fix the following sparse warning:

drivers/gpu/drm/drm_syncobj.c:937:13: warning: symbol 'drm_timeout_abs_to_jiffies' was not declared. Should it be static?

Uh I think this isn't quite what we want. There's both a drm_utils.h and a drm_util.h and no drm_util.c and generally we try to match them all up.

I think drm_utils.h should disappear entirely, with drm_get_panel_orientation_quirk moved to drm_panel.h (that's at least how it's also grouped in the docs). And the drm_timeout_abs_to_jiffies helper moved to drm_util.h, with it's implementation moved to a new drm_util.c

Plus I guess including all that into the a new kerneldoc section.

Assuming your up for a notch more cleanup than just shutting up sparse?

Thanks, Daniel

Quoted 23 lines
---
 drivers/gpu/drm/drm_syncobj.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_syncobj.c +1 -0
index 3d400905100b..b06fa424bd44 100644
@@ -46,6 +46,7 @@
  * The file takes a reference on the kref.
  */
 
+#include <drm/drm_utils.h>
 #include <drm/drmP.h>
 #include <linux/file.h>
 #include <linux/fs.h>
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel