From patchwork Fri Apr 5 18:40:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Singh Rawat X-Patchwork-Id: 10887731 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 16CC71708 for ; Fri, 5 Apr 2019 18:40:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0041B28AF3 for ; Fri, 5 Apr 2019 18:40:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E882228AB7; Fri, 5 Apr 2019 18:40:39 +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,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 9C77F28AB7 for ; Fri, 5 Apr 2019 18:40:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BCF6389FA0; Fri, 5 Apr 2019 18:40:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0623.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::623]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A47E89FA6 for ; Fri, 5 Apr 2019 18:40:37 +0000 (UTC) Received: from BL0PR05MB5233.namprd05.prod.outlook.com (20.177.242.28) by BL0PR05MB5330.namprd05.prod.outlook.com (10.167.233.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.15; Fri, 5 Apr 2019 18:40:34 +0000 Received: from BL0PR05MB5233.namprd05.prod.outlook.com ([fe80::40f5:3b8:9a54:9377]) by BL0PR05MB5233.namprd05.prod.outlook.com ([fe80::40f5:3b8:9a54:9377%7]) with mapi id 15.20.1771.014; Fri, 5 Apr 2019 18:40:34 +0000 From: Deepak Singh Rawat To: "dri-devel@lists.freedesktop.org" Subject: [PATCH 03/11] drm/vmwgfx: remove redundant unlikely annotation Thread-Topic: [PATCH 03/11] drm/vmwgfx: remove redundant unlikely annotation Thread-Index: AQHU698NUCKd+cIrgk2AzIdmO+9k3w== Date: Fri, 5 Apr 2019 18:40:34 +0000 Message-ID: <20190405184024.4452-3-drawat@vmware.com> References: <20190405184024.4452-1-drawat@vmware.com> In-Reply-To: <20190405184024.4452-1-drawat@vmware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR05CA0069.namprd05.prod.outlook.com (2603:10b6:a03:74::46) To BL0PR05MB5233.namprd05.prod.outlook.com (2603:10b6:208:88::28) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [66.170.99.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1a794c04-d67c-4c90-ccda-08d6b9f62e6c x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:BL0PR05MB5330; x-ms-traffictypediagnostic: BL0PR05MB5330: x-ld-processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0998671D02 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(39860400002)(346002)(366004)(376002)(189003)(199004)(102836004)(107886003)(25786009)(3846002)(316002)(5640700003)(7736002)(6116002)(36756003)(26005)(81156014)(8936002)(2906002)(50226002)(6436002)(8676002)(81166006)(6506007)(1076003)(4326008)(68736007)(76176011)(71200400001)(256004)(54906003)(386003)(86362001)(305945005)(71190400001)(6486002)(5660300002)(2501003)(99286004)(14454004)(97736004)(105586002)(186003)(2351001)(6916009)(6512007)(52116002)(106356001)(66066001)(2616005)(476003)(446003)(11346002)(53936002)(486006)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR05MB5330; H:BL0PR05MB5233.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: DkFsmKIAnedQp56GsAuTRhC8iwZE/bHkbS/WuaEC0suntGYofFrJEWVw4cZzUAA3GPvWm7gdXYHWU/asuI7uASGmA3hcVBZJvzldSyfkcIakvOjrQt5XRwow4HfN2cZQLEq59EPs86lk0Ghk4lDifHZX1VDOLOAYoqS9d6WPLJQ65tz/R6gZgkSBY2oL7n2Z/gRm3XIWanUv3shVht79t8d6kjBYBFuxHHgSotv7KSJgO32rPci4vbcUn9BZVlBSHyVJEMia2m9WojA3WO+5QoQWVrtdt2mc4XmCXdCWWuFCiddMo9uNToi/ft4ot2SbZ7sXc/QtZjhrTMOVp+ZnXFk4FvqTeqfXghnKCwtKmaOmQR6ybHSueMuLISgvyki6gvlwxabAASOOKvfMJr7+e3wOHniQWkApqrLV5z2HE2g= MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a794c04-d67c-4c90-ccda-08d6b9f62e6c X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2019 18:40:34.2831 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR05MB5330 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qXBUwBKSnLBrol1QON74abtg2+eA9IGlOiG7CR8qczA=; b=rH9W3gm10U+KBrT8bxFXzYqU+dYhB8KllFL7G0L4Mqga6odL0VvjoFR3bDkaps1MdgY10Jkmca+V+Wjbsha1dJpK8mVTj1IJKPuR2evYLuQOLICiNhElWu+vwQ/CogphHRr7LbnwtX/BRcvPUFjmxedSDA4h4qkz0ZAfg79btwY= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=drawat@vmware.com; 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 , Deepak Singh Rawat , Linux-graphics-maintainer Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Chengguang Xu unlikely has already included in IS_ERR(), so just remove redundant unlikely annotation. Signed-off-by: Chengguang Xu Reviewed-by: Deepak Rawat Signed-off-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 dc5698fbb654..4955a48a9d86 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c @@ -660,7 +660,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); @@ -3835,7 +3835,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);