[PATCH 14/44] drm/v3d: Delete v3d_dev->pdev

Eric Anholt eric at anholt.net
Fri Apr 3 17:35:17 UTC 2020


On Fri, Apr 3, 2020 at 6:58 AM Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
>
> We already have it in v3d_dev->drm.dev with zero additional pointer
> chasing. Personally I don't like duplicated pointers like this
> because:
> - reviewers need to check whether the pointer is for the same or
> different objects if there's multiple
> - compilers have an easier time too
>
> To avoid having to pull in some big headers I implemented the casting
> function as a macro instead of a static inline. Typechecking thanks to
> container_of still assured.
>
> But also a bit a bikeshed, so feel free to ignore.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Eric Anholt <eric at anholt.net

Acked-by: Eric Anholt <eric at anholt.net>


More information about the dri-devel mailing list