From patchwork Thu Feb 21 02:09:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10823783 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C50213A4 for ; Thu, 21 Feb 2019 11:27:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D7463084F for ; Thu, 21 Feb 2019 11:27:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BCD330853; Thu, 21 Feb 2019 11:27:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E01A330850 for ; Thu, 21 Feb 2019 11:27:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 324B789395; Thu, 21 Feb 2019 11:27:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id E2324891EF for ; Thu, 21 Feb 2019 02:10:15 +0000 (UTC) Received: from localhost.localdomain ([218.18.229.179]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MbKXI-1ge1250rQa-00IpWB; Thu, 21 Feb 2019 03:10:10 +0100 From: Chengguang Xu To: linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH] drm/vmwgfx: remove redundant unlikely annotation Date: Thu, 21 Feb 2019 10:09:40 +0800 Message-Id: <20190221020940.21899-1-cgxu519@gmx.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:FNm0tyeMQL4IzD3dRaxuJsG6pdw/RtCil1aRHhdyfILF+dQlu4P ZX69rPjrQkd6yQBxxxM8UiFJAfBWV60B5qq8XKtvVKxwEAKyDs7hsYKyM11eOgKxBngiWOA DOU75midsyZGKei8cKqSc6uTLdw2egbOWvliwyMgRIvq3Z0x2p3dPPrNFLChLgNVDbbbjk8 n+m9LXhT6aflLTsI0qCTw== X-UI-Out-Filterresults: notjunk:1;V03:K0:xFZo5zKinS4=:TKJVELo+YkLLseyUT8ZOwR ewvnC+BeSADQF7XMsLe17rAHqzuTHMnTgw8imesROEQNfFrLln3uRz9t628QVgjgdfuIURamv Tcf3a42sJpVIxm9NjRxofdPpD6EcnOWuZfMaUP/iBtOfA4X5iRGaHRnL9NI9EeQvMQOPdfPSB zv3mfxxiebrFA+6ySE6gOEYKvte0IQky1YU2zAIUTPaLVMSSBhNRxuMVIIJEqURCVOpoV4kLV lRBumInl+UvxKeysHJHiLhVFR8pAEODj7TIid8RU2+T4B3rYY+2czqWIrnoQ2RpgIDle07mmj oKIq4AkIym7mjhss1a93m8+1E9JWHGA7ZF4EcYMgKjFrzcdsz8FN2nzssnRCSIqBPGXfgNZ7V ye7fqFLvWtTXs8NtyqsjdMxiQgTnJRpcv6Ru+PuqxwbbAHqMwr88F+uOPyuq87yv/Gwb5Hwy8 x4PiIVYrknEi9ZYchPzzIkyfOaEOJEXmGBOUToOPkHcSNJCW7791cFxo2cJHzNKvx0w15eorU aTyLS/EIMqoc8EcaEIMs0JPHT/bJA6T+u09UTSngHKYW9K6R+hRzEPotu3HseSVHQXoSCzBgP vikF5FZ45xabjTOpzf5DqJ2Y+joZrS2PpPV0CeallThgrYvdL1OijPt83A/EY7Y77Fbe+vzdn 1DUgQeGb+MotQf8/H6dfDbuFJeH1gNm2Q+IBT5Ksjvs4Q2ueeHmvUwC6XUpkgEyqo7tNt4QBb +Xg1+i+sMSw5iXYgKWN0inOGx5DsfNW2rmKJ05oJ/jLwuZ24A1DwHFJ5O9LqZDNI0hmwIiYKD 0nr9r6TT80Lc4wWZi3wM9ftkZFNnS8YKIAEpedOrNqRdqCxdII7EIsooVIpKkpdnAAUH/Yp04 303sWXKqBiPnMxLFFJPd+SfSM4H3n2qaUX54yWIlf8ZhBXdnG+Hv7xQqfDwc05 X-Mailman-Approved-At: Thu, 21 Feb 2019 11:27:47 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chengguang Xu , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP unlikely has already included in IS_ERR(), so just remove redundant unlikely annotation. Signed-off-by: Chengguang Xu Reviewed-by: Deepak Rawat --- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c index 14bd760a62fd..694fabafaeee 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c @@ -210,7 +210,7 @@ static int vmw_gb_context_init(struct vmw_private *dev_priv, for (i = 0; i < SVGA_COTABLE_DX10_MAX; ++i) { uctx->cotables[i] = vmw_cotable_alloc(dev_priv, &uctx->res, i); - if (unlikely(IS_ERR(uctx->cotables[i]))) { + if (IS_ERR(uctx->cotables[i])) { ret = PTR_ERR(uctx->cotables[i]); goto out_cotables; } diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 88b8178d4687..1cde07cf3067 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c @@ -638,7 +638,7 @@ vmw_cmd_res_check(struct vmw_private *dev_priv, res = vmw_user_resource_noref_lookup_handle (dev_priv, sw_context->fp->tfile, *id_loc, converter); - if (unlikely(IS_ERR(res))) { + if (IS_ERR(res)) { DRM_ERROR("Could not find or use resource 0x%08x.\n", (unsigned int) *id_loc); return PTR_ERR(res); @@ -3799,7 +3799,7 @@ static int vmw_execbuf_tie_context(struct vmw_private *dev_priv, res = vmw_user_resource_noref_lookup_handle (dev_priv, sw_context->fp->tfile, handle, user_context_converter); - if (unlikely(IS_ERR(res))) { + if (IS_ERR(res)) { DRM_ERROR("Could not find or user DX context 0x%08x.\n", (unsigned) handle); return PTR_ERR(res);