From patchwork Wed Jan 23 00:28:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 10776795 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 936321399 for ; Wed, 23 Jan 2019 08:36:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83E61283F1 for ; Wed, 23 Jan 2019 08:36:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78379291B3; Wed, 23 Jan 2019 08:36:11 +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 36A97283F1 for ; Wed, 23 Jan 2019 08:36:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C2856EE7F; Wed, 23 Jan 2019 08:35:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1259 seconds by postgrey-1.36 at gabe; Wed, 23 Jan 2019 00:49:06 UTC Received: from gateway31.websitewelcome.com (gateway31.websitewelcome.com [192.185.144.219]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9D3F26E480 for ; Wed, 23 Jan 2019 00:49:06 +0000 (UTC) Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway31.websitewelcome.com (Postfix) with ESMTP id D4A2A50CA1 for ; Tue, 22 Jan 2019 18:28:05 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id m6Ojg8iXHiQerm6OjgSE6g; Tue, 22 Jan 2019 18:28:05 -0600 X-Authority-Reason: nr=8 Received: from [189.250.130.205] (port=38138 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1gm6Oj-0047E7-00; Tue, 22 Jan 2019 18:28:05 -0600 Date: Tue, 22 Jan 2019 18:28:01 -0600 From: "Gustavo A. R. Silva" To: VMware Graphics , Thomas Hellstrom , David Airlie , Daniel Vetter Subject: [PATCH] drm/vmwgfx: Replace PTR_RET with PTR_ERR_OR_ZERO Message-ID: <20190123002801.GA10357@embeddedor> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - lists.freedesktop.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.130.205 X-Source-L: No X-Exim-ID: 1gm6Oj-0047E7-00 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.130.205]:38138 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 5 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes X-Mailman-Approved-At: Wed, 23 Jan 2019 08:35:42 +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: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Gustavo A. R. Silva" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP PTR_RET is deprecated and will be removed soon. Use PTR_ERR_OR_ZERO instead. Notice that these are the last instances of PTR_RET in the whole codebase. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index f2d13a72c05d..137cb1a4d6b0 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c @@ -2521,7 +2521,7 @@ static int vmw_cmd_dx_clear_rendertarget_view(struct vmw_private *dev_priv, SVGA3dCmdDXClearRenderTargetView body; } *cmd = container_of(header, typeof(*cmd), header); - return PTR_RET(vmw_view_id_val_add(sw_context, vmw_view_rt, + return PTR_ERR_OR_ZERO(vmw_view_id_val_add(sw_context, vmw_view_rt, cmd->body.renderTargetViewId)); } @@ -2542,7 +2542,7 @@ static int vmw_cmd_dx_clear_depthstencil_view(struct vmw_private *dev_priv, SVGA3dCmdDXClearDepthStencilView body; } *cmd = container_of(header, typeof(*cmd), header); - return PTR_RET(vmw_view_id_val_add(sw_context, vmw_view_ds, + return PTR_ERR_OR_ZERO(vmw_view_id_val_add(sw_context, vmw_view_ds, cmd->body.depthStencilViewId)); } @@ -2916,7 +2916,7 @@ static int vmw_cmd_dx_genmips(struct vmw_private *dev_priv, SVGA3dCmdDXGenMips body; } *cmd = container_of(header, typeof(*cmd), header); - return PTR_RET(vmw_view_id_val_add(sw_context, vmw_view_sr, + return PTR_ERR_OR_ZERO(vmw_view_id_val_add(sw_context, vmw_view_sr, cmd->body.shaderResourceViewId)); }