Re: [PATCH] drm/msm/dsi: use correct enum in dsi_get_cmd_fmt

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

 





On Tuesday 20 March 2018 02:56 AM, Stefan Agner wrote:
The function dsi_get_cmd_fmt returns enum dsi_cmd_dst_format,
use the correct enum value also for MIPI_DSI_FMT_RGB666/_PACKED.

This has been discovered using clang:
   drivers/gpu/drm/msm/dsi/dsi_host.c:743:35: warning: implicit conversion
         from enumeration type 'enum dsi_vid_dst_format' to different
         enumeration type 'enum dsi_cmd_dst_format' [-Wenum-conversion]
           case MIPI_DSI_FMT_RGB666:       return VID_DST_FORMAT_RGB666;
                                           ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stefan Agner <stefan@xxxxxxxx>

Reviewed-by: Archit Taneja <architt@xxxxxxxxxxxxxx>

Archit

---
  drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 0f7324a686ca..d729b2b4b66d 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -740,7 +740,7 @@ static inline enum dsi_cmd_dst_format dsi_get_cmd_fmt(
  	switch (mipi_fmt) {
  	case MIPI_DSI_FMT_RGB888:	return CMD_DST_FORMAT_RGB888;
  	case MIPI_DSI_FMT_RGB666_PACKED:
-	case MIPI_DSI_FMT_RGB666:	return VID_DST_FORMAT_RGB666;
+	case MIPI_DSI_FMT_RGB666:	return CMD_DST_FORMAT_RGB666;
  	case MIPI_DSI_FMT_RGB565:	return CMD_DST_FORMAT_RGB565;
  	default:			return CMD_DST_FORMAT_RGB888;
  	}

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux