[Intel-gfx] drm/i915/selftest: Remove avoidable init assignment
Rodrigo Vivi
rodrigo.vivi at intel.com
Tue Mar 7 13:36:55 UTC 2023
On Tue, Mar 07, 2023 at 03:16:43PM +0530, Tejas Upadhyay wrote:
> We can skip the assignment and i915 variable
> altogether and use refernce directly. Also used at
> single place only.
>
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
trusting the compiler,
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> drivers/gpu/drm/i915/selftests/i915_request.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
> index 7a27aba3da8a..a9b79888c193 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -1117,9 +1117,8 @@ static int live_empty_request(void *arg)
>
> static struct i915_vma *recursive_batch(struct intel_gt *gt)
> {
> - struct drm_i915_private *i915 = gt->i915;
> struct drm_i915_gem_object *obj;
> - const int ver = GRAPHICS_VER(i915);
> + const int ver = GRAPHICS_VER(gt->i915);
> struct i915_vma *vma;
> u32 *cmd;
> int err;
> --
> 2.25.1
>
More information about the Intel-gfx
mailing list