Commit 28bb48c
rust: dma: add
Stephen found a future build failure in linux-next [1]:
error[E0277]: `*mut MyStruct` cannot be sent between threads safely
--> samples/rust/rust_dma.rs:47:22
|
47 | impl pci::Driver for DmaSampleDriver {
| ^^^^^^^^^^^^^^^ `*mut MyStruct` cannot be sent between threads safely
It is caused by the interaction between commit 935e1d9 ("rust: pci:
require Send for Driver trait implementers") from the driver-core tree,
which fixes a missing concurrency requirement, and commit 9901add
("samples: rust: add Rust dma test sample driver") which adds a sample
that does not satisfy that requirement.
Add a `Send` implementation to `CoherentAllocation`, which allows the
sample (and other future users) to satisfy it.
Reported-by: Stephen Rothwell <[email protected]>
Closes: https://lore.kernel.org/linux-next/[email protected]/ [1]
Signed-off-by: Danilo Krummrich <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Added number to Closes. Fix typo spotted by Boqun. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>Send implementation for CoherentAllocation
1 parent a0b539a commit 28bb48c
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
304 | 308 | | |
305 | 309 | | |
306 | 310 | | |
| |||
0 commit comments