@@ -1061,7 +1061,7 @@ impl<T: Driver> Registration<T> {
10611061 ///
10621062 /// - This function may only be called from the cpufreq C infrastructure.
10631063 /// - The pointer arguments must be valid pointers.
1064- unsafe extern "C" fn init_callback ( ptr : * mut bindings:: cpufreq_policy ) -> kernel :: ffi :: c_int {
1064+ unsafe extern "C" fn init_callback ( ptr : * mut bindings:: cpufreq_policy ) -> c_int {
10651065 from_result ( || {
10661066 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
10671067 // lifetime of `policy`.
@@ -1094,7 +1094,7 @@ impl<T: Driver> Registration<T> {
10941094 ///
10951095 /// - This function may only be called from the cpufreq C infrastructure.
10961096 /// - The pointer arguments must be valid pointers.
1097- unsafe extern "C" fn online_callback ( ptr : * mut bindings:: cpufreq_policy ) -> kernel :: ffi :: c_int {
1097+ unsafe extern "C" fn online_callback ( ptr : * mut bindings:: cpufreq_policy ) -> c_int {
10981098 from_result ( || {
10991099 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
11001100 // lifetime of `policy`.
@@ -1109,9 +1109,7 @@ impl<T: Driver> Registration<T> {
11091109 ///
11101110 /// - This function may only be called from the cpufreq C infrastructure.
11111111 /// - The pointer arguments must be valid pointers.
1112- unsafe extern "C" fn offline_callback (
1113- ptr : * mut bindings:: cpufreq_policy ,
1114- ) -> kernel:: ffi:: c_int {
1112+ unsafe extern "C" fn offline_callback ( ptr : * mut bindings:: cpufreq_policy ) -> c_int {
11151113 from_result ( || {
11161114 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
11171115 // lifetime of `policy`.
@@ -1126,9 +1124,7 @@ impl<T: Driver> Registration<T> {
11261124 ///
11271125 /// - This function may only be called from the cpufreq C infrastructure.
11281126 /// - The pointer arguments must be valid pointers.
1129- unsafe extern "C" fn suspend_callback (
1130- ptr : * mut bindings:: cpufreq_policy ,
1131- ) -> kernel:: ffi:: c_int {
1127+ unsafe extern "C" fn suspend_callback ( ptr : * mut bindings:: cpufreq_policy ) -> c_int {
11321128 from_result ( || {
11331129 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
11341130 // lifetime of `policy`.
@@ -1143,7 +1139,7 @@ impl<T: Driver> Registration<T> {
11431139 ///
11441140 /// - This function may only be called from the cpufreq C infrastructure.
11451141 /// - The pointer arguments must be valid pointers.
1146- unsafe extern "C" fn resume_callback ( ptr : * mut bindings:: cpufreq_policy ) -> kernel :: ffi :: c_int {
1142+ unsafe extern "C" fn resume_callback ( ptr : * mut bindings:: cpufreq_policy ) -> c_int {
11471143 from_result ( || {
11481144 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
11491145 // lifetime of `policy`.
@@ -1171,9 +1167,7 @@ impl<T: Driver> Registration<T> {
11711167 ///
11721168 /// - This function may only be called from the cpufreq C infrastructure.
11731169 /// - The pointer arguments must be valid pointers.
1174- unsafe extern "C" fn verify_callback (
1175- ptr : * mut bindings:: cpufreq_policy_data ,
1176- ) -> kernel:: ffi:: c_int {
1170+ unsafe extern "C" fn verify_callback ( ptr : * mut bindings:: cpufreq_policy_data ) -> c_int {
11771171 from_result ( || {
11781172 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
11791173 // lifetime of `policy`.
@@ -1188,9 +1182,7 @@ impl<T: Driver> Registration<T> {
11881182 ///
11891183 /// - This function may only be called from the cpufreq C infrastructure.
11901184 /// - The pointer arguments must be valid pointers.
1191- unsafe extern "C" fn setpolicy_callback (
1192- ptr : * mut bindings:: cpufreq_policy ,
1193- ) -> kernel:: ffi:: c_int {
1185+ unsafe extern "C" fn setpolicy_callback ( ptr : * mut bindings:: cpufreq_policy ) -> c_int {
11941186 from_result ( || {
11951187 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
11961188 // lifetime of `policy`.
@@ -1207,9 +1199,9 @@ impl<T: Driver> Registration<T> {
12071199 /// - The pointer arguments must be valid pointers.
12081200 unsafe extern "C" fn target_callback (
12091201 ptr : * mut bindings:: cpufreq_policy ,
1210- target_freq : u32 ,
1211- relation : u32 ,
1212- ) -> kernel :: ffi :: c_int {
1202+ target_freq : c_uint ,
1203+ relation : c_uint ,
1204+ ) -> c_int {
12131205 from_result ( || {
12141206 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
12151207 // lifetime of `policy`.
@@ -1226,8 +1218,8 @@ impl<T: Driver> Registration<T> {
12261218 /// - The pointer arguments must be valid pointers.
12271219 unsafe extern "C" fn target_index_callback (
12281220 ptr : * mut bindings:: cpufreq_policy ,
1229- index : u32 ,
1230- ) -> kernel :: ffi :: c_int {
1221+ index : c_uint ,
1222+ ) -> c_int {
12311223 from_result ( || {
12321224 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
12331225 // lifetime of `policy`.
@@ -1249,8 +1241,8 @@ impl<T: Driver> Registration<T> {
12491241 /// - The pointer arguments must be valid pointers.
12501242 unsafe extern "C" fn fast_switch_callback (
12511243 ptr : * mut bindings:: cpufreq_policy ,
1252- target_freq : u32 ,
1253- ) -> kernel :: ffi :: c_uint {
1244+ target_freq : c_uint ,
1245+ ) -> c_uint {
12541246 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
12551247 // lifetime of `policy`.
12561248 let policy = unsafe { Policy :: from_raw_mut ( ptr) } ;
@@ -1263,10 +1255,10 @@ impl<T: Driver> Registration<T> {
12631255 ///
12641256 /// - This function may only be called from the cpufreq C infrastructure.
12651257 unsafe extern "C" fn adjust_perf_callback (
1266- cpu : u32 ,
1267- min_perf : usize ,
1268- target_perf : usize ,
1269- capacity : usize ,
1258+ cpu : c_uint ,
1259+ min_perf : c_ulong ,
1260+ target_perf : c_ulong ,
1261+ capacity : c_ulong ,
12701262 ) {
12711263 // SAFETY: The C API guarantees that `cpu` refers to a valid CPU number.
12721264 let cpu_id = unsafe { CpuId :: from_u32_unchecked ( cpu) } ;
@@ -1284,8 +1276,8 @@ impl<T: Driver> Registration<T> {
12841276 /// - The pointer arguments must be valid pointers.
12851277 unsafe extern "C" fn get_intermediate_callback (
12861278 ptr : * mut bindings:: cpufreq_policy ,
1287- index : u32 ,
1288- ) -> kernel :: ffi :: c_uint {
1279+ index : c_uint ,
1280+ ) -> c_uint {
12891281 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
12901282 // lifetime of `policy`.
12911283 let policy = unsafe { Policy :: from_raw_mut ( ptr) } ;
@@ -1305,8 +1297,8 @@ impl<T: Driver> Registration<T> {
13051297 /// - The pointer arguments must be valid pointers.
13061298 unsafe extern "C" fn target_intermediate_callback (
13071299 ptr : * mut bindings:: cpufreq_policy ,
1308- index : u32 ,
1309- ) -> kernel :: ffi :: c_int {
1300+ index : c_uint ,
1301+ ) -> c_int {
13101302 from_result ( || {
13111303 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
13121304 // lifetime of `policy`.
@@ -1325,7 +1317,7 @@ impl<T: Driver> Registration<T> {
13251317 /// # Safety
13261318 ///
13271319 /// - This function may only be called from the cpufreq C infrastructure.
1328- unsafe extern "C" fn get_callback ( cpu : u32 ) -> kernel :: ffi :: c_uint {
1320+ unsafe extern "C" fn get_callback ( cpu : c_uint ) -> c_uint {
13291321 // SAFETY: The C API guarantees that `cpu` refers to a valid CPU number.
13301322 let cpu_id = unsafe { CpuId :: from_u32_unchecked ( cpu) } ;
13311323
@@ -1351,7 +1343,7 @@ impl<T: Driver> Registration<T> {
13511343 ///
13521344 /// - This function may only be called from the cpufreq C infrastructure.
13531345 /// - The pointer arguments must be valid pointers.
1354- unsafe extern "C" fn bios_limit_callback ( cpu : i32 , limit : * mut u32 ) -> kernel :: ffi :: c_int {
1346+ unsafe extern "C" fn bios_limit_callback ( cpu : c_int , limit : * mut c_uint ) -> c_int {
13551347 // SAFETY: The C API guarantees that `cpu` refers to a valid CPU number.
13561348 let cpu_id = unsafe { CpuId :: from_i32_unchecked ( cpu) } ;
13571349
@@ -1371,8 +1363,8 @@ impl<T: Driver> Registration<T> {
13711363 /// - The pointer arguments must be valid pointers.
13721364 unsafe extern "C" fn set_boost_callback (
13731365 ptr : * mut bindings:: cpufreq_policy ,
1374- state : i32 ,
1375- ) -> kernel :: ffi :: c_int {
1366+ state : c_int ,
1367+ ) -> c_int {
13761368 from_result ( || {
13771369 // SAFETY: The `ptr` is guaranteed to be valid by the contract with the C code for the
13781370 // lifetime of `policy`.
0 commit comments