Re: [PATCH drm-misc-next] drm/gpuva_mgr: remove unused prev pointer in __drm_gpuva_sm_map()

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

 



On Thu, 24 Aug 2023 at 09:31, Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> The prev pointer in __drm_gpuva_sm_map() was used to implement automatic
> merging of mappings. Since automatic merging did not make its way
> upstream, remove this leftover.
>
> Fixes: e6303f323b1a ("drm: manager to keep track of GPUs VA mappings")
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Reviewed-by: Dave Airlie <airlied@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_gpuva_mgr.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gpuva_mgr.c b/drivers/gpu/drm/drm_gpuva_mgr.c
> index 1bc91fc60ef3..3e1ca878cb7e 100644
> --- a/drivers/gpu/drm/drm_gpuva_mgr.c
> +++ b/drivers/gpu/drm/drm_gpuva_mgr.c
> @@ -1743,7 +1743,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr,
>                    u64 req_addr, u64 req_range,
>                    struct drm_gem_object *req_obj, u64 req_offset)
>  {
> -       struct drm_gpuva *va, *next, *prev = NULL;
> +       struct drm_gpuva *va, *next;
>         u64 req_end = req_addr + req_range;
>         int ret;
>
> @@ -1773,7 +1773,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr,
>                                 ret = op_unmap_cb(ops, priv, va, merge);
>                                 if (ret)
>                                         return ret;
> -                               goto next;
> +                               continue;
>                         }
>
>                         if (end > req_end) {
> @@ -1818,7 +1818,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr,
>                                 ret = op_remap_cb(ops, priv, &p, NULL, &u);
>                                 if (ret)
>                                         return ret;
> -                               goto next;
> +                               continue;
>                         }
>
>                         if (end > req_end) {
> @@ -1851,7 +1851,7 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr,
>                                 ret = op_unmap_cb(ops, priv, va, merge);
>                                 if (ret)
>                                         return ret;
> -                               goto next;
> +                               continue;
>                         }
>
>                         if (end > req_end) {
> @@ -1872,8 +1872,6 @@ __drm_gpuva_sm_map(struct drm_gpuva_manager *mgr,
>                                 break;
>                         }
>                 }
> -next:
> -               prev = va;
>         }
>
>         return op_map_cb(ops, priv,
> --
> 2.41.0
>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux