lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025020423-mahogany-skewed-9588@gregkh>
Date: Tue, 4 Feb 2025 11:14:11 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
	Danilo Krummrich <dakr@...nel.org>, Lyude Paul <lyude@...hat.com>,
	Alexander Lobakin <aleksander.lobakin@...el.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Liam Girdwood <lgirdwood@...il.com>, Lukas Wunner <lukas@...ner.de>,
	Mark Brown <broonie@...nel.org>,
	MaĆ­ra Canal <mairacanal@...eup.net>,
	Robin Murphy <robin.murphy@....com>,
	Simona Vetter <simona.vetter@...ll.ch>,
	Zijun Hu <quic_zijuhu@...cinc.com>, linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 1/3] driver core: add a faux bus for use when a simple
 device/bus is needed

On Tue, Feb 04, 2025 at 09:25:32AM +0000, Jonathan Cameron wrote:
> On Mon,  3 Feb 2025 15:25:17 +0100
> Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:
> 
> > Many drivers abuse the platform driver/bus system as it provides a
> > simple way to create and bind a device to a driver-specific set of
> > probe/release functions.  Instead of doing that, and wasting all of the
> > memory associated with a platform device, here is a "faux" bus that
> > can be used instead.
> > 
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> Nice. One trivial thing inline.
> 
> 
> > diff --git a/drivers/base/faux.c b/drivers/base/faux.c
> > new file mode 100644
> > index 000000000000..0eba89a5cd57
> > --- /dev/null
> > +++ b/drivers/base/faux.c
> > @@ -0,0 +1,189 @@
> 
> 
> > +int __init faux_bus_init(void)
> > +{
> > +	int error;
> > +
> > +	error = device_register(&faux_bus_root);
> > +	if (error) {
> > +		put_device(&faux_bus_root);
> > +		return error;
> > +	}
> > +
> > +	error =  bus_register(&faux_bus_type);
> 
> Odd bonus space after = 

Thanks!  I caught that when I just rewrote this function, and I finally
got around to running checkpatch which found another error in it that I
missed.  It's sometimes easier to notice changes in other's code than
your own :)

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ