Skip to content

Commit

Permalink
imx-drm: imx-hdmi: Remove parentheses from returns
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Greg Kroah-Hartman committed Feb 7, 2014
1 parent 2ec1cb7 commit ba92b22
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions drivers/staging/imx-drm/imx-hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ba92b22

Please sign in to comment.