drm/i915: remove redundant likely/unlikely annotation
authorChengguang Xu <cgxu519@gmx.com>
Thu, 21 Feb 2019 02:08:19 +0000 (10:08 +0800)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Feb 2019 16:01:00 +0000 (16:01 +0000)
unlikely has already included in IS_ERR(), so just
remove redundant likely/unlikely annotation.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190221020819.21832-1-cgxu519@gmx.com
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_gtt.c

index 62e4df1cbf87429bafc0bca2c5cc1e4cdec53b16..2b261524cfa484c80562c302ce2bd439f7be0841 100644 (file)
@@ -2409,7 +2409,7 @@ rebuild_st:
                do {
                        cond_resched();
                        page = shmem_read_mapping_page_gfp(mapping, i, gfp);
-                       if (likely(!IS_ERR(page)))
+                       if (!IS_ERR(page))
                                break;
 
                        if (!*s) {
@@ -3884,7 +3884,7 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
        }
 
        vma = i915_vma_instance(obj, vm, view);
-       if (unlikely(IS_ERR(vma)))
+       if (IS_ERR(vma))
                return vma;
 
        if (i915_vma_misplaced(vma, size, alignment, flags)) {
index 02adcaf6ebea69086aa07be57fed55b347636c94..48b23c6a024e1f5937d7bb6a99d1e4af081713f5 100644 (file)
@@ -849,7 +849,7 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb)
                }
 
                vma = i915_vma_instance(obj, eb->vm, NULL);
-               if (unlikely(IS_ERR(vma))) {
+               if (IS_ERR(vma)) {
                        err = PTR_ERR(vma);
                        goto err_obj;
                }
index d646d37eec2f8a751a3a7f1642bae26841d2b24f..39671caab76b0c9c7bb62be9cfc6d10b9006b2b3 100644 (file)
@@ -3701,7 +3701,7 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma)
        }
 
        ret = 0;
-       if (unlikely(IS_ERR(vma->pages))) {
+       if (IS_ERR(vma->pages)) {
                ret = PTR_ERR(vma->pages);
                vma->pages = NULL;
                DRM_ERROR("Failed to get pages for VMA view type %u (%d)!\n",