On Fri, Nov 29, 2013 at 04:58:46PM +0100, Tomasz Figa wrote: > On Tuesday 29 of October 2013 12:13:14 Sean Paul wrote: [...] > > diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c > > b/drivers/gpu/drm/exynos/exynos_hdmi.c [...] > > @@ -811,11 +816,60 @@ static int hdmi_check_mode(struct exynos_drm_display > > *display, > > > > ret = mixer_check_mode(mode); > > if (ret) > > - return ret; > > + return MODE_BAD; > > Is there a need to define custom return values, instead of returning 0 or > a standard error code depending on whether the mode is correct?
That's not a custom return value. It's one of the values in the drm_mode_status enumeration (include/drm/drm_crtc.h). They are used to transport more meaning than one of the standard error codes. In this case one could argue that MODE_BAD doesn't transport very much meaning, though, and I think it would be more useful to modify mixer_check_mode() to return a specific MODE_* value rather than one of the standard error codes. Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20131202/7d729207/attachment.pgp>