Skip to content

rust: block: mq: align init_request numa_node arg with C signature#894

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1101515=>linus-master
Open

rust: block: mq: align init_request numa_node arg with C signature#894
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1101515=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented May 27, 2026

Pull request for series with
subject: rust: block: mq: align init_request numa_node arg with C signature
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1101515

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 27, 2026

Upstream branch: e8c2f9f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1101515
version: 1

Commit b040a1a4523d ("block: switch numa_node to int in
blk_mq_hw_ctx and init_request") changed the type of the
`numa_node` argument of `blk_mq_ops::init_request` from
`unsigned int` to `int`. Update the Rust callback signature to
match, so that the function item can be coerced to the C fn
pointer type stored in `blk_mq_ops`.

Without this change the Rust block layer fails to build:

  error[E0308]: mismatched types
     --> rust/kernel/block/mq/operations.rs:274:28
      |
  274 |         init_request: Some(Self::init_request_callback),
      |                       ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |                       expected fn pointer, found fn item
      |
      = note: expected fn pointer
                `unsafe extern "C" fn(_, _, _, i32) -> _`
                    found fn item
                `unsafe extern "C" fn(_, _, _, u32) -> _ {...}`

The argument is unused on the Rust side, so this is a pure
type-signature change with no functional impact.

Fixes: b040a1a4523d ("block: switch numa_node to int in blk_mq_hw_ctx and init_request")
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 27, 2026

Upstream branch: e8c2f9f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1101515
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1101515=>linus-master branch from 5aa4607 to 0c77f01 Compare May 27, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants