Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c8974ac authored by Jordan Crouse's avatar Jordan Crouse
Browse files

drm/msm/dp: Fix compile warnings



Fix the following compiler warning(s) from gcc 6.1.1 with -Werror enabled:

 drivers/gpu/drm/msm/sde_hdcp_2x.c:405:
   case label does not reduce to an integer constant
  case hdcp_min_enc_level_0:
 drivers/gpu/drm/msm/sde_hdcp_2x.c:406:
   case label does not reduce to an integer constant
  case hdcp_min_enc_level_1:
 drivers/gpu/drm/msm/sde_hdcp_2x.c:409:
   case label does not reduce to an integer constant
  case hdcp_min_enc_level_2:

Fixes: 10ffbfa2 ("drm/msm/dp: Snapshot of DP and supporting files")
Change-Id: Ic0dedbadd20c29ca0d053e3e258f173ba8cda714
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent bb7e6089
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -333,20 +333,17 @@ static void sde_hdcp_2x_clean(struct sde_hdcp_2x_ctrl *hdcp)
static u8 sde_hdcp_2x_stream_type(u8 min_enc_level)
{
	u8 stream_type = 0;
	u8 const hdcp_min_enc_level_0 = 0, hdcp_min_enc_level_1 = 1,
	   hdcp_min_enc_level_2 = 2;
	u8 const stream_type_0 = 0, stream_type_1 = 1;

	switch (min_enc_level) {
	case hdcp_min_enc_level_0:
	case hdcp_min_enc_level_1:
		stream_type = stream_type_0;
	case 0:
	case 1:
		stream_type = 0;
		break;
	case hdcp_min_enc_level_2:
		stream_type = stream_type_1;
	case 2:
		stream_type = 1;
		break;
	default:
		stream_type = stream_type_0;
		stream_type = 0;
		break;
	}