On 22/06/17 11:45 AM, Alex Xie wrote:
> Use atomic instead of spin lock.
> v2: Adjust commit message
> Signed-off-by: Alex Xie <alexbin....@amd.com>

The shortlog should be more specific, e.g. something like "drm/amdgpu:
Drop spinlock from mm_stats".

It's important for the Git commit shortlog to be as specific as possible
because in many cases only the shortlogs of commits are visible.

I'll leave it to others to judge whether the conversion from spinlock to
atomics is safe / an overall win.

>       /* This returns 0 if the driver is in debt to disallow (optional)
>        * buffer moves.
>        */
> -     max_bytes = us_to_bytes(adev, adev->mm_stats.accum_us);
> -
> -     spin_unlock(&adev->mm_stats.lock);
> +     max_bytes = us_to_bytes(adev, accum_us);
>       return max_bytes;
>  }

You can just make this

        return us_to_bytes(adev, accum_us);

and remove the max_bytes local.

Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
amd-gfx mailing list

Reply via email to