From: "Rafael Passos" <rafael@rcpassos.me>
To: "David Rheinsberg" <david@readahead.eu>,
"Rafael Passos" <rafael@rcpassos.me>,
"Benjamin Tissoires" <bentiss@kernel.org>,
"Jiri Kosina" <jikos@kernel.org>
Cc: "Shuah Khan" <skhan@linuxfoundation.org>,
"Brigham Campbell" <me@brighamcampbell.com>,
"Jori Koolstra" <jkoolstra@xs4all.nl>,
<linux-input@vger.kernel.org>
Subject: Re: [PATCH v4 4/4] HID: wiimote: wiimote_probe with scoped cleanup
Date: Sun, 04 Oct 2026 12:03:46 -0300 [thread overview]
Message-ID: <DLW5992OONY6.69AKQBHWGQ01@rcpassos.me> (raw)
In-Reply-To: <efe87355-ad73-401b-b236-18eb9e398498@app.fastmail.com>
Hi David,
On Sun Sep 20, 2026 at 5:21 AM -03, David Rheinsberg wrote:
> Hi
>
> On Mon, Aug 17, 2026, at 11:38 PM, Rafael Passos wrote:
>> Use the safer scoped cleanup with a single destroy function.
>> A new bitmask was introduced to track probing state.
>> This is needed because the hid_hw calls cannot be made with null.
>>
>> A few other functions are safe to call without checking.
>> These cases are annotated with comments above them.
>>
>> Also, a new debugfs entry was added tracking this new state (bitmask).
>>
>> Signed-off-by: Rafael Passos <rafael@rcpassos.me>
>
> I am really not sold on this. This does not make the code any simpler, does it? IMO, the goto-paths are much easier to read than tracking the state at runtime.
>
> Do you think this makes the code easier to understand? Am I off here?
It does not make the code simpler, indeed.
For me, it looks easier to understand the possible states
the driver can be in during startup.
Do you have any suggestions on how to make this simpler with scoped cleanup?
Otherwise, I have no problems dropping it. (It was still fun trying it out)
The rest of the patches are ready to be re-sent with your reviews.
Thanks,
Rafael Passos
next prev parent reply other threads:[~2026-10-04 15:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 21:38 [PATCH v4 0/4] HID: wiimote: new LED behavior on connect + scoped_guards Rafael Passos
2026-08-17 21:38 ` [PATCH v4 1/4] HID: wiimote: turn on the LEDs indicating the controller id Rafael Passos
2026-08-17 21:55 ` sashiko-bot
2026-09-20 8:24 ` David Rheinsberg
2026-08-17 21:38 ` [PATCH v4 2/4] HID: wiimote: replace spinlock pairs with scoped_guard Rafael Passos
2026-08-17 21:59 ` sashiko-bot
2026-09-20 8:12 ` David Rheinsberg
2026-08-17 21:38 ` [PATCH v4 3/4] HID: wiimote: led_probe with scoped cleanup Rafael Passos
2026-09-20 8:17 ` David Rheinsberg
2026-08-17 21:38 ` [PATCH v4 4/4] HID: wiimote: wiimote_probe " Rafael Passos
2026-08-17 21:54 ` sashiko-bot
2026-09-20 8:21 ` David Rheinsberg
2026-10-04 15:03 ` Rafael Passos [this message]
2026-09-03 13:30 ` [PATCH v4 0/4] HID: wiimote: new LED behavior on connect + scoped_guards Rafael Passos
2026-09-11 16:44 ` Jiri Kosina
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=DLW5992OONY6.69AKQBHWGQ01@rcpassos.me \
--to=rafael@rcpassos.me \
--cc=bentiss@kernel.org \
--cc=david@readahead.eu \
--cc=jikos@kernel.org \
--cc=jkoolstra@xs4all.nl \
--cc=linux-input@vger.kernel.org \
--cc=me@brighamcampbell.com \
--cc=skhan@linuxfoundation.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 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.