Alexandre Courbot
2025-Dec-08 09:26 UTC
[PATCH 7/9] gpu: nova-core: firmware: fwsec: do not require bound device when unneeded
`run` doesn't require a bound device as its argument.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drivers/gpu/nova-core/firmware/fwsec.rs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/nova-core/firmware/fwsec.rs
b/drivers/gpu/nova-core/firmware/fwsec.rs
index b28e34d279f4..b98b1286dc94 100644
--- a/drivers/gpu/nova-core/firmware/fwsec.rs
+++ b/drivers/gpu/nova-core/firmware/fwsec.rs
@@ -412,12 +412,7 @@ pub(crate) fn new(
}
/// Loads the FWSEC firmware into `falcon` and execute it.
- pub(crate) fn run(
- &self,
- dev: &Device<device::Bound>,
- falcon: &Falcon<Gsp>,
- bar: &Bar0,
- ) -> Result<()> {
+ pub(crate) fn run(&self, dev: &Device, falcon:
&Falcon<Gsp>, bar: &Bar0) -> Result<()> {
// Reset falcon, load the firmware, and run it.
falcon
.reset(bar)
--
2.52.0
Timur Tabi
2025-Dec-08 16:18 UTC
[PATCH 7/9] gpu: nova-core: firmware: fwsec: do not require bound device when unneeded
On Mon, 2025-12-08 at 18:26 +0900, Alexandre Courbot wrote:> ???? /// Loads the FWSEC firmware into `falcon` and execute it. > -??? pub(crate) fn run( > -??????? &self, > -??????? dev: &Device<device::Bound>, > -??????? falcon: &Falcon<Gsp>, > -??????? bar: &Bar0, > -??? ) -> Result<()> { > +??? pub(crate) fn run(&self, dev: &Device, falcon: &Falcon<Gsp>, bar: &Bar0) -> Result<()> {I frequently see patches that, when they change the function signature, rearrange the parameters from one line to multiple lines. Here, you are doing the opposite. Not only that, but it seems unnecessary because you're actually just changing one parameter, so you should only be replacing one line. It seems to me that some people have their editors configured to prefer one line, and others have their editor configured to prefer multiple lines, so whenever there's a signature change, we get diffs like this.
lyude at redhat.com
2025-Dec-11 22:08 UTC
[PATCH 7/9] gpu: nova-core: firmware: fwsec: do not require bound device when unneeded
Reviewed-by: Lyude Paul <lyude at redhat.com> On Mon, 2025-12-08 at 18:26 +0900, Alexandre Courbot wrote:> `run` doesn't require a bound device as its argument. > > Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> > --- > ?drivers/gpu/nova-core/firmware/fwsec.rs | 7 +------ > ?1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/gpu/nova-core/firmware/fwsec.rs > b/drivers/gpu/nova-core/firmware/fwsec.rs > index b28e34d279f4..b98b1286dc94 100644 > --- a/drivers/gpu/nova-core/firmware/fwsec.rs > +++ b/drivers/gpu/nova-core/firmware/fwsec.rs > @@ -412,12 +412,7 @@ pub(crate) fn new( > ???? } > ? > ???? /// Loads the FWSEC firmware into `falcon` and execute it. > -??? pub(crate) fn run( > -??????? &self, > -??????? dev: &Device<device::Bound>, > -??????? falcon: &Falcon<Gsp>, > -??????? bar: &Bar0, > -??? ) -> Result<()> { > +??? pub(crate) fn run(&self, dev: &Device, falcon: &Falcon<Gsp>, > bar: &Bar0) -> Result<()> { > ???????? // Reset falcon, load the firmware, and run it. > ???????? falcon > ???????????? .reset(bar)