Skip to contentSkip to conversation

drm/nouveau: remove unused increment in gm200_flcn_pio_imem_wr

PATCH RESEND In review Timur Tabi 2 participants 2 messages Jul 25, 2025 – Aug 1, 2025

Subsystems (3)
lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH RESEND 1/1 drm/nouveau: remove unused increment in gm200_flcn_pio_imem_wr

The 'tag' parameter is passed by value and is not actually used after being incremented, so remove the increment.

---
 drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c +1 -1
index f0acfaa153d1..7c43397c19e6 100644
@@ -103,7 +103,7 @@ gm200_flcn_pio_imem_wr_init(struct nvkm_falcon *falcon, u8 port, bool sec, u32 i
 static void
 gm200_flcn_pio_imem_wr(struct nvkm_falcon *falcon, u8 port, const u8 *img, int len, u16 tag)
 {
-	nvkm_falcon_wr32(falcon, 0x188 + (port * 0x10), tag++);
+	nvkm_falcon_wr32(falcon, 0x188 + (port * 0x10), tag);
 	while (len >= 4) {
 		nvkm_falcon_wr32(falcon, 0x184 + (port * 0x10), *(u32 *)img);
 		img += 4;

base-commit: 155a3c003e555a7300d156a5252c004c392ec6b0

Signature · 1 line
2.43.0
#1 lore raw

Hi Timur,

Please Cc the relevant maintainers when sending patches.

Quoted 2 lines · Timur Tabi

The 'tag' parameter is passed by value and is not actually used after being incremented, so remove the increment.

Good catch, but the commit message should also mention that the "actual" increment is in nvkm_falcon_pio_wr(), otherwise it throws up the question if the increment is missing somewhere else instead.

Quoted 20 lines
---
  drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c +1 -1
index f0acfaa153d1..7c43397c19e6 100644
@@ -103,7 +103,7 @@ gm200_flcn_pio_imem_wr_init(struct nvkm_falcon *falcon, u8 port, bool sec, u32 i
  static void
  gm200_flcn_pio_imem_wr(struct nvkm_falcon *falcon, u8 port, const u8 *img, int len, u16 tag)
  {
-	nvkm_falcon_wr32(falcon, 0x188 + (port * 0x10), tag++);
+	nvkm_falcon_wr32(falcon, 0x188 + (port * 0x10), tag);
  	while (len >= 4) {
  		nvkm_falcon_wr32(falcon, 0x184 + (port * 0x10), *(u32 *)img);
  		img += 4;

base-commit: 155a3c003e555a7300d156a5252c004c392ec6b0