Hi ALL,

Sorry about repetitive mails, i forgot to add the main mail list, getting
used to the procedure to send patches.

This is my second submission (looks like first mail lost in the malling list
10 days earlier). 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.26.I have applied this patch to my existing kernel and all looks
fine, also checked for white space.

Fixed few simple compilation errors like logical assignment operators,white
space between pointer variables
 and cleaned up to few warnings.

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

--- linux-2.6.26/drivers/char/drm/drm_memory.c    2008-07-14
03:21:29.000000000 +0530
+++ linux-staging/drivers/char/drm/drm_memory.c    2008-07-20
00:22:51.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,9 +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 *));
@@ -123,32 +124,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;
 }
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to