drm/amdgpu: Fix get each xcp macro
authorjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:02:18 +0000 (02:02 +0000)
committerjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:02:18 +0000 (02:02 +0000)
From Asad Kamal
7879ad0aa996dc0c66950a6416e0ae227288f362 in linux-6.6.y/6.6.55
ef126c06a98bde1a41303970eb0fc0ac33c3cc02 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_xcp.h

index f466e26..d8fd0a7 100644 (file)
@@ -179,6 +179,6 @@ amdgpu_get_next_xcp(struct amdgpu_xcp_mgr *xcp_mgr, int *from)
 
 #define for_each_xcp(xcp_mgr, xcp, i)                            \
        for (i = 0, xcp = amdgpu_get_next_xcp(xcp_mgr, &i); xcp; \
-            xcp = amdgpu_get_next_xcp(xcp_mgr, &i))
+            ++i, xcp = amdgpu_get_next_xcp(xcp_mgr, &i))
 
 #endif