Re: [PATCH 2/2] drm/i915: Drop unnecessary NULL test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 08, 2015 at 02:48:52PM -0800, Matt Roper wrote:
> We can never be passed a NULL crtc_state (and if we could there are
> plenty of other places later in this function where we access it
> without testing for NULL).
> 
> Signed-off-by: Matt Roper <matthew.d.roper@xxxxxxxxx>

Yup, atomic state structures better exist once we can do
atomic_check/commit().

Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2e8d1a8..51980a9 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11808,7 +11808,7 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
>  	bool turn_off, turn_on, visible, was_visible;
>  	struct drm_framebuffer *fb = plane_state->fb;
>  
> -	if (crtc_state && INTEL_INFO(dev)->gen >= 9 &&
> +	if (INTEL_INFO(dev)->gen >= 9 &&
>  	    plane->type != DRM_PLANE_TYPE_CURSOR) {
>  		ret = skl_update_scaler_plane(
>  			to_intel_crtc_state(crtc_state),
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux