Thread (16 messages) flat view 16 messages, 4 authors, 2021-06-03

Re: [RFC 3/4] wwan: add interface creation support

From: Loic Poulain <hidden>
Date: 2021-06-02 06:43:34
Also in: linux-wireless

On Tue, 1 Jun 2021 at 12:35, Johannes Berg [off-list ref] wrote:
Hi,
quoted
quoted
+int wwan_register_ops(struct device *parent, const struct wwan_ops *ops,
+                     void *ctxt)
+{
+       struct wwan_dev_reg *reg;
+       int ret;
+
+       if (WARN_ON(!parent || !ops))
+               return -EINVAL;
+
+       mutex_lock(&wwan_mtx);
+       list_for_each_entry(reg, &wwan_devs, list) {
+               if (WARN_ON(reg->dev == parent)) {
+                       ret = -EBUSY;
+                       goto out;
+               }
+       }
Thanks for this, overall it looks good to me, but just checking why
you're not using the wwan_dev internally to create-or-pick wwan_dev
(wwan_dev_create) and register ops to it, instead of having a global
new wwan_devs list.
Uh, no good reason. I just missed that all that infrastructure is
already there, oops.
OK no prob ;-), are you going to resubmit something or do you want I
take care of this?

Regards,
Loic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help