Skip to contentSkip to conversation

drm/amdgpu: remove unused variable

PATCH In review Alex Deucher 4 participants 5 messages Feb 27, 2020 – Feb 28, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: remove unused variable

Fixes a warning.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
index bec4337156a7..b3e32969eb7f 100644
@@ -1131,7 +1131,6 @@ static void
 amdgpu_pci_remove(struct pci_dev *pdev)
 {
 	struct drm_device *dev = pci_get_drvdata(pdev);
-	struct amdgpu_device *adev = dev->dev_private;
 
 #ifdef MODULE
 	if (THIS_MODULE->state != MODULE_STATE_GOING)
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

PATCH 2/2 drm/amdgpu/gfx: fix indentation in new rlc spm code

fixes warnings with -Wmisleading-indentation.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +++---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c  | 6 +++---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 6 +++---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +3 -3
index cb3421e25adc..0dc3ed694fe8 100644
@@ -1016,9 +1016,9 @@ static int gfx_v10_0_rlc_init(struct amdgpu_device *adev)
 			return r;
 	}
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +3 -3
index 397c62c58436..733d398c61cc 100644
@@ -3346,9 +3346,9 @@ static int gfx_v7_0_rlc_init(struct amdgpu_device *adev)
 			return r;
 	}
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3 -3
index 294abff9efb7..393a1324daa9 100644
@@ -1318,9 +1318,9 @@ static int gfx_v8_0_rlc_init(struct amdgpu_device *adev)
 			return r;
 	}
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +3 -3
index 1d5fd5f17a30..9962ef80da92 100644
@@ -1847,9 +1847,9 @@ static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
 		break;
 	}
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
 	return 0;
 }
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw

Re: [PATCH 2/2] drm/amdgpu/gfx: fix indentation in new rlc spm code

series Reviewed-by:Nirmoy Das <[email protected]>

Quoted 68 lines · Alex Deucher

fixes warnings with -Wmisleading-indentation.

---
  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +++---
  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c  | 6 +++---
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 6 +++---
  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 6 +++---
  4 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +3 -3
index cb3421e25adc..0dc3ed694fe8 100644
@@ -1016,9 +1016,9 @@ static int gfx_v10_0_rlc_init(struct amdgpu_device *adev)
  			return r;
  	}
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
  	return 0;
  }
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +3 -3
index 397c62c58436..733d398c61cc 100644
@@ -3346,9 +3346,9 @@ static int gfx_v7_0_rlc_init(struct amdgpu_device *adev)
  			return r;
  	}
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
  	return 0;
  }
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3 -3
index 294abff9efb7..393a1324daa9 100644
@@ -1318,9 +1318,9 @@ static int gfx_v8_0_rlc_init(struct amdgpu_device *adev)
  			return r;
  	}
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
  	return 0;
  }
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -0
index 1d5fd5f17a30..9962ef80da92 100644
@@ -1847,9 +1847,9 @@ static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
  		break;
  	}

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_rlc_init(struct amdgpu_device *adev) · line 1855

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +3 -3
 
-    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
+	/* init spm vmid with 0xf */
+	if (adev->gfx.rlc.funcs->update_spm_vmid)
+		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
 
  	return 0;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw

Re: [PATCH 2/2] drm/amdgpu/gfx: fix indentation in new rlc spm code

Series is Reviewed-by: Christian König <[email protected]> as well.

Am 27.02.20 um 21:33 schrieb Nirmoy:

Quoted 73 lines

series Reviewed-by:Nirmoy Das <[email protected]>

Quoted 70 lines · Alex Deucher

fixes warnings with -Wmisleading-indentation.

---
  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +++---

  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c  | 6 +++---
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 6 +++---
  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c  | 6 +++---
  4 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0 -0
index cb3421e25adc..0dc3ed694fe8 100644
@@ -1016,9 +1016,9 @@ static int gfx_v10_0_rlc_init(struct 
 amdgpu_device *adev)
               return r;
       }

  -    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); +    /* init spm vmid with 0xf */
+    if (adev->gfx.rlc.funcs->update_spm_vmid)
+        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); return 0;
  }

drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +0 -0
index 397c62c58436..733d398c61cc 100644
@@ -3346,9 +3346,9 @@ static int gfx_v7_0_rlc_init(struct 
 amdgpu_device *adev)
               return r;
       }

  -    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); +    /* init spm vmid with 0xf */
+    if (adev->gfx.rlc.funcs->update_spm_vmid)
+        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); return 0;
  }

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -0
index 294abff9efb7..393a1324daa9 100644
@@ -1318,9 +1318,9 @@ static int gfx_v8_0_rlc_init(struct 
 amdgpu_device *adev)
               return r;
       }

  -    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); +    /* init spm vmid with 0xf */
+    if (adev->gfx.rlc.funcs->update_spm_vmid)
+        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); return 0;
  }

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -0
index 1d5fd5f17a30..9962ef80da92 100644
@@ -1847,9 +1847,9 @@ static int gfx_v9_0_rlc_init(struct 
 amdgpu_device *adev)
           break;
       }

  -    /* init spm vmid with 0xf */
-    if (adev->gfx.rlc.funcs->update_spm_vmid)
-        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); +    /* init spm vmid with 0xf */

Quoted 8 lines
Quoted 4 lines

+    if (adev->gfx.rlc.funcs->update_spm_vmid)
+        adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf); return 0;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by on v1 1/2
#4 lore raw
In reply to Alex Deucher

[AMD Official Use Only - Internal Distribution Only]

________________________________
From: amd-gfx <[email protected]> on behalf of Alex Deucher <[email protected]>
Sent: Thursday, February 27, 2020 3:14 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: remove unused variable

Fixes a warning.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
index bec4337156a7..b3e32969eb7f 100644
@@ -1131,7 +1131,6 @@ static void
 amdgpu_pci_remove(struct pci_dev *pdev)
 {
         struct drm_device *dev = pci_get_drvdata(pdev);
-       struct amdgpu_device *adev = dev->dev_private;
 
 #ifdef MODULE
         if (THIS_MODULE->state != MODULE_STATE_GOING)

--
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cyong.zhao%40amd.com%7Ca4b7a490c31647472ca608d7bbc1bc24%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637184313087705310&amp;sdata=LNUqZiHj4Ey7KHjtp1o2c%2BpYO87JeL61VAYfNwNiE0Q%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx