lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87eeszlry5.fsf@intel.com>
Date:   Tue, 07 Apr 2020 09:40:02 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     Lyude Paul <lyude@...hat.com>, intel-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org
Cc:     Sean Paul <sean@...rly.run>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Ville Syrjälä <ville.syrjala@...ux.intel.com>,
        Imre Deak <imre.deak@...el.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] drm/i915/dp_mst: Cast intel_connector->port as drm_dp_mst_port

On Mon, 06 Apr 2020, Lyude Paul <lyude@...hat.com> wrote:
> The only reason for having this cast as void * before was because we
> originally needed to use drm_dp_mst_get_port_validated() and friends in
> order to (attempt to) safely access MST ports. However, we've since
> improved how reference counting works with ports and mstbs such that we
> can now rely on drm_dp_mst_port structs remaining in memory for as long
> as the driver needs. This means we don't really need to cast this as
> void* anymore, and can just access the struct directly.

To/from void* does not need a cast in C anyway. ;)

Acked-by: Jani Nikula <jani.nikula@...el.com>

>
> We'll also need this for the next commit, so that we can remove
> drm_dp_mst_port_has_audio().
>
> Signed-off-by: Lyude Paul <lyude@...hat.com>
> Reviewed-by: Sean Paul <sean@...rly.run>
> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 5a0adf14ebef..0ddc98afe252 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -438,7 +438,7 @@ struct intel_connector {
>  	   state of connector->polled in case hotplug storm detection changes it */
>  	u8 polled;
>  
> -	void *port; /* store this opaque as its illegal to dereference it */
> +	struct drm_dp_mst_port *port;
>  
>  	struct intel_dp *mst_port;

-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ