public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau: fix misleading indentation
@ 2026-03-13  6:32 Joey Pabalinas
  2026-03-13 21:24 ` Claude review: " Claude Code Review Bot
  2026-03-13 21:24 ` Claude Code Review Bot
  0 siblings, 2 replies; 3+ messages in thread
From: Joey Pabalinas @ 2026-03-13  6:32 UTC (permalink / raw)
  To: nouveau
  Cc: linux-kernel, dri-devel, Lyude Paul, Danilo Krummrich,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Joey Pabalinas

[-- Attachment #1: Type: text/plain, Size: 3359 bytes --]

Fix misleading indentation in if/else statements.

Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
---
 drivers/gpu/drm/nouveau/nouveau_abi16.c | 49 ++++++++++++-------------
 1 file changed, 24 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index f9201f2e73a339a10b..3da75aa136d04faf3b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -425,14 +425,14 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
 
 	if (device->info.family >= NV_DEVICE_INFO_V0_TESLA)
 		init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM |
 					NOUVEAU_GEM_DOMAIN_GART;
 	else
-	if (chan->chan->push.buffer->bo.resource->mem_type == TTM_PL_VRAM)
-		init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM;
-	else
-		init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART;
+		if (chan->chan->push.buffer->bo.resource->mem_type == TTM_PL_VRAM)
+			init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM;
+		else
+			init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART;
 
 	if (device->info.family < NV_DEVICE_INFO_V0_CELSIUS) {
 		init->subchan[0].handle = 0x00000000;
 		init->subchan[0].grclass = 0x0000;
 		init->subchan[1].handle = chan->chan->nvsw.handle;
@@ -579,21 +579,20 @@ nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS)
 				oclass = sclass[i].oclass;
 				break;
 			}
 		}
 	} else
-	if ((init->class & 0x00ff) == 0x00b3) { /* msppp */
-		/* msppp: compatibility with incorrect version exposure */
-		for (i = 0; i < ret; i++) {
-			if ((sclass[i].oclass & 0x00ff) == 0x00b3) {
-				oclass = sclass[i].oclass;
-				break;
+		if ((init->class & 0x00ff) == 0x00b3) { /* msppp */
+			/* msppp: compatibility with incorrect version exposure */
+			for (i = 0; i < ret; i++) {
+				if ((sclass[i].oclass & 0x00ff) == 0x00b3) {
+					oclass = sclass[i].oclass;
+					break;
+				}
 			}
-		}
-	} else {
-		oclass = init->class;
-	}
+		} else
+			oclass = init->class;
 
 	nvif_object_sclass_put(&sclass);
 	if (!oclass)
 		return nouveau_abi16_put(abi16, -EINVAL);
 
@@ -652,21 +651,21 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS)
 		args.target = NV_DMA_V0_TARGET_VM;
 		args.access = NV_DMA_V0_ACCESS_VM;
 		args.start += chan->ntfy_vma->addr;
 		args.limit += chan->ntfy_vma->addr;
 	} else
-	if (drm->agp.bridge) {
-		args.target = NV_DMA_V0_TARGET_AGP;
-		args.access = NV_DMA_V0_ACCESS_RDWR;
-		args.start += drm->agp.base + chan->ntfy->offset;
-		args.limit += drm->agp.base + chan->ntfy->offset;
-	} else {
-		args.target = NV_DMA_V0_TARGET_VM;
-		args.access = NV_DMA_V0_ACCESS_RDWR;
-		args.start += chan->ntfy->offset;
-		args.limit += chan->ntfy->offset;
-	}
+		if (drm->agp.bridge) {
+			args.target = NV_DMA_V0_TARGET_AGP;
+			args.access = NV_DMA_V0_ACCESS_RDWR;
+			args.start += drm->agp.base + chan->ntfy->offset;
+			args.limit += drm->agp.base + chan->ntfy->offset;
+		} else {
+			args.target = NV_DMA_V0_TARGET_VM;
+			args.access = NV_DMA_V0_ACCESS_RDWR;
+			args.start += chan->ntfy->offset;
+			args.limit += chan->ntfy->offset;
+		}
 
 	ret = nvif_object_ctor(&chan->chan->user, "abi16Ntfy", info->handle,
 			       NV_DMA_IN_MEMORY, &args, sizeof(args),
 			       &ntfy->object);
 	if (ret)
-- 
Cheers,
Joey Pabalinas


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 870 bytes --]

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

end of thread, other threads:[~2026-03-13 21:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13  6:32 [PATCH] drm/nouveau: fix misleading indentation Joey Pabalinas
2026-03-13 21:24 ` Claude review: " Claude Code Review Bot
2026-03-13 21:24 ` Claude Code Review Bot

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