Convert all imports in the devres to use "kernel vertical" style.
Cc: Gary Guo <gary@garyguo.net>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Zhi Wang <zhiw@nvidia.com>
---
rust/kernel/devres.rs | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/rust/kernel/devres.rs b/rust/kernel/devres.rs
index db02f8b1788d..43089511bf76 100644
--- a/rust/kernel/devres.rs
+++ b/rust/kernel/devres.rs
@@ -254,8 +254,12 @@ pub fn device(&self) -> &Device {
/// # Examples
///
/// ```no_run
- /// # #![cfg(CONFIG_PCI)]
- /// # use kernel::{device::Core, devres::Devres, pci};
+ /// #![cfg(CONFIG_PCI)]
+ /// use kernel::{
+ /// device::Core,
+ /// devres::Devres,
+ /// pci, //
+ /// };
///
/// fn from_core(dev: &pci::Device<Core>, devres: Devres<pci::Bar<0x4>>) -> Result {
/// let bar = devres.access(dev.as_ref())?;
@@ -358,7 +362,13 @@ fn register_foreign<P>(dev: &Device<Bound>, data: P) -> Result
/// # Examples
///
/// ```no_run
-/// use kernel::{device::{Bound, Device}, devres};
+/// use kernel::{
+/// device::{
+/// Bound,
+/// Device, //
+/// },
+/// devres, //
+/// };
///
/// /// Registration of e.g. a class device, IRQ, etc.
/// struct Registration;
--
2.51.0
On Mon, Jan 19, 2026 at 9:23 PM Zhi Wang <zhiw@nvidia.com> wrote: > > Convert all imports in the devres to use "kernel vertical" style. > > Cc: Gary Guo <gary@garyguo.net> > Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> This looks fine, thanks! (Not sure why the Cc:s are explicit here but, by the way, perhaps you may want to use the `.mailmap` if you have some automation so that you use e.g. my ojeda@kernel.org one instead). Cheers, Miguel
On Tue, 20 Jan 2026 17:11:38 +0100 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote: > On Mon, Jan 19, 2026 at 9:23 PM Zhi Wang <zhiw@nvidia.com> wrote: > > > > Convert all imports in the devres to use "kernel vertical" style. > > > > Cc: Gary Guo <gary@garyguo.net> > > Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> > > This looks fine, thanks! > > (Not sure why the Cc:s are explicit here but, by the way, perhaps you > may want to use the `.mailmap` if you have some automation so that you > use e.g. my ojeda@kernel.org one instead). > Sure.I am trying to Cc folks who comments in the patch for crediting their efforts. :) > Cheers, > Miguel
On Wed, Jan 21, 2026 at 10:30 AM Zhi Wang <zhiw@nvidia.com> wrote: > > Sure.I am trying to Cc folks who comments in the patch for crediting > their efforts. :) Ah, I see, thanks. As far as I understand the docs, Cc: is intended to document in the commit message that someone had the chance to discuss the patch. I can see that, if someone gave feedback in a previous version, then it is a way to say that they had the chance to review the new version, so that makes sense. Having said that, if we did systematically that, the list of explicit Cc's would grow quite a bit... Personally, I always understood the tag as meant for key stakeholders that you really want to explicitly mention in the commit message as having been involved (and that didn't otherwise give another tag at the end of the process), versus everyone else that is Cc as usual in the email headers. But I have seen it used in different ways in the kernel... :) Cheers, Miguel
On 1/21/26 5:55 PM, Miguel Ojeda wrote: > On Wed, Jan 21, 2026 at 10:30 AM Zhi Wang <zhiw@nvidia.com> wrote: >> >> Sure.I am trying to Cc folks who comments in the patch for crediting >> their efforts. :) > > Ah, I see, thanks. > > As far as I understand the docs, Cc: is intended to document in the > commit message that someone had the chance to discuss the patch. > > I can see that, if someone gave feedback in a previous version, then > it is a way to say that they had the chance to review the new version, > so that makes sense. Having said that, if we did systematically that, > the list of explicit Cc's would grow quite a bit... Yes. But for smaller discussions, this is effectively a convenient way to implement your guideline below, without having to spend too much time mentally weighing "which of these replies is from a Real Stakeholder". So it's reasonable approximate guideline to use in many situations. In other words, "not quite systematically" seems about right. > > Personally, I always understood the tag as meant for key stakeholders > that you really want to explicitly mention in the commit message as > having been involved (and that didn't otherwise give another tag at > the end of the process), versus everyone else that is Cc as usual in > the email headers. > Yes. > But I have seen it used in different ways in the kernel... :) Yes, and in particular, there is a mini-trend to include everyone from scripts/get_maintainer.pl's output, as a Cc, even on v0 of a series, before any discussion. That can bloat the commit log really heavily, and people are mildly pushing back against it. I'm glad we aren't doing that here. thanks, -- John Hubbard
On Thu Jan 22, 2026 at 3:24 AM CET, John Hubbard wrote: > Yes, and in particular, there is a mini-trend to include everyone > from scripts/get_maintainer.pl's output, as a Cc, even on v0 of a > series, before any discussion. That can bloat the commit log really > heavily, and people are mildly pushing back against it. I'm glad > we aren't doing that here. I think it depends on what you mean with "we". In the end it really depends on the particular subsystem. For instance, MM tends to add Cc: tags when a patch is applied for everyone that patch was sent to before. Whereas for the subsystems I (co-)maintain it would at least raise eyebrows and likely result in a kind request asking not to do it. > Yes. But for smaller discussions, this is effectively a convenient way > to implement your guideline below, without having to spend too much time > mentally weighing "which of these replies is from a Real Stakeholder". > > So it's reasonable approximate guideline to use in many situations. > In other words, "not quite systematically" seems about right. I don't mind using Cc: tags in this paricular way, but it should be noted that it shifts the semantics of those tags from "those people should really get a chance to comment before this is merged" to "those people should get a chance to follow-up given that they have been providing feedback on a previous version".
On Mon Jan 19, 2026 at 8:22 PM GMT, Zhi Wang wrote: > Convert all imports in the devres to use "kernel vertical" style. > > Cc: Gary Guo <gary@garyguo.net> > Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> > Signed-off-by: Zhi Wang <zhiw@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> > --- > rust/kernel/devres.rs | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-)
© 2016 - 2026 Red Hat, Inc.