From: Maxwell Doose <m32285159@gmail.com>
To: Peter Rosin <peda@lysator.liu.se>
Cc: open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] mux: core: Replace manual put_device() with __free(put_device)
Date: Tue, 2 Jun 2026 15:49:30 -0500 [thread overview]
Message-ID: <20260602154930.30265351@linuxescape> (raw)
In-Reply-To: <abfc79b8-0bc5-4af3-b4cb-ff243b365f03@lysator.liu.se>
On Tue, 2 Jun 2026 22:37:06 +0200
Peter Rosin <peda@lysator.liu.se> wrote:
> On 2026-06-02 18:44, Maxwell Doose wrote:
> > The current code for returning on failure in mux_get() uses manual
> > put_device() calls. Refactor and replace them with a new variable for
> > the pointer to the underlying device and __free(put_device).
>
> I hinted at it in the reply to v1, and seeing it confirms it methinks.
> For me, __free() works well for RAII, but the pattern here isn't RAII.
> Acquisition happened before init and the scope of the variable isn't
> the lifetime either. It feels a bit clumsy. So, this patch is not a
> clear improvement and therefore not worth it. Sorry.
>
> Cheers,
> Peter
>
That's fair. Have a good night though!
--
best regards,
max
prev parent reply other threads:[~2026-06-02 20:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 16:44 [PATCH v3] mux: core: Replace manual put_device() with __free(put_device) Maxwell Doose
2026-06-02 16:51 ` Maxwell Doose
2026-06-02 20:37 ` Peter Rosin
2026-06-02 20:49 ` Maxwell Doose [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=20260602154930.30265351@linuxescape \
--to=m32285159@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@lysator.liu.se \
/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.