Re: [linux-next:master 8890/10862] Diff in rust/kernel/cpufreq.rs:1361:

Viresh Kumar <[email protected]> Tue, 4 Aug 2026 09:50:19 +0530
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <adhpyq3m2pe7g7xk2qxm2x26fjzyypd5lyix3btd6xrsgsrcz6@g7qbpzluydw2>
On 31-07-26, 11:41, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   95d6a9ccef99117115e41e9adb271243bd5e985b
> commit: 8aa931819543aaed39215a8ee39af4b1ed44cfa8 [8890/10862] rust: cpufreq: Fix temporary write in Registration::bios_limit_callback
> config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260731/[email protected]/config)
> compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
> rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260731/[email protected]/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <[email protected]>
> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> 
> All errors (new ones prefixed by >>):
> 
>    PATH=/opt/cross/clang-22/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>    INFO PATH=/opt/cross/rustc-1.96.0-bindgen-0.72.1/cargo/bin:/opt/cross/clang-22/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>    /usr/bin/timeout -k 100 12h /usr/bin/make KCFLAGS=\ -fno-crash-diagnostics\ -Wno-error=return-type\ -Wreturn-type\ -funsigned-char\ -Wundef\ -falign-functions=64 W=1 --keep-going LLVM=1 -j384 -C source O=/kbuild/obj/consumer/x86_64-rhel-9.4-rust ARCH=x86_64 SHELL=/bin/bash rustfmtcheck 
>    make: Entering directory '/kbuild/src'
>    make[1]: Entering directory '/kbuild/obj/consumer/x86_64-rhel-9.4-rust'
> >> Diff in rust/kernel/cpufreq.rs:1361:
>                 let mut policy = PolicyCpu::from_cpu(cpu_id)?;
>                 let val = T::bios_limit(&mut policy)?;
>                 // SAFETY: `limit` is guaranteed by the C code to be valid.
>    -            unsafe { *limit = val; }
>    +            unsafe {
>    +                *limit = val;
>    +            }
>                 Ok(0)
>             })
>         }
> >> Diff in rust/kernel/cpufreq.rs:1361:
>                 let mut policy = PolicyCpu::from_cpu(cpu_id)?;
>                 let val = T::bios_limit(&mut policy)?;
>                 // SAFETY: `limit` is guaranteed by the C code to be valid.
>    -            unsafe { *limit = val; }
>    +            unsafe {
>    +                *limit = val;
>    +            }
>                 Ok(0)
>             })
>         }

Fixed and pushed again.

-- 
viresh