Thread (1 message) 1 message, 1 author, 1d ago

Re: [PATCH] rust: net: phy: fix off-by-one bit positions in device status accessors

From: Miguel Ojeda <hidden>
Date: 2026-08-23 11:40:46
Also in: rust-for-linux

On Sun, Aug 23, 2026 at 1:20 PM springbreeze
[off-list ref] wrote:
Thanks for the review!
The literals were a stopgap; the code carried a TODO to replace them
with bindgen-generated accessors "when it becomes possible". I checked
the current bindgen output: it now generates layout-derived accessors
for these bitfields (phydev.link(), phydev.autoneg(),
phydev.autoneg_complete()), so v2 drops the hand-written offsets
entirely and uses the generated accessors instead, which removes this
class of bug.
netdev may prefer the minimal fix for backporting, though, i.e. the
improvement could in principle be a separate patch.

But, of course, up to them, thanks!

[ Please reply in plain text; otherwise, your message may be dropped
by the mailing lists. ]

Cheers,
Miguel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help