netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: linux-wireless@vger.kernel.org,
	Network Development <netdev@vger.kernel.org>,
	M Chetan Kumar <m.chetan.kumar@intel.com>
Subject: Re: [RFC 3/4] wwan: add interface creation support
Date: Tue, 01 Jun 2021 12:35:09 +0200	[thread overview]
Message-ID: <0555025c6d7a88f4f3dcdd6704612ed8ba33b175.camel@sipsolutions.net> (raw)
In-Reply-To: <CAMZdPi-ZaH8WWKfhfKzy0OKpUtNAiCUfekh9R1de5awFP-ed=A@mail.gmail.com> (sfid-20210601_112832_203691_AAB7DA4E)

Hi,

> > +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.

johannes



  reply	other threads:[~2021-06-01 10:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  8:05 [RFC 0/4] wwan framework netdev creation Johannes Berg
2021-06-01  8:05 ` [RFC 1/4] iosm: fix stats and RCU bugs in RX Johannes Berg
2021-06-01  8:05 ` [RFC 2/4] rtnetlink: add alloc() method to rtnl_link_ops Johannes Berg
2021-06-01  8:05 ` [RFC 3/4] wwan: add interface creation support Johannes Berg
2021-06-01  9:37   ` Loic Poulain
2021-06-01 10:35     ` Johannes Berg [this message]
2021-06-02  6:52       ` Loic Poulain
2021-06-02  8:29         ` Johannes Berg
2021-06-03  7:00           ` Loic Poulain
2021-06-03  7:02             ` Kumar, M Chetan
2021-06-02  1:42   ` Sergey Ryazanov
2021-06-02  7:38     ` Johannes Berg
2021-06-02 12:45       ` Sergey Ryazanov
2021-06-02 12:56         ` Johannes Berg
2021-06-02 15:38           ` Sergey Ryazanov
2021-06-01  8:05 ` [RFC 4/4] iosm: convert to generic wwan ops Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0555025c6d7a88f4f3dcdd6704612ed8ba33b175.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=m.chetan.kumar@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).