Hi All,

This is my first patch submission, i did my best to follow the guidelines
put forth for newbies. Please feel free for any comments and
suggestions.Currently working on 2.6.25-rc3.

I did check for white space through script but i fear copying and pasting
the same here might have included few back, kindly please advise.

Signed-off-by: Nagaraj SK <[EMAIL PROTECTED]>

Changes:
          I fixed simple compilation errors like logical assignment
operator and so on.
          also changed to linux coding standards.



--- drm_memory.c    2008-07-09 16:16:10.000000000 +0530
+++ /usr/src/linux-2.6.25-rc3/drivers/char/drm/drm_memory.c    2008-02-25
02:55:54.000000000 +0530
@@ -69,7 +69,7 @@ void *drm_realloc(void *oldpt, size_t ol
 {
     void *pt;

-    if (!(pt == kmalloc(size, GFP_KERNEL)))
+    if (!(pt = kmalloc(size, GFP_KERNEL)))
         return NULL;
     if (oldpt && oldsize) {
         memcpy(pt, oldpt, oldsize);
@@ -80,7 +80,7 @@ void *drm_realloc(void *oldpt, size_t ol

 #if __OS_HAS_AGP
 static void *agp_remap(unsigned long offset, unsigned long size,
-               struct drm_device *dev)
+               struct drm_device * dev)
 {
     unsigned long *phys_addr_map, i, num_pages =
         PAGE_ALIGN(size) / PAGE_SIZE;
@@ -103,11 +103,10 @@ static void *agp_remap(unsigned long off
         return NULL;

     /*
-    * OK, we're mapping AGP space on a chipset/platform on which memory
-    * accesses by the CPU do not get remapped by the GART. We fix this by
-    * using the kernel's page-table instead
-    * (that's probably faster anyhow...).
-    */
+     * OK, we're mapping AGP space on a chipset/platform on which memory
accesses by
+     * the CPU do not get remapped by the GART.  We fix this by using the
kernel's
+     * page-table instead (that's probably faster anyhow...).
+     */
     /* note: use vmalloc() because num_pages could be large... */
     page_map = vmalloc(num_pages * sizeof(struct page *));
     if (!page_map)
@@ -124,32 +123,32 @@ static void *agp_remap(unsigned long off
 }

 /** Wrapper around agp_allocate_memory() */
-DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type)
+DRM_AGP_MEM *drm_alloc_agp(struct drm_device * dev, int pages, u32 type)
 {
     return drm_agp_allocate_memory(dev->agp->bridge, pages, type);
 }

 /** Wrapper around agp_free_memory() */
-int drm_free_agp(DRM_AGP_MEM *handle, int pages)
+int drm_free_agp(DRM_AGP_MEM * handle, int pages)
 {
     return drm_agp_free_memory(handle) ? 0 : -EINVAL;
 }

 /** Wrapper around agp_bind_memory() */
-int drm_bind_agp(DRM_AGP_MEM *handle, unsigned int start)
+int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start)
 {
     return drm_agp_bind_memory(handle, start);
 }

 /** Wrapper around agp_unbind_memory() */
-int drm_unbind_agp(DRM_AGP_MEM *handle)
+int drm_unbind_agp(DRM_AGP_MEM * handle)
 {
     return drm_agp_unbind_memory(handle);
 }

 #else  /*  __OS_HAS_AGP  */
 static inline void *agp_remap(unsigned long offset, unsigned long size,
-                  struct drm_device *dev)
+                  struct drm_device * dev)
 {
     return NULL;
 }

Attachment: patch2
Description: Binary data

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to