From patchwork Tue Sep 1 11:37:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Gray X-Patchwork-Id: 7104981 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F3CB99F36E for ; Tue, 1 Sep 2015 11:37:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 223AF205E6 for ; Tue, 1 Sep 2015 11:37:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C324C205E5 for ; Tue, 1 Sep 2015 11:37:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78D7C6E1FF; Tue, 1 Sep 2015 04:37:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lechuck.jsg.id.au (jsg.id.au [210.15.216.215]) by gabe.freedesktop.org (Postfix) with ESMTPS id B9B036E1FF for ; Tue, 1 Sep 2015 04:37:23 -0700 (PDT) Received: from carla.jsg.id.au (carla.jsg.id.au [192.168.1.42]) by lechuck.jsg.id.au (OpenSMTPD) with ESMTP id 7da3facc for ; Tue, 1 Sep 2015 21:37:19 +1000 (AEST) Received: from carla.jsg.id.au (localhost.jsg.id.au [127.0.0.1]) by carla.jsg.id.au (OpenSMTPD) with ESMTP id 850ae4af for ; Tue, 1 Sep 2015 21:37:19 +1000 (AEST) From: Jonathan Gray To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] amdgpu: use EINVAL instead of EBADMSG in amdgpu_bo_cpu_unmap() Date: Tue, 1 Sep 2015 21:37:19 +1000 Message-Id: <1441107439-30944-1-git-send-email-jsg@jsg.id.au> X-Mailer: git-send-email 2.4.6 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP EBADMSG is a streams errno. OpenBSD does not implement streams and does include the streams errnos, this commit fixes the build on OpenBSD. None of the callers of this function check the return value for -EBADMSG. Signed-off-by: Jonathan Gray --- amdgpu/amdgpu_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index 220422d..348da00 100644 --- a/amdgpu/amdgpu_bo.c +++ b/amdgpu/amdgpu_bo.c @@ -482,7 +482,7 @@ int amdgpu_bo_cpu_unmap(amdgpu_bo_handle bo) if (bo->cpu_map_count == 0) { /* not mapped */ pthread_mutex_unlock(&bo->cpu_access_mutex); - return -EBADMSG; + return -EINVAL; } bo->cpu_map_count--;