public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: William Breathitt Gray <wbg@kernel.org>
Cc: Danilo Krummrich <dakr@kernel.org>,
	Johan Hovold <johan@kernel.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	driver-core@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] isa: switch to dynamic root device
Date: Mon, 4 May 2026 08:52:05 +0200	[thread overview]
Message-ID: <2026050442-pleat-implant-e08b@gregkh> (raw)
In-Reply-To: <20260504063518.515620-1-wbg@kernel.org>

On Mon, May 04, 2026 at 03:35:17PM +0900, William Breathitt Gray wrote:
> On Sun, May 03, 2026 at 05:50:17PM +0200, Danilo Krummrich wrote:
> > On Sun May 3, 2026 at 7:08 AM CEST, William Breathitt Gray wrote:
> > > Would you resend with a Fixes tag
> > 
> > Devices should generally be allocated dynamically for various reasons (e.g. I
> > recently had a case where adding a dynamic lock class key to struct device for
> > debugging purposes caused warnings for all the static devices).
> > 
> > While it clearly should be improved, I don't think this causes a bug in the ISA
> > code -- there is no "real" leak as the device is static anyway and there's no
> > spurious WARN() as release() is never hit, since ISA is always built-in.
> > 
> > I'd assume this is why Johan did not add it in the first place.
> > 
> > That said, if you mean to add a Fixes: tag anyway to indicate the technically
> > wrong usage pattern of struct device, that seems reasonable to me.
> 
> Okay that makes sense, this is improvement of the code rather than a
> true bug fix, so we don't need a Fixes tag.
> 
> Johan, I do have another request. Would you refactor the changes in
> isa_bus_init() to avoid the nested blocks? For example:
> 
> 	error = bus_register(&isa_bus_type);
> 	if (error)
> 		return error;
> 
> 	isa_bus = root_device_register("isa");
> 	if (IS_ERR(isa_bus)) {
> 		bus_unregister(&isa_bus_type);
> 		return PTR_ERR(isa_bus);
> 	}
> 
> 	return 0;
> 
> I believe that makes the logic easier to understand when reading the
> code here.

Nah, for now, it's fine, if you wish to touch this isa code in the
future to "clean it up", that's great, but it should be done in a
separate change.

thanks,

greg k-h

  reply	other threads:[~2026-05-04  6:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 10:24 [PATCH] isa: switch to dynamic root device Johan Hovold
2026-05-03  5:08 ` William Breathitt Gray
2026-05-03 15:50   ` Danilo Krummrich
2026-05-04  6:35     ` William Breathitt Gray
2026-05-04  6:52       ` Greg Kroah-Hartman [this message]
2026-05-04  7:05         ` William Breathitt Gray
2026-05-04 20:32 ` Danilo Krummrich

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=2026050442-pleat-implant-e08b@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=wbg@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