[PATCH] drm/i915: simplify ppgtt setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Apr 2012 17:04:35 +0200, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> We don't need the pt_addr for the !dmar case, so drop the else and
> move the if (dmar) condition out of the loop.
> 
> v2: Fixup whitespace damage noticed by Chris Wilson.
> 
> Noticed-by: Konstantin Belousov <kostikbel at gmail.com>
> Signed-Off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 4fb875d..5f75660 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -98,9 +98,10 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
>  			goto err_pt_alloc;
>  	}
>  
> -	for (i = 0; i < ppgtt->num_pd_entries; i++) {
> -		dma_addr_t pt_addr;
> -		if (dev_priv->mm.gtt->needs_dmar) {
> +	if (dev_priv->mm.gtt->needs_dmar) {
Now just delete the preceding 3 lines...  ;-)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux