* [PATCH 1/2] rust: io: fix Bar reference in Io struct's comment
@ 2026-01-03 14:31 Marko Turk
2026-01-03 14:31 ` [PATCH 2/2] rust: pci: fix typo in Bar " Marko Turk
2026-01-03 15:22 ` [PATCH 1/2] rust: io: fix Bar reference in Io " Danilo Krummrich
0 siblings, 2 replies; 12+ messages in thread
From: Marko Turk @ 2026-01-03 14:31 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
Bar was moved to a separate pci::io module, update the reference to it.
Signed-off-by: Marko Turk <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..08853f32dae6 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::io::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] 12+ messages in thread* [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-03 14:31 [PATCH 1/2] rust: io: fix Bar reference in Io struct's comment Marko Turk
@ 2026-01-03 14:31 ` Marko Turk
2026-01-03 15:24 ` Danilo Krummrich
2026-01-03 15:22 ` [PATCH 1/2] rust: io: fix Bar reference in Io " Danilo Krummrich
1 sibling, 1 reply; 12+ messages in thread
From: Marko Turk @ 2026-01-03 14:31 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
inststance -> instance
Signed-off-by: Marko Turk <mt@markoturk.info>
---
rust/kernel/pci/io.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs
index 0d55c3139b6f..fba746c4dc5d 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>,
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-03 14:31 ` [PATCH 2/2] rust: pci: fix typo in Bar " Marko Turk
@ 2026-01-03 15:24 ` Danilo Krummrich
2026-01-03 15:38 ` Dirk Behme
0 siblings, 1 reply; 12+ messages in thread
From: Danilo Krummrich @ 2026-01-03 15:24 UTC (permalink / raw)
To: Marko Turk; +Cc: dirk.behme, linux-pci, linux-kernel, rust-for-linux
On Sat Jan 3, 2026 at 3:31 PM CET, Marko Turk wrote:
> inststance -> instance
It's trivial in this case, but we usually write at least something along the
lines of "Fix a typo in the doc-comment of the Bar structure: 'inststance ->
instance'."
Please also add a corresponding Fixes: tag.
> Signed-off-by: Marko Turk <mt@markoturk.info>
> ---
> rust/kernel/pci/io.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs
> index 0d55c3139b6f..fba746c4dc5d 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>,
> --
> 2.51.0
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-03 15:24 ` Danilo Krummrich
@ 2026-01-03 15:38 ` Dirk Behme
2026-01-03 21:16 ` Marko Turk
0 siblings, 1 reply; 12+ messages in thread
From: Dirk Behme @ 2026-01-03 15:38 UTC (permalink / raw)
To: Danilo Krummrich, Marko Turk
Cc: dirk.behme, linux-pci, linux-kernel, rust-for-linux
On 03.01.26 16:24, Danilo Krummrich wrote:
> On Sat Jan 3, 2026 at 3:31 PM CET, Marko Turk wrote:
>> inststance -> instance
>
> It's trivial in this case, but we usually write at least something along the
> lines of "Fix a typo in the doc-comment of the Bar structure: 'inststance ->
> instance'."
>
> Please also add a corresponding Fixes: tag.
While looking at this some days ago as well I came up with
Fixes: 3c2e31d717ac ("rust: pci: move I/O infrastructure to separate
file")
But that just moves the pre-existing typo from rust/kernel/pci.rs to
rust/kernel/pci/io.rs. So I'm unsure if that move-only commit should
be mentioned in Fixes:? Or if we should go back more to search for the
commit introducing this typo?
Best regards
Dirk
Btw: While we are at this file, do we want to add an 'is' in line 57
as well?
// `pdev` valid by the invariants of `Device`. => ... is valid ...
>> Signed-off-by: Marko Turk <mt@markoturk.info>
>> ---
>> rust/kernel/pci/io.rs | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs
>> index 0d55c3139b6f..fba746c4dc5d 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>,
>> --
>> 2.51.0
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-03 15:38 ` Dirk Behme
@ 2026-01-03 21:16 ` Marko Turk
2026-01-04 12:45 ` Miguel Ojeda
0 siblings, 1 reply; 12+ messages in thread
From: Marko Turk @ 2026-01-03 21:16 UTC (permalink / raw)
To: Dirk Behme
Cc: Danilo Krummrich, dirk.behme, linux-pci, linux-kernel,
rust-for-linux
On Sat, Jan 03, 2026 at 04:38:36PM +0100, Dirk Behme wrote:
> On 03.01.26 16:24, Danilo Krummrich wrote:
> > On Sat Jan 3, 2026 at 3:31 PM CET, Marko Turk wrote:
> >> inststance -> instance
> >
> > It's trivial in this case, but we usually write at least something along the
> > lines of "Fix a typo in the doc-comment of the Bar structure: 'inststance ->
> > instance'."
> >
> > Please also add a corresponding Fixes: tag.
>
> While looking at this some days ago as well I came up with
>
> Fixes: 3c2e31d717ac ("rust: pci: move I/O infrastructure to separate
> file")
>
> But that just moves the pre-existing typo from rust/kernel/pci.rs to
> rust/kernel/pci/io.rs. So I'm unsure if that move-only commit should
> be mentioned in Fixes:? Or if we should go back more to search for the
> commit introducing this typo?
The typo was introduced in the original commit where pci::Bar was added:
Fixes: bf9651f84b4e ("rust: pci: implement I/O mappable `pci::Bar`")
Should I use that for the Fixes: tag?
>
> Best regards
>
> Dirk
>
> Btw: While we are at this file, do we want to add an 'is' in line 57
> as well?
>
> // `pdev` valid by the invariants of `Device`. => ... is valid ...
>
Should I do that in the same commit?
Marko
>
> >> Signed-off-by: Marko Turk <mt@markoturk.info>
> >> ---
> >> rust/kernel/pci/io.rs | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs
> >> index 0d55c3139b6f..fba746c4dc5d 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>,
> >> --
> >> 2.51.0
> >
> >
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-03 21:16 ` Marko Turk
@ 2026-01-04 12:45 ` Miguel Ojeda
2026-01-04 14:08 ` Danilo Krummrich
0 siblings, 1 reply; 12+ messages in thread
From: Miguel Ojeda @ 2026-01-04 12:45 UTC (permalink / raw)
To: Marko Turk
Cc: Dirk Behme, Danilo Krummrich, dirk.behme, linux-pci, linux-kernel,
rust-for-linux
On Sat, Jan 3, 2026 at 10:16 PM Marko Turk <mt@markoturk.info> wrote:
>
> The typo was introduced in the original commit where pci::Bar was added:
> Fixes: bf9651f84b4e ("rust: pci: implement I/O mappable `pci::Bar`")
>
> Should I use that for the Fixes: tag?
I would add both, since it was added in both and thus different set of
stable releases may need to fix it differently (i.e. before and after
the move).
In this case, from a quick look, one is for the current release, so it
doesn't need backport, and the other would need a custom one (since
this commit wouldn't apply) if someone wants to do Option 3.
> Should I do that in the same commit?
If the patch targets the same set of stable releases with the given
`Fixes:` and is trivial (in this case, both are true from a quick
look), then it doesn't matter much either way and may simplify
handling. But, when those are not true, i.e. in the general case,
splitting where possible usually is better and simpler.
I hope that helps!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-04 12:45 ` Miguel Ojeda
@ 2026-01-04 14:08 ` Danilo Krummrich
2026-01-04 18:30 ` Miguel Ojeda
0 siblings, 1 reply; 12+ messages in thread
From: Danilo Krummrich @ 2026-01-04 14:08 UTC (permalink / raw)
To: Miguel Ojeda, gregkh, sashal
Cc: Marko Turk, Dirk Behme, dirk.behme, linux-pci, linux-kernel,
rust-for-linux, stable
(Cc: Greg, Sasha)
On Sun Jan 4, 2026 at 1:45 PM CET, Miguel Ojeda wrote:
> On Sat, Jan 3, 2026 at 10:16 PM Marko Turk <mt@markoturk.info> wrote:
>>
>> The typo was introduced in the original commit where pci::Bar was added:
>> Fixes: bf9651f84b4e ("rust: pci: implement I/O mappable `pci::Bar`")
>>
>> Should I use that for the Fixes: tag?
>
> I would add both, since it was added in both and thus different set of
> stable releases may need to fix it differently (i.e. before and after
> the move).
In general I prefer to only add a Fixes: tag for the commit that introduced the
issue.
> In this case, from a quick look, one is for the current release, so it
> doesn't need backport, and the other would need a custom one (since
> this commit wouldn't apply) if someone wants to do Option 3.
I could be wrong, but I think in trivial cases (such as code moves) the stable
team does derive custom commits themselves.
@Greg, Sasha: Is this something you prefer to do or is it something you just do
because it's easier / quicker than to get back and ask for a custom commit?
Again, I could also remember this wrongly, but I think I just recently reviewed
such a commit from Sasha. :)
>> Should I do that in the same commit?
That seems reasonable in this case, please do so.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-04 14:08 ` Danilo Krummrich
@ 2026-01-04 18:30 ` Miguel Ojeda
2026-01-05 6:25 ` Greg KH
0 siblings, 1 reply; 12+ messages in thread
From: Miguel Ojeda @ 2026-01-04 18:30 UTC (permalink / raw)
To: Danilo Krummrich
Cc: gregkh, sashal, Marko Turk, Dirk Behme, dirk.behme, linux-pci,
linux-kernel, rust-for-linux, stable
On Sun, Jan 4, 2026 at 3:08 PM Danilo Krummrich <dakr@kernel.org> wrote:
>
> In general I prefer to only add a Fixes: tag for the commit that introduced the
> issue.
If their scripts track moves well, then it is great to avoid it, but I
am not sure how well that works or not or in which cases, i.e. it
could look like two different commits introduced the issue and thus
one backport could be missed. Not sure.
> Again, I could also remember this wrongly, but I think I just recently reviewed
> such a commit from Sasha. :)
Hmm... I also had a few cases where Sasha autoapplied, but in most
cases, I had to provide custom patches when they didn't apply cleanly,
even trivial ones.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-04 18:30 ` Miguel Ojeda
@ 2026-01-05 6:25 ` Greg KH
2026-01-05 10:39 ` Miguel Ojeda
0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2026-01-05 6:25 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Danilo Krummrich, sashal, Marko Turk, Dirk Behme, dirk.behme,
linux-pci, linux-kernel, rust-for-linux, stable
On Sun, Jan 04, 2026 at 07:30:22PM +0100, Miguel Ojeda wrote:
> On Sun, Jan 4, 2026 at 3:08 PM Danilo Krummrich <dakr@kernel.org> wrote:
> >
> > In general I prefer to only add a Fixes: tag for the commit that introduced the
> > issue.
>
> If their scripts track moves well, then it is great to avoid it, but I
> am not sure how well that works or not or in which cases, i.e. it
> could look like two different commits introduced the issue and thus
> one backport could be missed. Not sure.
>
> > Again, I could also remember this wrongly, but I think I just recently reviewed
> > such a commit from Sasha. :)
>
> Hmm... I also had a few cases where Sasha autoapplied, but in most
> cases, I had to provide custom patches when they didn't apply cleanly,
> even trivial ones.
It all depends, sometimes we can handle file moves easily, sometimes we
can not.
But really, why is a comment typo being needed in stable kernels?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-05 6:25 ` Greg KH
@ 2026-01-05 10:39 ` Miguel Ojeda
2026-01-05 12:38 ` Danilo Krummrich
0 siblings, 1 reply; 12+ messages in thread
From: Miguel Ojeda @ 2026-01-05 10:39 UTC (permalink / raw)
To: Greg KH
Cc: Danilo Krummrich, sashal, Marko Turk, Dirk Behme, dirk.behme,
linux-pci, linux-kernel, rust-for-linux, stable
On Mon, Jan 5, 2026 at 7:25 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> It all depends, sometimes we can handle file moves easily, sometimes we
> can not.
>
> But really, why is a comment typo being needed in stable kernels?
It isn't (well, it is not just a comment since it does end up in the
rendered docs, so it is a bit more "visible" than in a comment, and I
imagine some projects reasonably treat them as a fix, but still, it is
just a typo).
We discussed this years ago when I noticed a typo being picked up by
stable since I wondered why. On my side, I am happy either way -- what
I currently do is explicitly tag the ones that appear in docs. That
way you can decide on your side.
For the others (the ones in comments), I think it is not really worth
it to even figure out a Fixes: tag etc.
Of course, this is for trivial typos -- for something that e.g.
completely changes the requirements of a `# Safety` precondition the
story is different.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] rust: pci: fix typo in Bar struct's comment
2026-01-05 10:39 ` Miguel Ojeda
@ 2026-01-05 12:38 ` Danilo Krummrich
0 siblings, 0 replies; 12+ messages in thread
From: Danilo Krummrich @ 2026-01-05 12:38 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Greg KH, sashal, Marko Turk, Dirk Behme, dirk.behme, linux-pci,
linux-kernel, rust-for-linux, stable
On Mon Jan 5, 2026 at 11:39 AM CET, Miguel Ojeda wrote:
> On my side, I am happy either way -- what I currently do is explicitly tag the
> ones that appear in docs. That way you can decide on your side.
This is how I handle it as well. For doc-comments I request a Fixes: tag to be
added and leave it to the stable team to decide.
Unless explicitly requested by the stable team (which obviously did not happen
so far) I do not send separate backport patches for typos when the upstream
commit does not apply though.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] rust: io: fix Bar reference in Io struct's comment
2026-01-03 14:31 [PATCH 1/2] rust: io: fix Bar reference in Io struct's comment Marko Turk
2026-01-03 14:31 ` [PATCH 2/2] rust: pci: fix typo in Bar " Marko Turk
@ 2026-01-03 15:22 ` Danilo Krummrich
1 sibling, 0 replies; 12+ messages in thread
From: Danilo Krummrich @ 2026-01-03 15:22 UTC (permalink / raw)
To: Marko Turk; +Cc: dirk.behme, linux-pci, linux-kernel, rust-for-linux
On Sat Jan 3, 2026 at 3:31 PM CET, Marko Turk wrote:
> Bar was moved to a separate pci::io module, update the reference to it.
>
> Signed-off-by: Marko Turk <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..08853f32dae6 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::io::Bar`] for a real example.
pci::io::Bar is re-exported as pci::Bar [1], so this should be fine. Given that
it is not a doc-comment the reference also doesn't do anything. We could remove
the square brackets accordingly.
[1] https://rust.docs.kernel.org/src/kernel/pci.rs.html#43
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-01-05 12:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-03 14:31 [PATCH 1/2] rust: io: fix Bar reference in Io struct's comment Marko Turk
2026-01-03 14:31 ` [PATCH 2/2] rust: pci: fix typo in Bar " Marko Turk
2026-01-03 15:24 ` Danilo Krummrich
2026-01-03 15:38 ` Dirk Behme
2026-01-03 21:16 ` Marko Turk
2026-01-04 12:45 ` Miguel Ojeda
2026-01-04 14:08 ` Danilo Krummrich
2026-01-04 18:30 ` Miguel Ojeda
2026-01-05 6:25 ` Greg KH
2026-01-05 10:39 ` Miguel Ojeda
2026-01-05 12:38 ` Danilo Krummrich
2026-01-03 15:22 ` [PATCH 1/2] rust: io: fix Bar reference in Io " Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox