lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <CANiq72mOt3yvr_07Gbjnz80ExODYoNvXbqERmCOpZYFmGmAVRw@mail.gmail.com> Date: Sat, 28 Oct 2023 17:16:09 +0200 From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com> To: Andrew Lunn <andrew@...n.ch> Cc: Benno Lossin <benno.lossin@...ton.me>, Boqun Feng <boqun.feng@...il.com>, FUJITA Tomonori <fujita.tomonori@...il.com>, netdev@...r.kernel.org, rust-for-linux@...r.kernel.org, tmgross@...ch.edu, wedsonaf@...il.com Subject: Re: [PATCH net-next v7 1/5] rust: core abstractions for network PHY drivers On Sat, Oct 28, 2023 at 12:40 AM Andrew Lunn <andrew@...n.ch> wrote: > > After the discussion about mutability, i took a look at the C code, > and started adding const to functions which take phydev, but don't > modify it. Does bindgen look for such const attributes? Does it make a > difference to be binding? I think you are referring to the `const` type qualifier, not the attribute (which the kernel uses too). But yes, it makes a difference in the output it generates (if we are talking about the pointed-to), e.g. void f(struct S *); // *mut S void f(const struct S *); // *const S Being const-correct would be a good change for C in any case. Cheers, Miguel
Powered by blists - more mailing lists