summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-07-26 17:01:16 -0700
committerIan Romanick <idr@us.ibm.com>2007-07-26 17:01:16 -0700
commitc37ed9eca57a42b98cc67ca98dbf5135f5ab7aba (patch)
tree9ed022851b7027974a259f66dde8bbe98704fe1b /linux-core
parentb89cc0346500d9875d4acebc611db8f9ee3463f7 (diff)
Eliminate use of DRM_ERR.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/xgi_cmdlist.c4
-rw-r--r--linux-core/xgi_drv.c10
-rw-r--r--linux-core/xgi_fb.c8
-rw-r--r--linux-core/xgi_pcie.c10
4 files changed, 16 insertions, 16 deletions
diff --git a/linux-core/xgi_cmdlist.c b/linux-core/xgi_cmdlist.c
index 490e9f39..10ee9764 100644
--- a/linux-core/xgi_cmdlist.c
+++ b/linux-core/xgi_cmdlist.c
@@ -144,7 +144,7 @@ int xgi_submit_cmdlist_ioctl(DRM_IOCTL_ARGS)
sizeof(cmd_list));
if (cmd_list.type > BTYPE_CTRL) {
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
xgi_submit_cmdlist(info, &cmd_list);
@@ -180,7 +180,7 @@ int xgi_state_change(struct xgi_info * info, unsigned int to,
DRM_INFO("Leaving graphical mode (probably X shutting down)\n");
} else {
DRM_ERROR("Invalid state change.\n");
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
return 0;
diff --git a/linux-core/xgi_drv.c b/linux-core/xgi_drv.c
index 2c3384b0..ec87df0a 100644
--- a/linux-core/xgi_drv.c
+++ b/linux-core/xgi_drv.c
@@ -173,7 +173,7 @@ int xgi_bootstrap(DRM_IOCTL_ARGS)
if ((info->fb.base == 0) || (info->fb.size == 0)) {
DRM_ERROR("framebuffer appears to be wrong: 0x%lx 0x%x\n",
(unsigned long) info->fb.base, info->fb.size);
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
@@ -221,7 +221,7 @@ int xgi_bootstrap(DRM_IOCTL_ARGS)
maplist = drm_find_matching_map(dev, info->pcie_map);
if (maplist == NULL) {
DRM_ERROR("Could not find GART backing store map.\n");
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
bs.gart = *info->pcie_map;
@@ -303,7 +303,7 @@ int xgi_driver_load(struct drm_device *dev, unsigned long flags)
struct xgi_info *info = drm_alloc(sizeof(*info), DRM_MEM_DRIVER);
if (!info)
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
(void) memset(info, 0, sizeof(*info));
dev->dev_private = info;
@@ -322,7 +322,7 @@ int xgi_driver_load(struct drm_device *dev, unsigned long flags)
if ((info->mmio.base == 0) || (info->mmio.size == 0)) {
DRM_ERROR("mmio appears to be wrong: 0x%lx 0x%x\n",
(unsigned long) info->mmio.base, info->mmio.size);
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
@@ -339,7 +339,7 @@ int xgi_driver_load(struct drm_device *dev, unsigned long flags)
SLAB_HWCACHE_ALIGN,
NULL, NULL);
if (xgi_mem_block_cache == NULL) {
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
}
diff --git a/linux-core/xgi_fb.c b/linux-core/xgi_fb.c
index 3d3b2ae0..10343c13 100644
--- a/linux-core/xgi_fb.c
+++ b/linux-core/xgi_fb.c
@@ -45,7 +45,7 @@ int xgi_mem_heap_init(struct xgi_mem_heap *heap, unsigned int start,
block = kmem_cache_alloc(xgi_mem_block_cache, GFP_KERNEL);
if (!block) {
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
}
block->offset = start;
@@ -189,11 +189,11 @@ int xgi_mem_free(struct xgi_mem_heap * heap, unsigned long offset,
if (&block->list == &heap->used_list) {
DRM_ERROR("can't find block: 0x%lx to free!\n", offset);
- return DRM_ERR(ENOENT);
+ return -ENOENT;
}
if (block->filp != filp) {
- return DRM_ERR(EPERM);
+ return -EPERM;
}
used_block = block;
@@ -265,7 +265,7 @@ int xgi_fb_alloc(struct xgi_info * info, struct xgi_mem_alloc * alloc,
alloc->location = XGI_MEMLOC_LOCAL;
alloc->size = 0;
DRM_ERROR("Video RAM allocation failed\n");
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
} else {
DRM_INFO("Video RAM allocation succeeded: 0x%p\n",
(char *)block->offset);
diff --git a/linux-core/xgi_pcie.c b/linux-core/xgi_pcie.c
index dc5a50b8..4c369a2a 100644
--- a/linux-core/xgi_pcie.c
+++ b/linux-core/xgi_pcie.c
@@ -85,7 +85,7 @@ static int xgi_pcie_lut_init(struct xgi_info * info)
DMA_31BIT_MASK);
if (info->lut_handle == NULL) {
DRM_ERROR("cannot allocate PCIE lut page!\n");
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
}
lut = info->lut_handle->vaddr;
@@ -97,7 +97,7 @@ static int xgi_pcie_lut_init(struct xgi_info * info)
DMA_BIDIRECTIONAL);
if (dma_mapping_error(info->dev->sg->busaddr[i])) {
DRM_ERROR("cannot map GART backing store for DMA!\n");
- return DRM_ERR(-(info->dev->sg->busaddr[i]));
+ return info->dev->sg->busaddr[i];
}
lut[i] = info->dev->sg->busaddr[i];
@@ -184,7 +184,7 @@ int xgi_pcie_alloc(struct xgi_info * info, struct xgi_mem_alloc * alloc,
alloc->location = XGI_MEMLOC_INVALID;
alloc->size = 0;
DRM_ERROR("PCIE RAM allocation failed\n");
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
} else {
DRM_INFO("PCIE RAM allocation succeeded: offset = 0x%lx\n",
block->offset);
@@ -325,7 +325,7 @@ int xgi_test_rwinkernel_ioctl(DRM_IOCTL_ARGS)
DRM_INFO("input GE HW addr is 0x%x\n", address);
if (address == 0) {
- return DRM_ERR(EFAULT);
+ return -EFAULT;
}
virtaddr = (u32 *)xgi_find_pcie_virt(info, address);
@@ -337,7 +337,7 @@ int xgi_test_rwinkernel_ioctl(DRM_IOCTL_ARGS)
*virtaddr = 0x00f00fff;
DRM_INFO("modified [virtaddr] = 0x%x\n", *virtaddr);
} else {
- return DRM_ERR(EFAULT);
+ return -EFAULT;
}
return 0;