diff mbox

[04/10] drm/i915/skl: Replace BUG() by MISSING_CASE() in skl_plane_ctl_format()

Message ID 1431443602-22886-5-git-send-email-damien.lespiau@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lespiau, Damien May 12, 2015, 3:13 p.m. UTC
Let's be consistent with the others skl_plane_ctl_*() functions and use
a MISSING_CASE(). Not only that, but it's a rude to BUG() the whole
machine here.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chandra Konduru May 14, 2015, 5:24 a.m. UTC | #1
> -----Original Message-----

> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of

> Damien Lespiau

> Sent: Tuesday, May 12, 2015 8:13 AM

> To: intel-gfx@lists.freedesktop.org

> Subject: [Intel-gfx] [PATCH 04/10] drm/i915/skl: Replace BUG() by

> MISSING_CASE() in skl_plane_ctl_format()

> 

> Let's be consistent with the others skl_plane_ctl_*() functions and use a

> MISSING_CASE(). Not only that, but it's a rude to BUG() the whole machine here.

> 

> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

> ---

>  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 e2b01d9..49d7227 100644

> --- a/drivers/gpu/drm/i915/intel_display.c

> +++ b/drivers/gpu/drm/i915/intel_display.c

> @@ -2997,7 +2997,7 @@ u32 skl_plane_ctl_format(uint32_t pixel_format)

>  		format = PLANE_CTL_FORMAT_YUV422 |

> PLANE_CTL_YUV422_VYUY;

>  		break;

>  	default:

> -		BUG();

> +		MISSING_CASE(pixel_format);

When I split update_plane into functions, I simply carried what was there. But agree that it should be a BUG.

Reviewed-by: Chandra Konduru <Chandra.konduru@intel.com>


>  	}

> 

>  	return format;

> --

> 2.1.0

> 

> _______________________________________________

> Intel-gfx mailing list

> Intel-gfx@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e2b01d9..49d7227 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2997,7 +2997,7 @@  u32 skl_plane_ctl_format(uint32_t pixel_format)
 		format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_VYUY;
 		break;
 	default:
-		BUG();
+		MISSING_CASE(pixel_format);
 	}
 
 	return format;