Thread (111 messages) 111 messages, 9 authors, 2023-03-02

Re: [PATCH v10 08/26] gunyah: rsc_mgr: Add resource manager RPC core

From: Srinivas Kandagatla <hidden>
Date: 2023-02-23 10:29:31
Also in: linux-arm-msm, linux-devicetree, linux-doc, lkml


On 22/02/2023 23:18, Elliot Berman wrote:
quoted
quoted
+EXPORT_SYMBOL_GPL(gh_rm_notifier_unregister);
+
+void get_gh_rm(struct gh_rm *rm)
+{
+    get_device(rm->dev);
+}
+EXPORT_SYMBOL_GPL(get_gh_rm);
Can we have some consistency in the exported symbol naming,
we have two combinations now.

EXPORT_SYMBOL_GPL(gh_rm_notifier_register);
EXPORT_SYMBOL_GPL(get_gh_rm);

lets stick to one.
done.
quoted
quoted
+
+void put_gh_rm(struct gh_rm *rm)
+{
+    put_device(rm->dev);
+}
+EXPORT_SYMBOL_GPL(put_gh_rm);
...
quoted
+
+static int gh_rm_drv_probe(struct platform_device *pdev)
+{
+    struct gh_msgq_tx_data *msg;
+    struct gh_rm *rm;
+    int ret;
+
How are we ensuring that gunyah driver is probed before this driver?
Which driver?
Am referring to gunyah.ko

TBH, gunyah.c should be merged as part of resource manager, and check if 
uuids and features in probe before proceeding further.


-srini
quoted
quoted
+    rm = devm_kzalloc(&pdev->dev, sizeof(*rm), GFP_KERNEL);
+    if (!rm)
+        return -ENOMEM;
+
+    platform_set_drvdata(pdev, rm);
+    rm->dev = &pdev->dev;
+
+    mutex_init(&rm->call_idr_lock);
+    idr_init(&rm->call_idr);
+    rm->cache = kmem_cache_create("gh_rm", struct_size(msg, data, 
GH_MSGQ_MAX_MSG_SIZE), 0,
+        SLAB_HWCACHE_ALIGN, NULL);
+    if (!rm->cache)
+        return -ENOMEM;
new line here would be nice.
done.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help