Skip to contentSkip to conversation

linux-next: build failure after merge of the cpufreq-arm tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Apr 28, 2025 – Apr 29, 2025 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the cpufreq-arm tree, today's linux-next build (x86_64 allmodconfig) failed like this:

error[E0308]: mismatched types
--> rust/kernel/cpufreq.rs:950:18

    |
950 |             Some(Self::update_limits_callback)
    |             ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
    |             |
    |             arguments to this enum variant are incorrect
    |

= note: expected fn pointer unsafe extern "C" fn(*mut bindings::cpufreq_policy)
found fn item extern "C" fn(u32) {cpufreq::Registration::<T>::update_limits_callback}
help: the type constructed contains extern "C" fn(u32) {cpufreq::Registration::<T>::update_limits_callback} due to the type of the argument passed
--> rust/kernel/cpufreq.rs:950:13

    |
950 |             Some(Self::update_limits_callback)
    |             ^^^^^----------------------------^
    |                  |
    |                  this argument influences the type of `Some`
note: tuple variant defined here
   --> /usr/lib/rustlib/src/rust/library/core/src/option.rs:580:5
    |
580 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^

error: aborting due to 1 previous error

For more information about this error, try rustc --explain E0308.

Caused by commit

c490d1f07bec ("rust: cpufreq: Extend abstractions for driver registration")

I have used the cpufreq-arm tree from next-20250424 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 30 lines · Stephen Rothwell

Hi all,

After merging the cpufreq-arm tree, today's linux-next build (x86_64 allmodconfig) failed like this:

error[E0308]: mismatched types
--> rust/kernel/cpufreq.rs:950:18

    |
950 |             Some(Self::update_limits_callback)
    |             ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
    |             |
    |             arguments to this enum variant are incorrect
    |

= note: expected fn pointer unsafe extern "C" fn(*mut bindings::cpufreq_policy)
found fn item extern "C" fn(u32) {cpufreq::Registration::<T>::update_limits_callback}
help: the type constructed contains extern "C" fn(u32) {cpufreq::Registration::<T>::update_limits_callback} due to the type of the argument passed
--> rust/kernel/cpufreq.rs:950:13

    |
950 |             Some(Self::update_limits_callback)
    |             ^^^^^----------------------------^
    |                  |
    |                  this argument influences the type of `Some`
note: tuple variant defined here
   --> /usr/lib/rustlib/src/rust/library/core/src/option.rs:580:5
    |
580 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^

error: aborting due to 1 previous error

Quoted 7 lines

For more information about this error, try rustc --explain E0308.

Caused by commit

c490d1f07bec ("rust: cpufreq: Extend abstractions for driver registration")

I have used the cpufreq-arm tree from next-20250424 for today.

Fixed and pushed. Thanks. There was a conflict against a recent update in the PM tree.

Signature · 1 line
viresh