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

Commit 28608cc9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: debug: provide unknown string when index is invalid"

parents da793191 391921a9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -28,10 +28,11 @@ static inline const char *mdss_mdp_pipetype2str(u32 ptype)
		PIPE_TYPE(VIG),
		PIPE_TYPE(RGB),
		PIPE_TYPE(DMA),
		PIPE_TYPE(CURSOR),
#undef PIPE_TYPE
	};

	if (ptype >= ARRAY_SIZE(strings))
	if (ptype >= ARRAY_SIZE(strings) || !strings[ptype])
		return "UNKOWN";

	return strings[ptype];
@@ -62,7 +63,7 @@ static inline const char *mdss_mdp_format2str(u32 format)
#undef FORMAT_NAME
	};

	if (format >= ARRAY_SIZE(strings))
	if (format >= ARRAY_SIZE(strings) || !strings[format])
		return "UNKOWN";

	return strings[format];
+2 −1
Original line number Diff line number Diff line
@@ -53,11 +53,12 @@ static inline const char *mdss_panel2str(u32 panel)
		PANEL_NAME(MIPI_CMD),
		PANEL_NAME(EDP),
		PANEL_NAME(HDMI),
		PANEL_NAME(DTV),
		PANEL_NAME(WRITEBACK),
#undef PANEL_NAME
	};

	if (panel >= ARRAY_SIZE(names))
	if (panel >= ARRAY_SIZE(names) || !names[panel])
		return "UNKNOWN";

	return names[panel];