[PATCH] drm/vc4: Rework the structure convertion functions

Maxime Ripard maxime at cerno.tech
Thu Oct 29 09:26:40 UTC 2020


On Wed, Oct 28, 2020 at 01:49:29PM +0000, Dave Stevenson wrote:
> s/convertion/conversion in subject line
> 
> On Wed, 28 Oct 2020 at 12:37, Maxime Ripard <maxime at cerno.tech> wrote:
> >
> > Most of the helpers to retrieve vc4 structures from the DRM base structures
> > rely on the fact that the first member of the vc4 structure is the DRM one
> > and just cast the pointers between them.
> >
> > However, this is pretty fragile especially since there's no check to make
> > sure that the DRM structure is indeed at the offset 0 in the structure, so
> > let's use container_of to make it more robust.
> >
> > Signed-off-by: Maxime Ripard <maxime at cerno.tech>
> 
> Otherwise
> Reviewed-by: Dave Stevenson <dave.stevenson at raspberrypi.com>

Fixed the typo and applied, thanks!
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201029/8e8e8289/attachment-0001.sig>


More information about the dri-devel mailing list