Updates from Rusty Russell to:
authorRik Faith <faith@alephnull.com>
Tue, 6 Aug 2002 18:00:57 +0000 (18:00 +0000)
committerRik Faith <faith@alephnull.com>
Tue, 6 Aug 2002 18:00:57 +0000 (18:00 +0000)
1) Remove redundant header inclusion
2) Silence bitop on non-long argument warnings (change int to long)
3) Move to ISO C (gcc 2.6) initializers (accepted by older gccs also) All
    of these are syntax changes that should not impact functionality.

14 files changed:
linux-core/drm_drv.c
linux-core/drm_stub.c
linux-core/drm_vm.c
linux-core/i810_dma.c
linux-core/i830_dma.c
linux/drm_drv.h
linux/drm_stub.h
linux/drm_vm.h
linux/i810_dma.c
linux/i830_dma.c
shared-core/mga_drv.h
shared-core/mga_state.c
shared/mga_drv.h
shared/mga_state.c

index af6858d..81bd789 100644 (file)
 #ifndef DRIVER_FOPS
 #define DRIVER_FOPS                            \
 static struct file_operations  DRM(fops) = {   \
-       owner:   THIS_MODULE,                   \
-       open:    DRM(open),                     \
-       flush:   DRM(flush),                    \
-       release: DRM(release),                  \
-       ioctl:   DRM(ioctl),                    \
-       mmap:    DRM(mmap),                     \
-       read:    DRM(read),                     \
-       fasync:  DRM(fasync),                   \
-       poll:    DRM(poll),                     \
+       .owner   = THIS_MODULE,                 \
+       .open    = DRM(open),                   \
+       .flush   = DRM(flush),                  \
+       .release = DRM(release),                \
+       .ioctl   = DRM(ioctl),                  \
+       .mmap    = DRM(mmap),                   \
+       .read    = DRM(read),                   \
+       .fasync  = DRM(fasync),                 \
+       .poll    = DRM(poll),                   \
 }
 #endif
 
index b1e7892..3c9c69e 100644 (file)
@@ -66,8 +66,8 @@ static int DRM(stub_open)(struct inode *inode, struct file *filp)
 }
 
 static struct file_operations DRM(stub_fops) = {
-       owner:   THIS_MODULE,
-       open:    DRM(stub_open)
+       .owner = THIS_MODULE,
+       .open  = DRM(stub_open)
 };
 
 static int DRM(stub_getminor)(const char *name, struct file_operations *fops,
index c07c9af..49ce309 100644 (file)
 #include "drmP.h"
 
 struct vm_operations_struct   DRM(vm_ops) = {
-       nopage:  DRM(vm_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_close),
+       .nopage = DRM(vm_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_close),
 };
 
 struct vm_operations_struct   DRM(vm_shm_ops) = {
-       nopage:  DRM(vm_shm_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_shm_close),
+       .nopage = DRM(vm_shm_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_shm_close),
 };
 
 struct vm_operations_struct   DRM(vm_dma_ops) = {
-       nopage:  DRM(vm_dma_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_close),
+       .nopage = DRM(vm_dma_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_close),
 };
 
 struct vm_operations_struct   DRM(vm_sg_ops) = {
-       nopage:  DRM(vm_sg_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_close),
+       .nopage = DRM(vm_sg_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_close),
 };
 
 struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
index a2899b5..a0ab143 100644 (file)
@@ -129,14 +129,14 @@ static int i810_freelist_put(drm_device_t *dev, drm_buf_t *buf)
 }
 
 static struct file_operations i810_buffer_fops = {
-       open:    DRM(open),
-       flush:   DRM(flush),
-       release: DRM(release),
-       ioctl:   DRM(ioctl),
-       mmap:    i810_mmap_buffers,
-       read:    DRM(read),
-       fasync:  DRM(fasync),
-       poll:    DRM(poll),
+       .open    = DRM(open),
+       .flush   = DRM(flush),
+       .release = DRM(release),
+       .ioctl   = DRM(ioctl),
+       .mmap    = i810_mmap_buffers,
+       .read    = DRM(read),
+       .fasync  = DRM(fasync),
+       .poll    = DRM(poll),
 };
 
 int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
index b9c89aa..34a9c2e 100644 (file)
@@ -153,14 +153,14 @@ static int i830_freelist_put(drm_device_t *dev, drm_buf_t *buf)
 }
 
 static struct file_operations i830_buffer_fops = {
-       open:    DRM(open),
-       flush:   DRM(flush),
-       release: DRM(release),
-       ioctl:   DRM(ioctl),
-       mmap:    i830_mmap_buffers,
-       read:    DRM(read),
-       fasync:  DRM(fasync),
-       poll:    DRM(poll),
+       .open    = DRM(open),
+       .flush   = DRM(flush),
+       .release = DRM(release),
+       .ioctl   = DRM(ioctl),
+       .mmap    = i830_mmap_buffers,
+       .read    = DRM(read),
+       .fasync  = DRM(fasync),
+       .poll    = DRM(poll),
 };
 
 int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
index af6858d..81bd789 100644 (file)
 #ifndef DRIVER_FOPS
 #define DRIVER_FOPS                            \
 static struct file_operations  DRM(fops) = {   \
-       owner:   THIS_MODULE,                   \
-       open:    DRM(open),                     \
-       flush:   DRM(flush),                    \
-       release: DRM(release),                  \
-       ioctl:   DRM(ioctl),                    \
-       mmap:    DRM(mmap),                     \
-       read:    DRM(read),                     \
-       fasync:  DRM(fasync),                   \
-       poll:    DRM(poll),                     \
+       .owner   = THIS_MODULE,                 \
+       .open    = DRM(open),                   \
+       .flush   = DRM(flush),                  \
+       .release = DRM(release),                \
+       .ioctl   = DRM(ioctl),                  \
+       .mmap    = DRM(mmap),                   \
+       .read    = DRM(read),                   \
+       .fasync  = DRM(fasync),                 \
+       .poll    = DRM(poll),                   \
 }
 #endif
 
index b1e7892..3c9c69e 100644 (file)
@@ -66,8 +66,8 @@ static int DRM(stub_open)(struct inode *inode, struct file *filp)
 }
 
 static struct file_operations DRM(stub_fops) = {
-       owner:   THIS_MODULE,
-       open:    DRM(stub_open)
+       .owner = THIS_MODULE,
+       .open  = DRM(stub_open)
 };
 
 static int DRM(stub_getminor)(const char *name, struct file_operations *fops,
index c07c9af..49ce309 100644 (file)
 #include "drmP.h"
 
 struct vm_operations_struct   DRM(vm_ops) = {
-       nopage:  DRM(vm_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_close),
+       .nopage = DRM(vm_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_close),
 };
 
 struct vm_operations_struct   DRM(vm_shm_ops) = {
-       nopage:  DRM(vm_shm_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_shm_close),
+       .nopage = DRM(vm_shm_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_shm_close),
 };
 
 struct vm_operations_struct   DRM(vm_dma_ops) = {
-       nopage:  DRM(vm_dma_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_close),
+       .nopage = DRM(vm_dma_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_close),
 };
 
 struct vm_operations_struct   DRM(vm_sg_ops) = {
-       nopage:  DRM(vm_sg_nopage),
-       open:    DRM(vm_open),
-       close:   DRM(vm_close),
+       .nopage = DRM(vm_sg_nopage),
+       .open   = DRM(vm_open),
+       .close  = DRM(vm_close),
 };
 
 struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
index a2899b5..a0ab143 100644 (file)
@@ -129,14 +129,14 @@ static int i810_freelist_put(drm_device_t *dev, drm_buf_t *buf)
 }
 
 static struct file_operations i810_buffer_fops = {
-       open:    DRM(open),
-       flush:   DRM(flush),
-       release: DRM(release),
-       ioctl:   DRM(ioctl),
-       mmap:    i810_mmap_buffers,
-       read:    DRM(read),
-       fasync:  DRM(fasync),
-       poll:    DRM(poll),
+       .open    = DRM(open),
+       .flush   = DRM(flush),
+       .release = DRM(release),
+       .ioctl   = DRM(ioctl),
+       .mmap    = i810_mmap_buffers,
+       .read    = DRM(read),
+       .fasync  = DRM(fasync),
+       .poll    = DRM(poll),
 };
 
 int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
index b9c89aa..34a9c2e 100644 (file)
@@ -153,14 +153,14 @@ static int i830_freelist_put(drm_device_t *dev, drm_buf_t *buf)
 }
 
 static struct file_operations i830_buffer_fops = {
-       open:    DRM(open),
-       flush:   DRM(flush),
-       release: DRM(release),
-       ioctl:   DRM(ioctl),
-       mmap:    i830_mmap_buffers,
-       read:    DRM(read),
-       fasync:  DRM(fasync),
-       poll:    DRM(poll),
+       .open    = DRM(open),
+       .flush   = DRM(flush),
+       .release = DRM(release),
+       .ioctl   = DRM(ioctl),
+       .mmap    = i830_mmap_buffers,
+       .read    = DRM(read),
+       .fasync  = DRM(fasync),
+       .poll    = DRM(poll),
 };
 
 int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
index 51bc706..0845009 100644 (file)
@@ -38,7 +38,7 @@ typedef struct drm_mga_primary_buffer {
 
        u32 tail;
        int space;
-       int wrapped;
+       volatile long wrapped;
 
        volatile u32 *status;
 
index adf67de..734432d 100644 (file)
@@ -37,7 +37,6 @@
 #include "drm.h"
 #include "mga_drm.h"
 #include "mga_drv.h"
-#include "drm.h"
 
 
 /* ================================================================
index 51bc706..0845009 100644 (file)
@@ -38,7 +38,7 @@ typedef struct drm_mga_primary_buffer {
 
        u32 tail;
        int space;
-       int wrapped;
+       volatile long wrapped;
 
        volatile u32 *status;
 
index adf67de..734432d 100644 (file)
@@ -37,7 +37,6 @@
 #include "drm.h"
 #include "mga_drm.h"
 #include "mga_drv.h"
-#include "drm.h"
 
 
 /* ================================================================