linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/1] rust: pci: use c_* types via kernel prelude
@ 2025-08-12  3:31 herculoxz
  2025-08-15 18:07 ` Danilo Krummrich
  0 siblings, 1 reply; 2+ messages in thread
From: herculoxz @ 2025-08-12  3:31 UTC (permalink / raw)
  To: dakr, bhelgaas, kwilczynski, ojeda, alex.gaynor, boqun.feng, gary,
	bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross
  Cc: linux-pci, rust-for-linux, linux-kernel, Abhinav Ananthu

From: Abhinav Ananthu <abhinav.ogl@gmail.com>

Update PCI FFI callback signatures to use `c_` from the prelude,
instead of accessing it via `kernel::ffi::`.

Signed-off-by: Abhinav Ananthu <abhinav.ogl@gmail.com>
---
 rust/kernel/pci.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs
index 5ce07999168e..fbeeaec4e044 100644
--- a/rust/kernel/pci.rs
+++ b/rust/kernel/pci.rs
@@ -61,7 +61,7 @@ impl<T: Driver + 'static> Adapter<T> {
     extern "C" fn probe_callback(
         pdev: *mut bindings::pci_dev,
         id: *const bindings::pci_device_id,
-    ) -> kernel::ffi::c_int {
+    ) -> c_int {
         // SAFETY: The PCI bus only ever calls the probe callback with a valid pointer to a
         // `struct pci_dev`.
         //
@@ -333,7 +333,7 @@ unsafe fn do_release(pdev: &Device, ioptr: usize, num: i32) {
         // `ioptr` is valid by the safety requirements.
         // `num` is valid by the safety requirements.
         unsafe {
-            bindings::pci_iounmap(pdev.as_raw(), ioptr as *mut kernel::ffi::c_void);
+            bindings::pci_iounmap(pdev.as_raw(), ioptr as *mut c_void);
             bindings::pci_release_region(pdev.as_raw(), num);
         }
     }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3 1/1] rust: pci: use c_* types via kernel prelude
  2025-08-12  3:31 [PATCH v3 1/1] rust: pci: use c_* types via kernel prelude herculoxz
@ 2025-08-15 18:07 ` Danilo Krummrich
  0 siblings, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2025-08-15 18:07 UTC (permalink / raw)
  To: herculoxz
  Cc: bhelgaas, kwilczynski, ojeda, alex.gaynor, boqun.feng, gary,
	bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross, linux-pci,
	rust-for-linux, linux-kernel

On 8/12/25 5:31 AM, herculoxz wrote:
> From: Abhinav Ananthu <abhinav.ogl@gmail.com>
> 
> Update PCI FFI callback signatures to use `c_` from the prelude,
> instead of accessing it via `kernel::ffi::`.
> 
> Signed-off-by: Abhinav Ananthu <abhinav.ogl@gmail.com>

Applied to driver-core-testing, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-15 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12  3:31 [PATCH v3 1/1] rust: pci: use c_* types via kernel prelude herculoxz
2025-08-15 18:07 ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).