summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vboxvideo
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-10-18 17:03:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-07 12:27:33 +0100
commit685bb884e0a42b917fecb25ca81a6407f391c8ec (patch)
tree11e50e2bd469c747a7178512e49fec84e6a74759 /drivers/staging/vboxvideo
parentdb3566cfbf99d965188361d172a215f979f41f15 (diff)
downloadlinux-685bb884e0a42b917fecb25ca81a6407f391c8ec.tar.bz2
staging: vboxvideo: Drop duplicate vbox_err.h file
Switch to the more complete vbox_err.h file from include/linux which got added with the merging of the vboxguest driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vboxvideo')
-rw-r--r--drivers/staging/vboxvideo/hgsmi_base.c4
-rw-r--r--drivers/staging/vboxvideo/modesetting.c4
-rw-r--r--drivers/staging/vboxvideo/vbox_err.h50
-rw-r--r--drivers/staging/vboxvideo/vbox_main.c3
-rw-r--r--drivers/staging/vboxvideo/vbva_base.c4
5 files changed, 8 insertions, 57 deletions
diff --git a/drivers/staging/vboxvideo/hgsmi_base.c b/drivers/staging/vboxvideo/hgsmi_base.c
index 15ff5f42e2cd..89a7cc989d5b 100644
--- a/drivers/staging/vboxvideo/hgsmi_base.c
+++ b/drivers/staging/vboxvideo/hgsmi_base.c
@@ -20,8 +20,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <linux/vbox_err.h>
#include "vbox_drv.h"
-#include "vbox_err.h"
#include "vboxvideo_guest.h"
#include "vboxvideo_vbe.h"
#include "hgsmi_channels.h"
@@ -70,7 +70,7 @@ int hgsmi_send_caps_info(struct gen_pool *ctx, u32 caps)
hgsmi_buffer_submit(ctx, p);
- WARN_ON_ONCE(RT_FAILURE(p->rc));
+ WARN_ON_ONCE(p->rc < 0);
hgsmi_buffer_free(ctx, p);
diff --git a/drivers/staging/vboxvideo/modesetting.c b/drivers/staging/vboxvideo/modesetting.c
index 7616b8aab23a..e49c2c779726 100644
--- a/drivers/staging/vboxvideo/modesetting.c
+++ b/drivers/staging/vboxvideo/modesetting.c
@@ -20,8 +20,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <linux/vbox_err.h>
#include "vbox_drv.h"
-#include "vbox_err.h"
#include "vboxvideo_guest.h"
#include "vboxvideo_vbe.h"
#include "hgsmi_channels.h"
@@ -130,7 +130,7 @@ int hgsmi_get_mode_hints(struct gen_pool *ctx, unsigned int screens,
hgsmi_buffer_submit(ctx, p);
- if (RT_FAILURE(p->rc)) {
+ if (p->rc < 0) {
hgsmi_buffer_free(ctx, p);
return -EIO;
}
diff --git a/drivers/staging/vboxvideo/vbox_err.h b/drivers/staging/vboxvideo/vbox_err.h
deleted file mode 100644
index 562db8630eb0..000000000000
--- a/drivers/staging/vboxvideo/vbox_err.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2017 Oracle Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef __VBOX_ERR_H__
-#define __VBOX_ERR_H__
-
-/**
- * @name VirtualBox virtual-hardware error macros
- * @{
- */
-
-#define VINF_SUCCESS 0
-#define VERR_INVALID_PARAMETER (-2)
-#define VERR_INVALID_POINTER (-6)
-#define VERR_NO_MEMORY (-8)
-#define VERR_NOT_IMPLEMENTED (-12)
-#define VERR_INVALID_FUNCTION (-36)
-#define VERR_NOT_SUPPORTED (-37)
-#define VERR_TOO_MUCH_DATA (-42)
-#define VERR_INVALID_STATE (-79)
-#define VERR_OUT_OF_RESOURCES (-80)
-#define VERR_ALREADY_EXISTS (-105)
-#define VERR_INTERNAL_ERROR (-225)
-
-#define RT_SUCCESS_NP(rc) ((int)(rc) >= VINF_SUCCESS)
-#define RT_SUCCESS(rc) (likely(RT_SUCCESS_NP(rc)))
-#define RT_FAILURE(rc) (unlikely(!RT_SUCCESS_NP(rc)))
-
-/** @} */
-
-#endif
diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c
index ad0e0b62bd1e..eb1894de6122 100644
--- a/drivers/staging/vboxvideo/vbox_main.c
+++ b/drivers/staging/vboxvideo/vbox_main.c
@@ -27,11 +27,12 @@
* Michael Thayer <michael.thayer@oracle.com,
* Hans de Goede <hdegoede@redhat.com>
*/
+
+#include <linux/vbox_err.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_crtc_helper.h>
#include "vbox_drv.h"
-#include "vbox_err.h"
#include "vboxvideo_guest.h"
#include "vboxvideo_vbe.h"
diff --git a/drivers/staging/vboxvideo/vbva_base.c b/drivers/staging/vboxvideo/vbva_base.c
index c10c782f94e1..42b02e1194f5 100644
--- a/drivers/staging/vboxvideo/vbva_base.c
+++ b/drivers/staging/vboxvideo/vbva_base.c
@@ -20,8 +20,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <linux/vbox_err.h>
#include "vbox_drv.h"
-#include "vbox_err.h"
#include "vboxvideo_guest.h"
#include "hgsmi_channels.h"
@@ -144,7 +144,7 @@ static bool vbva_inform_host(struct vbva_buf_ctx *vbva_ctx,
hgsmi_buffer_submit(ctx, p);
if (enable)
- ret = RT_SUCCESS(p->base.result);
+ ret = p->base.result >= 0;
else
ret = true;