public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference
@ 2026-01-05 21:37 Marko Turk
  2026-01-05 21:37 ` [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments Marko Turk
  2026-01-06 20:49 ` [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference Danilo Krummrich
  0 siblings, 2 replies; 5+ messages in thread
From: Marko Turk @ 2026-01-05 21:37 UTC (permalink / raw)
  To: dakr, dirk.behme, linux-pci, linux-kernel, rust-for-linux, mt
  Cc: linux-pci, linux-kernel, rust-for-linux, Marko Turk

Remove square brackets since this section is not a part of doc-comment
so the reference will not be converted to a link in the generated docs.

Fixes: ce30d94e6855 ("rust: add `io::{Io, IoRaw}` base types")
Suggested-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Marko Turk <mt@markoturk.info>
---
Changes since v1:
 - pci::Bar is re-exported so no need to change this to pci::io::Bar
 - instead removed the square brackets as suggested by Danilo

Link to v1: https://lore.kernel.org/lkml/20260103143119.96095-1-mt@markoturk.info/

 rust/kernel/io.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs
index 98e8b84e68d1..a97eb44a9a87 100644
--- a/rust/kernel/io.rs
+++ b/rust/kernel/io.rs
@@ -87,7 +87,7 @@ pub fn maxsize(&self) -> usize {
 /// };
 /// use core::ops::Deref;
 ///
-/// // See also [`pci::Bar`] for a real example.
+/// // See also `pci::Bar` for a real example.
 /// struct IoMem<const SIZE: usize>(IoRaw<SIZE>);
 ///
 /// impl<const SIZE: usize> IoMem<SIZE> {
-- 
2.51.0


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

* [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments
  2026-01-05 21:37 [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference Marko Turk
@ 2026-01-05 21:37 ` Marko Turk
  2026-01-06  9:27   ` Dirk Behme
  2026-01-06 20:30   ` Danilo Krummrich
  2026-01-06 20:49 ` [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference Danilo Krummrich
  1 sibling, 2 replies; 5+ messages in thread
From: Marko Turk @ 2026-01-05 21:37 UTC (permalink / raw)
  To: dakr, dirk.behme, linux-pci, linux-kernel, rust-for-linux, mt
  Cc: linux-pci, linux-kernel, rust-for-linux, Marko Turk

Fix a typo in the doc-comment of the Bar structure: 'inststance ->
instance'.

Add also 'is' to the comment inside Bar's `new()` function (suggested
by Dirk):
// `pdev` is valid by the invariants of `Device`.

Fixes: bf9651f84b4e ("rust: pci: implement I/O mappable `pci::Bar`")
Suggested-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Marko Turk <mt@markoturk.info>
---
Changes since v1:
  - updated commit msg
  - added Fixes: tag
  - fixed another typo as suggested by Dirk

Link to v1: https://lore.kernel.org/lkml/20260103143119.96095-1-mt@markoturk.info/

 rust/kernel/pci/io.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs
index 0d55c3139b6f..82a4f1eba2f5 100644
--- a/rust/kernel/pci/io.rs
+++ b/rust/kernel/pci/io.rs
@@ -20,7 +20,7 @@
 ///
 /// # Invariants
 ///
-/// `Bar` always holds an `IoRaw` inststance that holds a valid pointer to the start of the I/O
+/// `Bar` always holds an `IoRaw` instance that holds a valid pointer to the start of the I/O
 /// memory mapped PCI BAR and its size.
 pub struct Bar<const SIZE: usize = 0> {
     pdev: ARef<Device>,
@@ -54,7 +54,7 @@ pub(super) fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> {
         let ioptr: usize = unsafe { bindings::pci_iomap(pdev.as_raw(), num, 0) } as usize;
         if ioptr == 0 {
             // SAFETY:
-            // `pdev` valid by the invariants of `Device`.
+            // `pdev` is valid by the invariants of `Device`.
             // `num` is checked for validity by a previous call to `Device::resource_len`.
             unsafe { bindings::pci_release_region(pdev.as_raw(), num) };
             return Err(ENOMEM);
-- 
2.51.0


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

* Re: [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments
  2026-01-05 21:37 ` [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments Marko Turk
@ 2026-01-06  9:27   ` Dirk Behme
  2026-01-06 20:30   ` Danilo Krummrich
  1 sibling, 0 replies; 5+ messages in thread
From: Dirk Behme @ 2026-01-06  9:27 UTC (permalink / raw)
  To: Marko Turk, dakr, linux-pci, linux-kernel, rust-for-linux

Am 1/5/2026 um 10:37 PM schrieb Marko Turk:
> Fix a typo in the doc-comment of the Bar structure: 'inststance ->
> instance'.
> 
> Add also 'is' to the comment inside Bar's `new()` function (suggested
> by Dirk):
> // `pdev` is valid by the invariants of `Device`.
> 
> Fixes: bf9651f84b4e ("rust: pci: implement I/O mappable `pci::Bar`")
> Suggested-by: Dirk Behme <dirk.behme@de.bosch.com>
> Signed-off-by: Marko Turk <mt@markoturk.info>

Reviewed-by: Dirk Behme <dirk.behme@de.bosch.com>

Same for patch 1/2.

Thanks!

Dirk

> ---
> Changes since v1:
>    - updated commit msg
>    - added Fixes: tag
>    - fixed another typo as suggested by Dirk
> 
> Link to v1: https://lore.kernel.org/lkml/20260103143119.96095-1-mt@markoturk.info/
> 
>   rust/kernel/pci/io.rs | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs
> index 0d55c3139b6f..82a4f1eba2f5 100644
> --- a/rust/kernel/pci/io.rs
> +++ b/rust/kernel/pci/io.rs
> @@ -20,7 +20,7 @@
>   ///
>   /// # Invariants
>   ///
> -/// `Bar` always holds an `IoRaw` inststance that holds a valid pointer to the start of the I/O
> +/// `Bar` always holds an `IoRaw` instance that holds a valid pointer to the start of the I/O
>   /// memory mapped PCI BAR and its size.
>   pub struct Bar<const SIZE: usize = 0> {
>       pdev: ARef<Device>,
> @@ -54,7 +54,7 @@ pub(super) fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> {
>           let ioptr: usize = unsafe { bindings::pci_iomap(pdev.as_raw(), num, 0) } as usize;
>           if ioptr == 0 {
>               // SAFETY:
> -            // `pdev` valid by the invariants of `Device`.
> +            // `pdev` is valid by the invariants of `Device`.
>               // `num` is checked for validity by a previous call to `Device::resource_len`.
>               unsafe { bindings::pci_release_region(pdev.as_raw(), num) };
>               return Err(ENOMEM);


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

* Re: [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments
  2026-01-05 21:37 ` [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments Marko Turk
  2026-01-06  9:27   ` Dirk Behme
@ 2026-01-06 20:30   ` Danilo Krummrich
  1 sibling, 0 replies; 5+ messages in thread
From: Danilo Krummrich @ 2026-01-06 20:30 UTC (permalink / raw)
  To: Marko Turk; +Cc: dirk.behme, linux-pci, linux-kernel, rust-for-linux

On Mon Jan 5, 2026 at 10:37 PM CET, Marko Turk wrote:
> Fix a typo in the doc-comment of the Bar structure: 'inststance ->
> instance'.
>
> Add also 'is' to the comment inside Bar's `new()` function (suggested
> by Dirk):
> // `pdev` is valid by the invariants of `Device`.
>
> Fixes: bf9651f84b4e ("rust: pci: implement I/O mappable `pci::Bar`")
> Suggested-by: Dirk Behme <dirk.behme@de.bosch.com>
> Signed-off-by: Marko Turk <mt@markoturk.info>

Applied to driver-core-linus, thanks!

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

* Re: [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference
  2026-01-05 21:37 [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference Marko Turk
  2026-01-05 21:37 ` [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments Marko Turk
@ 2026-01-06 20:49 ` Danilo Krummrich
  1 sibling, 0 replies; 5+ messages in thread
From: Danilo Krummrich @ 2026-01-06 20:49 UTC (permalink / raw)
  To: Marko Turk; +Cc: dirk.behme, linux-pci, linux-kernel, rust-for-linux

On Mon Jan 5, 2026 at 10:37 PM CET, Marko Turk wrote:
> Remove square brackets since this section is not a part of doc-comment
> so the reference will not be converted to a link in the generated docs.
>
> Fixes: ce30d94e6855 ("rust: add `io::{Io, IoRaw}` base types")
> Suggested-by: Danilo Krummrich <dakr@kernel.org>
> Signed-off-by: Marko Turk <mt@markoturk.info>

Applied to driver-core-testing, thanks!

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

end of thread, other threads:[~2026-01-06 20:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 21:37 [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference Marko Turk
2026-01-05 21:37 ` [PATCH v2 2/2] rust: pci: fix typos in Bar struct's comments Marko Turk
2026-01-06  9:27   ` Dirk Behme
2026-01-06 20:30   ` Danilo Krummrich
2026-01-06 20:49 ` [PATCH v2 1/2] rust: io: remove square brackets from pci::Bar reference Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox