[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dri-patches
Subject:    drm: Branch 'master' - 2 commits
From:       airlied () kemper ! freedesktop ! org (Dave Airlie)
Date:       2007-12-16 23:52:10
Message-ID: 20071216235210.DD73F10096 () kemper ! freedesktop ! org
[Download RAW message or body]

 shared-core/i915_irq.c |    2 +-
 shared-core/mga_dma.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2db6400396ea5c8a5ce54fe9e211b9d01a11d506
Author: Li Zefan <lizf@cn.fujitsu.com>
Date:   Mon Dec 17 09:50:45 2007 +1000

    drm: don't cast a pointer to pointer of list_head
    
    The casting is safe only when the list_head member is the first member of
    the structure.

diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index ee7c40b..7e3d3f3 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -719,7 +719,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
 
 	DRM_SPINLOCK_IRQSAVE(&dev_priv->swaps_lock, irqflags);
 
-	list_add_tail((struct list_head *)vbl_swap, &dev_priv->vbl_swaps.head);
+	list_add_tail(&vbl_swap->head, &dev_priv->vbl_swaps.head);
 	dev_priv->swaps_pending++;
 
 	DRM_SPINUNLOCK_IRQRESTORE(&dev_priv->swaps_lock, irqflags);
commit 6180dbda203161b8926513cca4ee963bbbf18cc9
Author: Jesper Juhl <jesper.juhl@gmail.com>
Date:   Mon Dec 17 09:45:03 2007 +1000

    While reading some code I stumbled across the use of 'err' in
    drivers/char/drm/mga_dma.c::mga_do_cleanup_dma() and I think there's a small
    problem.
    
    The variable is only used inside #if __OS_HAS_AGP which is fine, but all
    that
    ever happens is an assignment to the variable - it is never actually used
    for
    anything.  The variable is nicely initialized to zero which is also what the
    return statement at the end of function returns (always at the moment).
    
    It looks to me like that function should be returning 'err' instead of
    always
    just returning 0.  Here's a patch to do that.
    
    Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

diff --git a/shared-core/mga_dma.c b/shared-core/mga_dma.c
index 67236b2..00154b2 100644
--- a/shared-core/mga_dma.c
+++ b/shared-core/mga_dma.c
@@ -997,7 +997,7 @@ static int mga_do_cleanup_dma(struct drm_device *dev, int full_cleanup)
 		}
 	}
 
-	return 0;
+	return err;
 }
 
 int mga_dma_init(struct drm_device *dev, void *data,

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
--
_______________________________________________
Dri-patches mailing list
Dri-patches@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-patches
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic