Skip to contentSkip to conversation

drm/amdgpu: fix a bogus warning

PATCH In review Alex Deucher 3 participants 3 messages Aug 17, 2017 – Aug 18, 2017 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu: fix a bogus warning

Don't validate the default value. Prevents a needless warning. Also fix a spelling typo in the warning message.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
index 2554ddf..1a459ac 100644
@@ -1077,8 +1077,9 @@ static void amdgpu_check_arguments(struct amdgpu_device *adev)
 	}
 
 	/* valid range is between 4 and 9 inclusive */
-	if (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4) {
-		dev_warn(adev->dev, "valid rang is between 4 and 9\n");
+	if (amdgpu_vm_fragment_size != -1 &&
+	    (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4)) {
+		dev_warn(adev->dev, "valid range is between 4 and 9\n");
 		amdgpu_vm_fragment_size = -1;
 	}
 
Signature · 6 lines
2.5.5

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

A message that is not in the archive (sent off-list or not yet received): 1503002652-19818-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Thursday, August 17, 2017 4:44 PM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH] drm/amdgpu: fix a bogus warning

Don't validate the default value. Prevents a needless warning. Also fix a spelling typo in the warning message.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
index 2554ddf..1a459ac 100644
@@ -1077,8 +1077,9 @@ static void amdgpu_check_arguments(struct amdgpu_device *adev)
         }
 
         /* valid range is between 4 and 9 inclusive */
-       if (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4) {
-               dev_warn(adev->dev, "valid rang is between 4 and 9\n");
+       if (amdgpu_vm_fragment_size != -1 &&
+           (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4)) {
+               dev_warn(adev->dev, "valid range is between 4 and 9\n");
                 amdgpu_vm_fragment_size = -1;
         }
 

--
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...

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

A message that is not in the archive (sent off-list or not yet received): DM5PR12MB1257A35DEC0C4086F7D9D16EF2830-2J9CzHegvk/[email protected]

Reviewed-by
#4 lore raw

Am 17.08.2017 um 23:03 schrieb Xie, AlexBin:

Quoted 35 lines

------------------------------------------------------------------------
*From:* amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]> *Sent:* Thursday, August 17, 2017 4:44 PM
*To:* [email protected]
*Cc:* Deucher, Alexander
*Subject:* [PATCH] drm/amdgpu: fix a bogus warning
Don't validate the default value. Prevents a needless
warning. Also fix a spelling typo in the warning message.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
index 2554ddf..1a459ac 100644
@@ -1077,8 +1077,9 @@ static void amdgpu_check_arguments(struct 
 amdgpu_device *adev)
         }
 
         /* valid range is between 4 and 9 inclusive */
-       if (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4) {
-               dev_warn(adev->dev, "valid rang is between 4 and 9\n");
+       if (amdgpu_vm_fragment_size != -1 &&
+           (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 
 4)) {
+               dev_warn(adev->dev, "valid range is between 4 and 9\n");
                 amdgpu_vm_fragment_size = -1;
Quoted 21 lines
         }
Signature · 18 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...





_______________________________________________
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