Commit 685bb884 authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent db3566cf
......@@ -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);
......
......@@ -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;
}
......
/*
* 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
......@@ -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"
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment