Re: [RFC PATCH v2] rust: i2c: Remove use of bindings::i2c_match_id
From: Andrew Davis
Date: Mon Nov 16 2026 - 20:41:41 EST
On 11/16/26 12:25 PM, Miguel Ojeda wrote:
On Thu, Nov 12, 2026 at 12:11 AM Andrew Davis <afd@xxxxxx> wrote:
Well Sashiko suggested I take the easy way and just re-use a different C
function instead of trying to open-code the loop in Rust. The C function
I noticed this series while going through Lore threads, and yeah, it
is generally better to avoid re-implementing logic in Rust if a
suitable function already exists in C in the subsystem (unless there
is a good reason to not do so, of course).
Perfect, sounds like v2 here is the right to go then. I'll resend
this RFC as a normal PATCH then.
By the way, while the maintainers may already know about the removal,
I would suggest adding a Link: or commit reference to the patch
removing that C function, i.e. to give context for others.
It's not been coordinated much, I've been just converting drivers over
to better functions until there are none left using this old one. Then
will send a patch to drop the then unused old function. Only a few users
left after this Rust one.
I hope that helps!
It does, thanks!
Andrew
Cheers,
Miguel