All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Bartosz Golaszewski" <brgl@kernel.org>
Cc: "Maximilian Luz" <luzmaximilian@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, driver-core@lists.linux.dev,
	"Bartosz Golaszewski" <bartosz.golaszewski@oss.qualcomm.com>
Subject: Re: [PATCH v7 3/4] driver core: platform: unify release path
Date: Wed, 15 Jul 2026 17:19:52 +0200	[thread overview]
Message-ID: <DJZ8VG4H46XC.36XXT1A34B0TK@kernel.org> (raw)
In-Reply-To: <CAMRc=MeXwaRSDJYKeoM6PfqWqRPh9KCMF8HATFvaTWUf6N6GYA@mail.gmail.com>

On Wed Jul 15, 2026 at 5:06 PM CEST, Bartosz Golaszewski wrote:
> On Wed, 15 Jul 2026 15:52:07 +0200, Bartosz Golaszewski <brgl@kernel.org> said:
>> On Mon, 13 Jul 2026 20:45:13 +0200, Danilo Krummrich <dakr@kernel.org> said:
>>> On Mon Jul 13, 2026 at 5:11 PM CEST, Bartosz Golaszewski wrote:
>>>
>>> So, either we have to special case platform_device_set_of_node() too (for the
>>> case that a swnode is set already), or just require that the function must only
>>> be called when no node has been set, as all users already do; I'd go for the
>>> latter.
>>
>> This sounds good too and it should be easy to implement another test case while
>> at it.
>
> Oh but wouldn't that require us to introduce an integer return value for these
> functions? Or are you talking about simply updating the API contract?

Yes, we could update the API contract; we could also consider adding a WARN_ON()
for the case a node is already set.

> I think calling device_remove_software_node() on
> is_software_node(dev_fwnode(dev)) in platform_device_set_fwnode() be enough
> to handle that case, right?

Yes, we can special case it, but the "replace the existing node if any" part of
that function is already dead code.

So, if no one needs it now, I'd rather remove it and wait for someone to have a
valid use-case.

  reply	other threads:[~2026-07-15 15:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 15:11 [PATCH v7 0/4] driver core: unify the release path for dynamically allocated platform devices Bartosz Golaszewski
2026-07-13 15:11 ` [PATCH v7 1/4] platform/surface: gpe: use platform_device_register_full() Bartosz Golaszewski
2026-07-13 15:11 ` [PATCH v7 2/4] drm/xe/i2c: use device_create_managed_software_node() Bartosz Golaszewski
2026-07-13 15:37   ` Rodrigo Vivi
2026-07-14  9:40     ` Heikki Krogerus
2026-07-13 15:11 ` [PATCH v7 3/4] driver core: platform: unify release path Bartosz Golaszewski
2026-07-13 18:45   ` Danilo Krummrich
2026-07-15 13:52     ` Bartosz Golaszewski
2026-07-15 15:06       ` Bartosz Golaszewski
2026-07-15 15:19         ` Danilo Krummrich [this message]
2026-07-15 15:25           ` Bartosz Golaszewski
2026-07-15 15:54             ` Danilo Krummrich
2026-07-15 15:11       ` Danilo Krummrich
2026-07-13 15:12 ` [PATCH v7 4/4] driver core: platform: tests: add test cases for correct swnode removal Bartosz Golaszewski

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=DJZ8VG4H46XC.36XXT1A34B0TK@kernel.org \
    --to=dakr@kernel.org \
    --cc=airlied@gmail.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=matthew.brost@intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.