- drm-minor-fixes.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     drm: minor fixes

has been removed from the -mm tree.  Its filename is

     drm-minor-fixes.patch

This patch was dropped because it broke glxgears on i915

------------------------------------------------------
Subject: drm: minor fixes
From: Frederik Deweerdt <deweerdt@xxxxxxx>

- fix return values that are wrong (return E* instead of return -E*)

- replaces an argument to a sizeof in drm_setversion to match the actual
  variable name

- handle drm_set_busid() return value in drm_setversion

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@xxxxxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/char/drm/drm_ioctl.c |   16 +++++++++-------
 drivers/char/drm/i915_dma.c  |    2 +-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff -puN drivers/char/drm/drm_ioctl.c~drm-minor-fixes drivers/char/drm/drm_ioctl.c
--- a/drivers/char/drm/drm_ioctl.c~drm-minor-fixes
+++ a/drivers/char/drm/drm_ioctl.c
@@ -141,12 +141,12 @@ static int drm_set_busid(drm_device_t * 
 	int len;
 
 	if (dev->unique != NULL)
-		return EBUSY;
+		return -EBUSY;
 
 	dev->unique_len = 40;
 	dev->unique = drm_alloc(dev->unique_len + 1, DRM_MEM_DRIVER);
 	if (dev->unique == NULL)
-		return ENOMEM;
+		return -ENOMEM;
 
 	len = snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%d",
 		       drm_get_pci_domain(dev), dev->pdev->bus->number,
@@ -160,7 +160,7 @@ static int drm_set_busid(drm_device_t * 
 	    drm_alloc(strlen(dev->driver->pci_driver.name) + dev->unique_len +
 		      2, DRM_MEM_DRIVER);
 	if (dev->devname == NULL)
-		return ENOMEM;
+		return -ENOMEM;
 
 	sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name,
 		dev->unique);
@@ -342,20 +342,22 @@ int drm_setversion(DRM_IOCTL_ARGS)
 	retv.drm_dd_major = dev->driver->major;
 	retv.drm_dd_minor = dev->driver->minor;
 
-	if (copy_to_user(argp, &retv, sizeof(sv)))
+	if (copy_to_user(argp, &retv, sizeof(retv)))
 		return -EFAULT;
 
 	if (sv.drm_di_major != -1) {
 		if (sv.drm_di_major != DRM_IF_MAJOR ||
 		    sv.drm_di_minor < 0 || sv.drm_di_minor > DRM_IF_MINOR)
-			return EINVAL;
+			return -EINVAL;
 		if_version = DRM_IF_VERSION(sv.drm_di_major, sv.drm_di_minor);
 		dev->if_version = max(if_version, dev->if_version);
 		if (sv.drm_di_minor >= 1) {
 			/*
 			 * Version 1.1 includes tying of DRM to specific device
 			 */
-			drm_set_busid(dev);
+			int ret = drm_set_busid(dev);
+			if (ret)
+				return ret;
 		}
 	}
 
@@ -363,7 +365,7 @@ int drm_setversion(DRM_IOCTL_ARGS)
 		if (sv.drm_dd_major != dev->driver->major ||
 		    sv.drm_dd_minor < 0
 		    || sv.drm_dd_minor > dev->driver->minor)
-			return EINVAL;
+			return -EINVAL;
 
 		if (dev->driver->set_version)
 			dev->driver->set_version(dev, &sv);
diff -puN drivers/char/drm/i915_dma.c~drm-minor-fixes drivers/char/drm/i915_dma.c
--- a/drivers/char/drm/i915_dma.c~drm-minor-fixes
+++ a/drivers/char/drm/i915_dma.c
@@ -391,7 +391,7 @@ static int i915_emit_box(drm_device_t * 
 	RING_LOCALS;
 
 	if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) {
-		return EFAULT;
+		return DRM_ERR(EFAULT);
 	}
 
 	if (box.y2 <= box.y1 || box.x2 <= box.x1 || box.y2 <= 0 || box.x2 <= 0) {
_

Patches currently in -mm which might be from deweerdt@xxxxxxx are

drm-minor-fixes.patch
bluetooth-use-gfp_atomic-in-_sock_creates-sk_alloc.patch
fix-mem_write-return-value.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux