]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/char/drm/drm_proc.c
drm: Use ARRAY_SIZE macro when appropriate
[mv-sheeva.git] / drivers / char / drm / drm_proc.c
index 62d5fe15f0468971b9017c1b932c3c1fcd5be819..b204498d1a2887ae58579538c89c89757d4fb539 100644 (file)
@@ -72,7 +72,7 @@ static struct drm_proc_list {
 #endif
 };
 
-#define DRM_PROC_ENTRIES (sizeof(drm_proc_list)/sizeof(drm_proc_list[0]))
+#define DRM_PROC_ENTRIES ARRAY_SIZE(drm_proc_list)
 
 /**
  * Initialize the DRI proc filesystem for a device.
@@ -500,7 +500,7 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request,
        for (pt = dev->vmalist; pt; pt = pt->next) {
                if (!(vma = pt->vma))
                        continue;
-               DRM_PROC_PRINT("\n%5d 0x%08lx-0x%08lx %c%c%c%c%c%c 0x%08lx",
+               DRM_PROC_PRINT("\n%5d 0x%08lx-0x%08lx %c%c%c%c%c%c 0x%08lx000",
                               pt->pid,
                               vma->vm_start,
                               vma->vm_end,
@@ -510,7 +510,7 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request,
                               vma->vm_flags & VM_MAYSHARE ? 's' : 'p',
                               vma->vm_flags & VM_LOCKED ? 'l' : '-',
                               vma->vm_flags & VM_IO ? 'i' : '-',
-                              vma->vm_pgoff << PAGE_SHIFT);
+                              vma->vm_pgoff);
 
 #if defined(__i386__)
                pgprot = pgprot_val(vma->vm_page_prot);