Skip to contentSkip to conversation

drm: Make syncobj import/export functions static

PATCH In review [email protected] 3 participants 10 messages Sep 1, 2017 – Oct 13, 2017

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

PATCH 1/4 drm: Make syncobj import/export functions static

From: Ville Syrjälä <[email protected]>

Fix the following sparse warnings by making functions static:
drm_syncobj.c:420:5: warning: symbol 'drm_syncobj_import_sync_file_fence' was not declared. Should it be static? drm_syncobj.c:441:5: warning: symbol 'drm_syncobj_export_sync_file' was not declared. Should it be static?

Cc Dave Airlie <[email protected]>
Fixes 3ee45a3b533a ("drm/syncobj: add sync_file interaction. (v1.2)")
---
 drivers/gpu/drm/drm_syncobj.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_syncobj.c +4 -4
index 0422b8c2c2e7..26d60615b4d4 100644
@@ -417,8 +417,8 @@ static int drm_syncobj_fd_to_handle(struct drm_file *file_private,
 	return 0;
 }
 
-int drm_syncobj_import_sync_file_fence(struct drm_file *file_private,
-				       int fd, int handle)
+static int drm_syncobj_import_sync_file_fence(struct drm_file *file_private,
+					      int fd, int handle)
 {
 	struct dma_fence *fence = sync_file_get_fence(fd);
 	struct drm_syncobj *syncobj;
@@ -438,8 +438,8 @@ int drm_syncobj_import_sync_file_fence(struct drm_file *file_private,
 	return 0;
 }
 
-int drm_syncobj_export_sync_file(struct drm_file *file_private,
-				 int handle, int *p_fd)
+static int drm_syncobj_export_sync_file(struct drm_file *file_private,
+					int handle, int *p_fd)
 {
 	int ret;
 	struct dma_fence *fence;
Signature · 6 lines
2.13.5

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

PATCH 2/4 drm: Add missing __user annotation to drm_syncobj_array_find()

From: Ville Syrjälä <[email protected]>

'user_handles' needs a __user annotation for fix the following sparse warning:
drm_syncobj.c:813:37: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:813:37: expected void const [noderef] <asn:1>*from
drm_syncobj.c:813:37: got void *user_handles
drm_syncobj.c:875:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:875:38: expected void *user_handles
drm_syncobj.c:875:38: got void [noderef] <asn:1>*<noident>
drm_syncobj.c:908:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:908:38: expected void *user_handles
drm_syncobj.c:908:38: got void [noderef] <asn:1>*<noident>
drm_syncobj.c:941:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:941:38: expected void *user_handles
drm_syncobj.c:941:38: got void [noderef] <asn:1>*<noident>

Cc Jason Ekstrand <[email protected]>
Fixes 3e6fb72d6cef ("drm/syncobj: Add a syncobj_array_find helper")
---
 drivers/gpu/drm/drm_syncobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_syncobj.c +1 -1
index 26d60615b4d4..fa03a1a51453 100644
@@ -799,7 +799,7 @@ static int drm_syncobj_array_wait(struct drm_device *dev,
 }
 
 static int drm_syncobj_array_find(struct drm_file *file_private,
-				  void *user_handles, uint32_t count_handles,
+				  void __user *user_handles, uint32_t count_handles,
 				  struct drm_syncobj ***syncobjs_out)
 {
 	uint32_t i, *handles;
Signature · 6 lines
2.13.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 2/4
#2 lore raw

Re: [PATCH 2/4] drm: Add missing __user annotation to drm_syncobj_array_find()

Quoted 17 lines · On Fri, Sep 01, 2017 at 07:53:26PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

'user_handles' needs a __user annotation for fix the following sparse warning:
drm_syncobj.c:813:37: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:813:37: expected void const [noderef] <asn:1>*from
drm_syncobj.c:813:37: got void *user_handles
drm_syncobj.c:875:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:875:38: expected void *user_handles
drm_syncobj.c:875:38: got void [noderef] <asn:1>*<noident>
drm_syncobj.c:908:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:908:38: expected void *user_handles
drm_syncobj.c:908:38: got void [noderef] <asn:1>*<noident>
drm_syncobj.c:941:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:941:38: expected void *user_handles
drm_syncobj.c:941:38: got void [noderef] <asn:1>*<noident>

Quoted 6 lines
Cc Jason Ekstrand <[email protected]>
Fixes 3e6fb72d6cef ("drm/syncobj: Add a syncobj_array_find helper")
---
 drivers/gpu/drm/drm_syncobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

#3 lore raw

Re: [PATCH 2/4] drm: Add missing __user annotation to drm_syncobj_array_find()

Quoted 18 lines · Thierry Reding
Quoted 17 lines · On Fri, Sep 01, 2017 at 07:53:26PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

'user_handles' needs a __user annotation for fix the following sparse warning:
drm_syncobj.c:813:37: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:813:37: expected void const [noderef] <asn:1>*from
drm_syncobj.c:813:37: got void *user_handles
drm_syncobj.c:875:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:875:38: expected void *user_handles
drm_syncobj.c:875:38: got void [noderef] <asn:1>*<noident>
drm_syncobj.c:908:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:908:38: expected void *user_handles
drm_syncobj.c:908:38: got void [noderef] <asn:1>*<noident>
drm_syncobj.c:941:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:941:38: expected void *user_handles
drm_syncobj.c:941:38: got void [noderef] <asn:1>*<noident>

Quoted 8 lines
Quoted 6 lines
Cc Jason Ekstrand <[email protected]>
Fixes 3e6fb72d6cef ("drm/syncobj: Add a syncobj_array_find helper")
---
 drivers/gpu/drm/drm_syncobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Pushed the remainder of this series to drm-misc-next. Thanks for the review.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH 3/4 drm: Drop drm_get_link_status_name()

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

drm_get_link_status_name() isn't used so kill it.

Fixes the following sparse warning:
drm_connector.c:618:1: warning: symbol 'drm_get_link_status_name' was not declared. Should it be static?

Cc Manasi Navare <[email protected]>
Fixes 40ee6fbef75f ("drm: Add a new connector atomic property for link status")
---
 drivers/gpu/drm/drm_connector.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/drm_connector.c +0 -1
index ba9f36cef68c..bb2e60f5feb6 100644
@@ -615,7 +615,6 @@ static const struct drm_prop_enum_list drm_link_status_enum_list[] = {
 	{ DRM_MODE_LINK_STATUS_GOOD, "Good" },
 	{ DRM_MODE_LINK_STATUS_BAD, "Bad" },
 };
-DRM_ENUM_NAME_FN(drm_get_link_status_name, drm_link_status_enum_list)
 
 /**
  * drm_display_info_set_bus_formats - set the supported bus formats
Signature · 6 lines
2.13.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 3/4
#5 lore raw

Re: [PATCH 3/4] drm: Drop drm_get_link_status_name()

Quoted 7 lines · On Fri, Sep 01, 2017 at 07:53:27PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

drm_get_link_status_name() isn't used so kill it.

Fixes the following sparse warning:
drm_connector.c:618:1: warning: symbol 'drm_get_link_status_name' was not declared. Should it be static?

Quoted 6 lines
Cc Manasi Navare <[email protected]>
Fixes 40ee6fbef75f ("drm: Add a new connector atomic property for link status")
---
 drivers/gpu/drm/drm_connector.c | 1 -
 1 file changed, 1 deletion(-)

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

Reviewed-by on v1 3/4
#6 lore raw

Re: [PATCH 3/4] drm: Drop drm_get_link_status_name()

In reply to [email protected]
Quoted 7 lines · On Fri, Sep 01, 2017 at 07:53:27PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

drm_get_link_status_name() isn't used so kill it.

Fixes the following sparse warning:
drm_connector.c:618:1: warning: symbol 'drm_get_link_status_name' was not declared. Should it be static?

Thanks for catching this warning.
Verified that this fixes the warning and hence drm_get_link_status_name not needed.

Manasi

Quoted 26 lines
Cc Manasi Navare <[email protected]>
Fixes 40ee6fbef75f ("drm: Add a new connector atomic property for link status")
---
 drivers/gpu/drm/drm_connector.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/drm_connector.c +0 -1
index ba9f36cef68c..bb2e60f5feb6 100644
@@ -615,7 +615,6 @@ static const struct drm_prop_enum_list drm_link_status_enum_list[] = {
 	{ DRM_MODE_LINK_STATUS_GOOD, "Good" },
 	{ DRM_MODE_LINK_STATUS_BAD, "Bad" },
 };
-DRM_ENUM_NAME_FN(drm_get_link_status_name, drm_link_status_enum_list)
 
 /**
  * drm_display_info_set_bus_formats - set the supported bus formats
Signature · 6 lines
2.13.5

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

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

#7 lore raw

PATCH 4/4 drm: Make __drm_object_property_get_value() static

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

Make __drm_object_property_get_value() static to fix the following
sparse warning:
drm_mode_object.c:250:5: warning: symbol '__drm_object_property_get_value' was not declared. Should it be static?

Cc Daniel Vetter <[email protected]>
Fixes 4a97a3da420b ("drm: Don't update property values for atomic drivers")
---
 drivers/gpu/drm/drm_mode_object.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_mode_object.c +3 -2
index 1055533792f3..7a1ea91d3343 100644
@@ -247,8 +247,9 @@ int drm_object_property_set_value(struct drm_mode_object *obj,
 }
 EXPORT_SYMBOL(drm_object_property_set_value);
 
-int __drm_object_property_get_value(struct drm_mode_object *obj,
-				  struct drm_property *property, uint64_t *val)
+static int __drm_object_property_get_value(struct drm_mode_object *obj,
+					   struct drm_property *property,
+					   uint64_t *val)
 {
 	int i;
 
Signature · 6 lines
2.13.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 4/4
#8 lore raw

Re: [PATCH 4/4] drm: Make __drm_object_property_get_value() static

Quoted 6 lines · On Fri, Sep 01, 2017 at 07:53:28PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Make __drm_object_property_get_value() static to fix the following
sparse warning:
drm_mode_object.c:250:5: warning: symbol '__drm_object_property_get_value' was not declared. Should it be static?

Quoted 6 lines
Cc Daniel Vetter <[email protected]>
Fixes 4a97a3da420b ("drm: Don't update property values for atomic drivers")
---
 drivers/gpu/drm/drm_mode_object.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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

Reviewed-by on v1 1/4
#9 lore raw
In reply to [email protected]
Quoted 6 lines · On Fri, Sep 01, 2017 at 07:53:25PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Fix the following sparse warnings by making functions static:
drm_syncobj.c:420:5: warning: symbol 'drm_syncobj_import_sync_file_fence' was not declared. Should it be static? drm_syncobj.c:441:5: warning: symbol 'drm_syncobj_export_sync_file' was not declared. Should it be static?

Quoted 6 lines
Cc Dave Airlie <[email protected]>
Fixes 3ee45a3b533a ("drm/syncobj: add sync_file interaction. (v1.2)")
---
 drivers/gpu/drm/drm_syncobj.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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