We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6cda91 commit 69d5fbbCopy full SHA for 69d5fbb
rust/kernel/error.rs
@@ -264,13 +264,9 @@ pub fn to_result(err: core::ffi::c_int) -> Result {
264
/// pdev: &mut PlatformDevice,
265
/// index: u32,
266
/// ) -> Result<*mut core::ffi::c_void> {
267
-/// // SAFETY: FFI call.
268
-/// unsafe {
269
-/// from_err_ptr(bindings::devm_platform_ioremap_resource(
270
-/// pdev.to_ptr(),
271
-/// index,
272
-/// ))
273
-/// }
+/// // SAFETY: `pdev` points to a valid platform device. There are no safety requirements
+/// // on `index`.
+/// from_err_ptr(unsafe { bindings::devm_platform_ioremap_resource(pdev.to_ptr(), index) })
274
/// }
275
/// ```
276
// TODO: Remove `dead_code` marker once an in-kernel client is available.
0 commit comments