Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20caafa6 authored by Eric Anholt's avatar Eric Anholt Committed by Dave Airlie
Browse files

drm: Remove DRM_ERR OS macro.



This was used to make all ioctl handlers return -errno on linux and errno on
*BSD.  Instead, just return -errno in shared code, and flip sign on return f
shared code to *BSD code.

Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 23fd5045
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS)

		if (update.num && !rects) {
			DRM_ERROR("Failed to allocate cliprect memory\n");
			err = DRM_ERR(ENOMEM);
			err = -ENOMEM;
			goto error;
		}

@@ -140,7 +140,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS)
						     update.num *
						     sizeof(*rects))) {
			DRM_ERROR("Failed to copy cliprects from userspace\n");
			err = DRM_ERR(EFAULT);
			err = -EFAULT;
			goto error;
		}

@@ -161,7 +161,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS)
		break;
	default:
		DRM_ERROR("Invalid update type %d\n", update.type);
		return DRM_ERR(EINVAL);
		return -EINVAL;
	}

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ int drm_setunique(struct inode *inode, struct file *filp,
	 */
	ret = sscanf(dev->unique, "PCI:%d:%d:%d", &bus, &slot, &func);
	if (ret != 3)
		return DRM_ERR(EINVAL);
		return -EINVAL;
	domain = bus >> 8;
	bus &= 0xff;

+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ int drm_lock(struct inode *inode, struct file *filp,
	if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) {
		if (dev->driver->dma_quiescent(dev)) {
			DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context);
			return DRM_ERR(EBUSY);
			return -EBUSY;
		}
	}

+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
#define DRMFILE                         struct file *
/** Ioctl arguments */
#define DRM_IOCTL_ARGS			struct inode *inode, struct file *filp, unsigned int cmd, unsigned long data
#define DRM_ERR(d)			-(d)
/** Current process ID */
#define DRM_CURRENTPID			current->pid
#define DRM_SUSER(p)			capable(CAP_SYS_ADMIN)
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ static int i810_dma_initialize(struct drm_device * dev,
		i810_dma_cleanup(dev);
		DRM_ERROR("can not ioremap virtual address for"
			  " ring buffer\n");
		return DRM_ERR(ENOMEM);
		return -ENOMEM;
	}

	dev_priv->ring.virtual_start = dev_priv->ring.map.handle;
Loading