Re: [PATCH 5/5] drm/i915/fdi: convert BUG()'s to MISSING_CASE()

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

 



On Wed, Aug 25, 2021 at 06:47:52PM +0300, Jani Nikula wrote:
> These shouldn't happen, but in the off chance they do, we'll want a
> warning rather than panic.

looks better indeed:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>


> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_fdi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fdi.c b/drivers/gpu/drm/i915/display/intel_fdi.c
> index cc83a6532a71..fc09b781f15f 100644
> --- a/drivers/gpu/drm/i915/display/intel_fdi.c
> +++ b/drivers/gpu/drm/i915/display/intel_fdi.c
> @@ -93,7 +93,8 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe,
>  		}
>  		return 0;
>  	default:
> -		BUG();
> +		MISSING_CASE(pipe);
> +		return 0;
>  	}
>  }
>  
> @@ -217,7 +218,7 @@ static void ivb_update_fdi_bc_bifurcation(const struct intel_crtc_state *crtc_st
>  
>  		break;
>  	default:
> -		BUG();
> +		MISSING_CASE(crtc->pipe);
>  	}
>  }
>  
> -- 
> 2.20.1
> 



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux