Thread (29 messages) 29 messages, 6 authors, 2017-12-14

Re: [PATCH V6 3/7] device property: Introduce a common API to fetch device match data

From: Sakari Ailus <sakari.ailus@iki.fi>
Date: 2017-12-07 22:06:49
Also in: linux-acpi, linux-arm-kernel, linux-arm-msm, lkml

On Thu, Dec 07, 2017 at 03:17:52PM -0500, Sinan Kaya wrote:
On 12/7/2017 7:40 AM, Sakari Ailus wrote:
quoted
On Tue, Dec 05, 2017 at 12:04:48PM -0500, Sinan Kaya wrote:
quoted
@@ -101,6 +103,8 @@ struct fwnode_operations {
 	(*graph_get_port_parent)(struct fwnode_handle *fwnode);
 	int (*graph_parse_endpoint)(const struct fwnode_handle *fwnode,
 				    struct fwnode_endpoint *endpoint);
+	void *(*get_match_data)(const struct fwnode_handle *fwnode,
+				struct device *dev);
You can make dev const, too.
done, I couldn't change device_get_match_data() parameter const due to
dev_fwnode() function.

                 from /local/mnt/workspace/projects/caf/kernel/drivers/base/property.c:13:

/local/mnt/workspace/projects/caf/kernel/drivers/base/property.c:1341:39: warning: passing argument 1 of 'dev_fwnode' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  return fwnode_call_ptr_op(dev_fwnode(dev), device_get_match_data,
Right. Makes sense.

I guess it's not perhaps worth it introducing dev_fwnode_const just for
this. devices are seldom if ever const anyway.

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help