From patchwork Fri Jul 31 08:38:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51749 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id D2A2222A8D for ; Fri, 31 Jul 2015 08:39:36 +0000 (UTC) Received: by lbcjf8 with SMTP id jf8sf21863425lbc.0 for ; Fri, 31 Jul 2015 01:39:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=1xIvl59X36uvUh+buMovkMtxSsVQCC+r43ORUAMLwuc=; b=CbQMWKPqkYybtKHfahWrASBTAbkZm7f6taxT09vGUhjM9peo23QniRZ01TxoD8KMMx x40FuRP8LtCuZ+J4CMpWP8UkQyNFeEFZNxmuuY+QBLeNd9i9U6vbU+A9uvbMo1Tv5rr/ BGvdrCx8DQqvGwIktEoMtqESGF0yzUUb00jHy5L3PYyRepFbAM9FxoXiDaQGTM6X4/P0 g08/8nvZgKreR3SzyCpsmpfHytKiLYQNadpIyswQ0LxwfofJUQcOpQf4WUGqcRadS4fT X4Sy+RnO/ReE5cekoGhfQGkJE/4QmCjcwLZlEephRtXolrU9HHpSl8vbpm/R2xdaUOZy 5mMQ== X-Gm-Message-State: ALoCoQnuXOIPPqSjE4rkzs3e1RoTgcwAPovv18zroHlxlnf/upsUP5rLdH/pl0saZAWo7CKOJ/+k X-Received: by 10.112.16.200 with SMTP id i8mr573996lbd.20.1438331975712; Fri, 31 Jul 2015 01:39:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.47 with SMTP id u15ls241411laz.62.gmail; Fri, 31 Jul 2015 01:39:35 -0700 (PDT) X-Received: by 10.152.87.205 with SMTP id ba13mr1531667lab.37.1438331975365; Fri, 31 Jul 2015 01:39:35 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id ew10si3016550lac.11.2015.07.31.01.39.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 01:39:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by laah7 with SMTP id h7so39679357laa.0 for ; Fri, 31 Jul 2015 01:39:35 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr1565063lbc.41.1438331975035; Fri, 31 Jul 2015 01:39:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp227292lba; Fri, 31 Jul 2015 01:39:33 -0700 (PDT) X-Received: by 10.70.46.161 with SMTP id w1mr4584857pdm.66.1438331973757; Fri, 31 Jul 2015 01:39:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fs16si8861674pac.15.2015.07.31.01.39.32; Fri, 31 Jul 2015 01:39:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752911AbbGaIjY (ORCPT + 28 others); Fri, 31 Jul 2015 04:39:24 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:33670 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752784AbbGaIjU (ORCPT ); Fri, 31 Jul 2015 04:39:20 -0400 Received: by pdbnt7 with SMTP id nt7so39115413pdb.0 for ; Fri, 31 Jul 2015 01:39:20 -0700 (PDT) X-Received: by 10.70.39.74 with SMTP id n10mr4413936pdk.57.1438331960332; Fri, 31 Jul 2015 01:39:20 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id oq10sm6224523pdb.75.2015.07.31.01.39.19 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jul 2015 01:39:19 -0700 (PDT) From: Viresh Kumar To: akpm@linux-foundation.org Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar , Alexandre Courbot , Ben Skeggs , Dave Airlie , David Airlie , David Herrmann , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), Jakob Bornecrantz , Sinclair Yeh , Thomas Hellstrom Subject: [PATCH 04/15] drivers: gpu: Drop unlikely before IS_ERR(_OR_NULL) Date: Fri, 31 Jul 2015 14:08:24 +0530 Message-Id: <1b19585aab58d665973c475677ce5a80fc6aa48c.1438331416.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. Signed-off-by: Viresh Kumar --- drivers/gpu/drm/ttm/ttm_tt.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index bf080abc86d1..4e19d0f9cc30 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -340,7 +340,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) swap_storage = shmem_file_setup("ttm swap", ttm->num_pages << PAGE_SHIFT, 0); - if (unlikely(IS_ERR(swap_storage))) { + if (IS_ERR(swap_storage)) { pr_err("Failed allocating swap storage\n"); return PTR_ERR(swap_storage); } @@ -354,7 +354,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) if (unlikely(from_page == NULL)) continue; to_page = shmem_read_mapping_page(swap_space, i); - if (unlikely(IS_ERR(to_page))) { + if (IS_ERR(to_page)) { ret = PTR_ERR(to_page); goto out_err; } diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c index 5ac92874404d..44e6ecba3de7 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c @@ -159,7 +159,7 @@ static int vmw_gb_context_init(struct vmw_private *dev_priv, if (dev_priv->has_mob) { uctx->man = vmw_cmdbuf_res_man_create(dev_priv); - if (unlikely(IS_ERR(uctx->man))) { + if (IS_ERR(uctx->man)) { ret = PTR_ERR(uctx->man); uctx->man = NULL; goto out_err; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 620bb5cf617c..6218a36cf01a 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -1054,7 +1054,7 @@ static long vmw_generic_ioctl(struct file *filp, unsigned int cmd, return -EINVAL; vmaster = vmw_master_check(dev, file_priv, flags); - if (unlikely(IS_ERR(vmaster))) { + if (IS_ERR(vmaster)) { ret = PTR_ERR(vmaster); if (ret != -ERESTARTSYS)