diff options
author | Jeff Hartmann <jhartmann@valinux.com> | 2001-08-14 00:35:07 +0000 |
---|---|---|
committer | Jeff Hartmann <jhartmann@valinux.com> | 2001-08-14 00:35:07 +0000 |
commit | 8aaf82d45c406220d5f18168e4350827a9e038e2 (patch) | |
tree | f672aa4462466f86ffb896d085c79b718c6e5f03 /linux | |
parent | aa09e3611490d6a2f12f211c3c834f1237126313 (diff) |
A few warning fixes when actually building under 2.4.9-pre2 + some
reformating
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drmP.h | 2 | ||||
-rw-r--r-- | linux/drm_ioctl.h | 2 | ||||
-rw-r--r-- | linux/drm_vm.h | 78 | ||||
-rw-r--r-- | linux/r128_cce.c | 2 | ||||
-rw-r--r-- | linux/radeon_cp.c | 2 |
5 files changed, 43 insertions, 43 deletions
diff --git a/linux/drmP.h b/linux/drmP.h index f0a7ebf4..aac5c58a 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -78,7 +78,7 @@ /* page_to_bus for earlier kernels, not optimal in all cases */ #ifndef page_to_bus -#define page_to_bus(page) (virt_to_bus(page_address(page))) +#define page_to_bus(page) ((unsigned int)(virt_to_bus(page_address(page)))) #endif /* DRM template customization defaults diff --git a/linux/drm_ioctl.h b/linux/drm_ioctl.h index e0c87d2d..adcb22c8 100644 --- a/linux/drm_ioctl.h +++ b/linux/drm_ioctl.h @@ -116,7 +116,7 @@ int DRM(setunique)(struct inode *inode, struct file *filp, pci_dev = pci_find_slot(b, PCI_DEVFN(d,f)); if (pci_dev) { dev->pdev = pci_dev; - dev->hose = pci_dev->sysdata; + dev->hose = pci_dev->sysdata; } } while(0); #endif diff --git a/linux/drm_vm.h b/linux/drm_vm.h index 8119a21b..d9ee0ff4 100644 --- a/linux/drm_vm.h +++ b/linux/drm_vm.h @@ -68,64 +68,64 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma, #endif { #if defined(__alpha__) && __REALLY_HAVE_AGP - drm_file_t *priv = vma->vm_file->private_data; - drm_device_t *dev = priv->dev; - drm_map_t *map = NULL; - drm_map_list_t *r_list; - struct list_head *list; + drm_file_t *priv = vma->vm_file->private_data; + drm_device_t *dev = priv->dev; + drm_map_t *map = NULL; + drm_map_list_t *r_list; + struct list_head *list; - /* + /* * Find the right map */ - list_for_each(list, &dev->maplist->head) { - r_list = (drm_map_list_t *)list; - map = r_list->map; - if (!map) continue; - if (map->offset == VM_OFFSET(vma)) break; - } + list_for_each(list, &dev->maplist->head) { + r_list = (drm_map_list_t *)list; + map = r_list->map; + if (!map) continue; + if (map->offset == VM_OFFSET(vma)) break; + } - if (map && map->type == _DRM_AGP) { - unsigned long offset = address - vma->vm_start; - unsigned long baddr = VM_OFFSET(vma) + offset; - struct drm_agp_mem *agpmem; - struct page *page; + if (map && map->type == _DRM_AGP) { + unsigned long offset = address - vma->vm_start; + unsigned long baddr = VM_OFFSET(vma) + offset; + struct drm_agp_mem *agpmem; + struct page *page; - /* + /* * Make it a bus-relative address */ - baddr -= dev->hose->mem_space->start; + baddr -= dev->hose->mem_space->start; - /* + /* * It's AGP memory - find the real physical page to map */ - for(agpmem = dev->agp->memory; agpmem; agpmem = agpmem->next) { - if (agpmem->bound <= baddr && - agpmem->bound + agpmem->pages * PAGE_SIZE > baddr) - break; - } + for(agpmem = dev->agp->memory; agpmem; agpmem = agpmem->next) { + if (agpmem->bound <= baddr && + agpmem->bound + agpmem->pages * PAGE_SIZE > baddr) + break; + } - if (!agpmem) { - /* + if (!agpmem) { + /* * Oops - no memory found */ - return NOPAGE_SIGBUS; /* couldn't find it */ + return NOPAGE_SIGBUS; /* couldn't find it */ } - /* + /* * Get the page, inc the use count, and return it */ - offset = (baddr - agpmem->bound) >> PAGE_SHIFT; + offset = (baddr - agpmem->bound) >> PAGE_SHIFT; agpmem->memory->memory[offset] &= ~1UL; /* HACK */ - page = virt_to_page(__va(agpmem->memory->memory[offset])); + page = virt_to_page(__va(agpmem->memory->memory[offset])); #if 0 -DRM_ERROR("baddr = 0x%lx page = 0x%lx, offset = 0x%lx\n", - baddr, __va(agpmem->memory->memory[offset]), offset); + DRM_ERROR("baddr = 0x%lx page = 0x%lx, offset = 0x%lx\n", + baddr, __va(agpmem->memory->memory[offset]), offset); #endif - get_page(page); + get_page(page); #if LINUX_VERSION_CODE < 0x020317 - return page_address(page); + return page_address(page); #else - return page; + return page; #endif } #endif @@ -170,10 +170,10 @@ struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma, pte = pte_offset( pmd, i ); if( !pte_present( *pte ) ) return NOPAGE_OOM; - page = pte_page( *pte ); + page = pte_page(*pte); get_page(page); - DRM_DEBUG("0x%08lx => 0x%08lx\n", address, page_to_bus(page)); + DRM_DEBUG("0x%08lx => 0x%08x\n", address, page_to_bus(page)); #if LINUX_VERSION_CODE < 0x020317 return page_address(page); #else @@ -297,7 +297,7 @@ struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma, get_page(page); - DRM_DEBUG("0x%08lx (page %lu) => 0x%08lx\n", address, page_nr, + DRM_DEBUG("0x%08lx (page %lu) => 0x%08x\n", address, page_nr, page_to_bus(page)); #if LINUX_VERSION_CODE < 0x020317 return page_address(page); diff --git a/linux/r128_cce.c b/linux/r128_cce.c index fb19010c..2c03e6ba 100644 --- a/linux/r128_cce.c +++ b/linux/r128_cce.c @@ -360,7 +360,7 @@ static void r128_cce_init_ring_buffer( drm_device_t *dev, R128_WRITE( R128_PM4_BUFFER_DL_RPTR_ADDR, page_to_bus(entry->pagelist[page_ofs])); - DRM_DEBUG( "ring rptr: offset=0x%08lx handle=0x%08lx\n", + DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n", page_to_bus(entry->pagelist[page_ofs]), entry->handle + tmp_ofs ); #endif diff --git a/linux/radeon_cp.c b/linux/radeon_cp.c index d95df0da..6d508a5c 100644 --- a/linux/radeon_cp.c +++ b/linux/radeon_cp.c @@ -632,7 +632,7 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev, RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR, page_to_bus(entry->pagelist[page_ofs])); - DRM_DEBUG( "ring rptr: offset=0x%08lx handle=0x%08lx\n", + DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n", page_to_bus(entry->pagelist[page_ofs]), entry->handle + tmp_ofs ); #endif |