[PATCH 1/2] drm/simpledrm: Do not upcast in release helpers
Javier Martinez Canillas
javierm at redhat.com
Mon Apr 7 13:58:44 UTC 2025
Thomas Zimmermann <tzimmermann at suse.de> writes:
> The res pointer passed to simpledrm_device_release_clocks() and
> simpledrm_device_release_regulators() points to an instance of
> struct simpledrm_device. No need to upcast from struct drm_device.
> The upcast is harmless, as DRM device is the first field in struct
> simpledrm_device.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
> Cc: <stable at vger.kernel.org> # v5.14+
> ---
Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
More information about the dri-devel
mailing list