Linux wireless drivers development
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v5] wifi: cfg80211: move away from using a fake platform device
Date: Tue, 1 Jul 2025 14:38:27 +0200	[thread overview]
Message-ID: <2025070125-spent-glowworm-7405@gregkh> (raw)
In-Reply-To: <0004f9e5eb62f9ccad3dec52ebc935bfec42c949.camel@sipsolutions.net>

On Tue, Jul 01, 2025 at 01:06:46PM +0200, Johannes Berg wrote:
> On Tue, 2025-07-01 at 12:56 +0200, Greg Kroah-Hartman wrote:
> > Downloading regulatory "firmware" needs a device to hang off of, and so
> > a platform device seemed like the simplest way to do this.  Now that we
> > have a faux device interface, use that instead as this "regulatory
> > device" is not anything resembling a platform device at all.
> > 
> > Cc: Johannes Berg <johannes@sipsolutions.net>
> > Cc: <linux-wireless@vger.kernel.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> > v5: - rebase against 6.16-rc4 and actually cc: the relevant maintainers
> >       and mailing lists this time, doh!
> 
> I did wonder for a second why it's v5 and I never saw it ;-)
> 
> >  int __init regulatory_init(void)
> >  {
> > -	reg_pdev = platform_device_register_simple("regulatory", 0, NULL, 0);
> > -	if (IS_ERR(reg_pdev))
> > -		return PTR_ERR(reg_pdev);
> > +	reg_fdev = faux_device_create("regulatory", NULL, NULL);
> > +	if (!reg_fdev)
> > +		return -ENODEV;
> 
> Is that really -ENODEV rather than say -ENOMEM? Having a hard time
> imagining how a faux device creation would end up failing in any other
> case, there's no underlying device to bind to, after all? :)

There are some low-level functions that could fail, but the error that
I thought should be told to init would be "no device" as the device was
not created which is what really matters :)

> Anyway, that's not really all that relevant. I assume you want me to
> merge it through wireless-next, since we have faux.h in the tree now?

Please do, thanks!

greg k-h

      reply	other threads:[~2025-07-01 12:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 10:56 [PATCH v5] wifi: cfg80211: move away from using a fake platform device Greg Kroah-Hartman
2025-07-01 11:06 ` Johannes Berg
2025-07-01 12:38   ` Greg Kroah-Hartman [this message]

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=2025070125-spent-glowworm-7405@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@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