Re: [PATCH] docs: rust: Refactor safety lines docs to sections in cpufreq.rs
From: Miguel Ojeda
Date: Tue Jun 10 2025 - 12:16:18 EST
On Tue, Jun 10, 2025 at 5:18 PM Oliver Säfström
<safstrom.oliver@xxxxxxxxx> wrote:
>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1169
>
> Signed-off-by: Oliver Säfström <safstrom.oliver@xxxxxxxxx>
> Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Thanks for the patch Oliver -- Viresh already sent it a bit earlier,
with a few more improvements:
https://lore.kernel.org/rust-for-linux/4823a58093c6dfa20df62b5c18da613621b9716e.1749554599.git.viresh.kumar@xxxxxxxxxx/
So I assume he will probably want to go with that one.
But this patch was more of less what I was expecting. Some quick notes
for future patches in case it helps:
- Commit messages cannot be "empty" in the kernel (not counting
tags). It should explain the "what" and most importantly the "why".
- It should have been Reported-by in this case, like the issue
mentions, since it is a fix rather than a feature.
- The tags are usually sorted differently, e.g. please see other
commits in the kernel.
- I think this patch would make Clippy emit warnings (you can try
with `make ... CLIPPY=1`) because the functions are not `unsafe` (they
should be), e.g.
warning: safe function's docs have unnecessary `# Safety` section
Thanks again!
Cheers,
Miguel