Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6491
b: refs/heads/master
c: aa0ca6b
h: refs/heads/master
i:
  6489: 39e9ab7
  6487: 8f5f6b2
v: v3
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Aug 5, 2005
1 parent 26ef10d commit cc8252c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fad99499afdd2730adb1d53413b91580b1f0662
refs/heads/master: aa0ca6b4bb818406d4769edb9ff115500c8e4090
10 changes: 5 additions & 5 deletions trunk/drivers/char/drm/drm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, size_t align,
dma_addr_t maxaddr)
{
drm_dma_handle_t *dmah;
#if DRM_DEBUG_MEMORY
#ifdef DRM_DEBUG_MEMORY
int area = DRM_MEM_DMA;

spin_lock(&drm_mem_lock);
Expand Down Expand Up @@ -81,7 +81,7 @@ drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, size_t align,
dmah->size = size;
dmah->vaddr = pci_alloc_consistent(dev->pdev, size, &dmah->busaddr);

#if DRM_DEBUG_MEMORY
#ifdef DRM_DEBUG_MEMORY
if (dmah->vaddr == NULL) {
spin_lock(&drm_mem_lock);
++drm_mem_stats[area].fail_count;
Expand Down Expand Up @@ -116,22 +116,22 @@ EXPORT_SYMBOL(drm_pci_alloc);
void
__drm_pci_free(drm_device_t * dev, drm_dma_handle_t *dmah)
{
#if DRM_DEBUG_MEMORY
#ifdef DRM_DEBUG_MEMORY
int area = DRM_MEM_DMA;
int alloc_count;
int free_count;
#endif

if (!dmah->vaddr) {
#if DRM_DEBUG_MEMORY
#ifdef DRM_DEBUG_MEMORY
DRM_MEM_ERROR(area, "Attempt to free address 0\n");
#endif
} else {
pci_free_consistent(dev->pdev, dmah->size, dmah->vaddr,
dmah->busaddr);
}

#if DRM_DEBUG_MEMORY
#ifdef DRM_DEBUG_MEMORY
spin_lock(&drm_mem_lock);
free_count = ++drm_mem_stats[area].free_count;
alloc_count = drm_mem_stats[area].succeed_count;
Expand Down

0 comments on commit cc8252c

Please sign in to comment.