diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-02-06 10:12:03 -0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 10:38:41 -0800 |
commit | ba92b22515e1230661cab7ba2a025910c0636c15 (patch) | |
tree | c6ae6e6167eb3ec697c82622f6521c1c7165109f /drivers/staging/imx-drm/imx-hdmi.c | |
parent | 2ec1cb760582f8e666fb493ed1ccec7d5cc3d8c6 (diff) | |
download | linux-ba92b22515e1230661cab7ba2a025910c0636c15.tar.gz linux-ba92b22515e1230661cab7ba2a025910c0636c15.tar.bz2 linux-ba92b22515e1230661cab7ba2a025910c0636c15.zip |
imx-drm: imx-hdmi: Remove parentheses from returns
Fix the following checkpatch warnings:
ERROR: return is not a function, parentheses are not required
#462: FILE: drivers/staging/imx-drm/imx-hdmi.c:462:
+ return (hdmi->hdmi_data.enc_in_format !=
ERROR: return is not a function, parentheses are not required
#468: FILE: drivers/staging/imx-drm/imx-hdmi.c:468:
+ return ((hdmi->hdmi_data.enc_out_format == YCBCR422_8BITS) &&
ERROR: return is not a function, parentheses are not required
#475: FILE: drivers/staging/imx-drm/imx-hdmi.c:475:
+ return ((hdmi->hdmi_data.enc_in_format == YCBCR422_8BITS) &&
While at it, broke the return code from is_color_space_decimation() and
is_color_space_interpolation() for better readability
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/imx-drm/imx-hdmi.c')
-rw-r--r-- | drivers/staging/imx-drm/imx-hdmi.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index f3a1f5e2e492..01a54ee274bb 100644 --- a/drivers/staging/imx-drm/imx-hdmi.c +++ b/drivers/staging/imx-drm/imx-hdmi.c @@ -463,22 +463,27 @@ static void hdmi_video_sample(struct imx_hdmi *hdmi) static int is_color_space_conversion(struct imx_hdmi *hdmi) { - return (hdmi->hdmi_data.enc_in_format != - hdmi->hdmi_data.enc_out_format); + return hdmi->hdmi_data.enc_in_format != hdmi->hdmi_data.enc_out_format; } static int is_color_space_decimation(struct imx_hdmi *hdmi) { - return ((hdmi->hdmi_data.enc_out_format == YCBCR422_8BITS) && - (hdmi->hdmi_data.enc_in_format == RGB || - hdmi->hdmi_data.enc_in_format == YCBCR444)); + if (hdmi->hdmi_data.enc_out_format != YCBCR422_8BITS) + return 0; + if (hdmi->hdmi_data.enc_in_format == RGB || + hdmi->hdmi_data.enc_in_format == YCBCR444) + return 1; + return 0; } static int is_color_space_interpolation(struct imx_hdmi *hdmi) { - return ((hdmi->hdmi_data.enc_in_format == YCBCR422_8BITS) && - (hdmi->hdmi_data.enc_out_format == RGB || - hdmi->hdmi_data.enc_out_format == YCBCR444)); + if (hdmi->hdmi_data.enc_in_format != YCBCR422_8BITS) + return 0; + if (hdmi->hdmi_data.enc_out_format == RGB || + hdmi->hdmi_data.enc_out_format == YCBCR444) + return 1; + return 0; } static void imx_hdmi_update_csc_coeffs(struct imx_hdmi *hdmi) |