Skip to contentSkip to conversation

drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR

PATCH In review Gustavo A. R. Silva 4 participants 4 messages Feb 14, 2018 – Feb 15, 2018

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

PATCH 1/1 drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR

Fix inconsistent IS_ERR and PTR_ERR in shrink_boom. The proper pointer to use is _explode_ instead of _purge_.

This issue was detected with the help of Coccinelle.

Fixes fe215c8bc426 ("drm/i915/selftests: add missing gtt shrinker test")
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +1 -1
index d806427..89b6ca9 100644
@@ -927,7 +927,7 @@ static int shrink_boom(struct drm_i915_private *i915,
 
 		explode = fake_dma_object(i915, size);
 		if (IS_ERR(explode)) {
-			err = PTR_ERR(purge);
+			err = PTR_ERR(explode);
 			goto err_purge;
 		}
 
Signature · 1 line
2.7.4
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in shrink_boom. The proper pointer to use is _explode_ instead of _purge_.

This issue was detected with the help of Coccinelle.

Fixes fe215c8bc426 ("drm/i915/selftests: add missing gtt shrinker test")

(Having some issues with fdo connections, thus not pushing.)

Quoted 16 lines
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +1 -1
index d806427..89b6ca9 100644
@@ -927,7 +927,7 @@ static int shrink_boom(struct drm_i915_private *i915,
 
 		explode = fake_dma_object(i915, size);
 		if (IS_ERR(explode)) {
-			err = PTR_ERR(purge);
+			err = PTR_ERR(explode);
 			goto err_purge;
 		}
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#2 lore raw
Quoted 4 lines · Jani Nikula
Quoted 3 lines · Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in shrink_boom. The proper pointer to use is _explode_ instead of _purge_.

Quoted 9 lines
Quoted 4 lines

This issue was detected with the help of Coccinelle.

Fixes fe215c8bc426 ("drm/i915/selftests: add missing gtt shrinker test")

(Having some issues with fdo connections, thus not pushing.)

Thanks, Jani
--
Gustavo

Quoted 17 lines
Quoted 16 lines
---
  drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +1 -1
index d806427..89b6ca9 100644
@@ -927,7 +927,7 @@ static int shrink_boom(struct drm_i915_private *i915,
 
  		explode = fake_dma_object(i915, size);
  		if (IS_ERR(explode)) {
-			err = PTR_ERR(purge);
+			err = PTR_ERR(explode);
  			goto err_purge;
  		}
#3 lore raw

Quoting Gustavo A. R. Silva (2018-02-15 16:09:09)

Quoted 12 lines · Jani Nikula
Quoted 9 lines · Gustavo A. R. Silva
Quoted 7 lines

Fix inconsistent IS_ERR and PTR_ERR in shrink_boom. The proper pointer to use is _explode_ instead of _purge_.

This issue was detected with the help of Coccinelle.

Fixes fe215c8bc426 ("drm/i915/selftests: add missing gtt shrinker test")
Quoted 6 lines
Quoted 4 lines

(Having some issues with fdo connections, thus not pushing.)

Thanks, Jani

And pushed, thanks for the patch and review.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx