[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKXUXMzd1OBdoOToPpuv6fh=eW+mNUPHcFdUjARxx+qBGMw=Bg@mail.gmail.com>
Date: Mon, 9 Dec 2019 20:05:23 +0100
From: Lukas Bulwahn <lukas.bulwahn@...il.com>
To: Julia Lawall <julia.lawall@...ia.fr>
Cc: Thomas Hellstrom <thellstrom@...are.com>,
dri-devel@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Sinclair Yeh <syeh@...are.com>,
linux-graphics-maintainer@...are.com,
kernel-janitors@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/vmwgfx: Replace deprecated PTR_RET
On Mon, Dec 9, 2019 at 11:21 AM Julia Lawall <julia.lawall@...ia.fr> wrote:
>
> > De: "Lukas Bulwahn" <lukas.bulwahn@...il.com>
> > À: "Thomas Hellstrom" <thellstrom@...are.com>, dri-devel@...ts.freedesktop.org
> > Cc: "David Airlie" <airlied@...ux.ie>, "Daniel Vetter" <daniel@...ll.ch>, "Sinclair Yeh" <syeh@...are.com>,
> > linux-graphics-maintainer@...are.com, kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org, "Lukas Bulwahn"
> > <lukas.bulwahn@...il.com>
> > Envoyé: Dimanche 8 Décembre 2019 18:53:28
> > Objet: [PATCH] drm/vmwgfx: Replace deprecated PTR_RET
>
> > Commit 508108ea2747 ("drm/vmwgfx: Don't refcount command-buffer managed
> > resource lookups during command buffer validation") slips in use of
> > deprecated PTR_RET. Use PTR_ERR_OR_ZERO instead.
> >
> > As the PTR_ERR_OR_ZERO is a bit longer than PTR_RET, we introduce
> > local variable ret for proper indentation and line-length limits.
>
> Is 0 actually possible? I have the impression that it is not, but perhaps I missed something.
>
I did not sanity-check if 0 is possible before patch submission, just
cleaning the syntatic stuff here to prepare final removal of the
deprecated PTR_RET.
But as far as I see:
vmw_cmd_dx_clear_rendertarget_view
-> vmw_view_id_val_add
-> vmw_view_lookup
-> vmw_cmdbuf_res_lookup
which would then return a proper pointer/a non PTR_ERR value and
hence, it would be possible that PTR_ERR_OR_ZERO returns 0. It all
looks pretty sane.
Lukas
Powered by blists - more mailing lists