From patchwork Mon Feb 26 14:28:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10242455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 04A18602A0 for ; Mon, 26 Feb 2018 14:28:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E96EB2A030 for ; Mon, 26 Feb 2018 14:28:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDE8B2A042; Mon, 26 Feb 2018 14:28:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40FE22A030 for ; Mon, 26 Feb 2018 14:28:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328AbeBZO2N (ORCPT ); Mon, 26 Feb 2018 09:28:13 -0500 Received: from osg.samsung.com ([64.30.133.232]:34104 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753277AbeBZO2N (ORCPT ); Mon, 26 Feb 2018 09:28:13 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id A7E9A24257; Mon, 26 Feb 2018 06:28:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VMOPk6Zqm_KR; Mon, 26 Feb 2018 06:28:11 -0800 (PST) Received: from smtp.s-opensource.com (177.41.102.20.dynamic.adsl.gvt.net.br [177.41.102.20]) by osg.samsung.com (Postfix) with ESMTPSA id 10A4124243; Mon, 26 Feb 2018 06:28:11 -0800 (PST) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.89) (envelope-from ) id 1eqJlA-0005Yo-M8; Mon, 26 Feb 2018 09:28:08 -0500 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Jacopo Mondi , Laurent Pinchart , Hans Verkuil , Guennadi Liakhovetski , Bhumika Goyal Subject: [PATCH 1/2] media: ov772x: fix whitespace issues Date: Mon, 26 Feb 2018 09:28:07 -0500 Message-Id: <054d8830ac07d865c2973971af29b7caad593914.1519655282.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As we're adding this as a new driver, make checkpatch happier by solving some whitespace issues, using --fix-inplace. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/ov772x.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index 3edf0cb6fd0e..16665af0c712 100644 --- a/drivers/media/i2c/ov772x.c +++ b/drivers/media/i2c/ov772x.c @@ -375,7 +375,7 @@ */ #define OV7720 0x7720 #define OV7725 0x7721 -#define VERSION(pid, ver) ((pid<<8)|(ver&0xFF)) +#define VERSION(pid, ver) ((pid << 8) | (ver & 0xFF)) /* * PLL multipliers @@ -500,7 +500,6 @@ static const struct ov772x_color_format ov772x_cfmts[] = { }, }; - /* * window size list */ @@ -557,6 +556,7 @@ static int ov772x_mask_set(struct i2c_client *client, u8 command, u8 mask, u8 set) { s32 val = ov772x_read(client, command); + if (val < 0) return val; @@ -919,7 +919,6 @@ static int ov772x_set_params(struct ov772x_priv *priv, * Edge Ctrl */ if (priv->info->edgectrl.strength & OV772X_MANUAL_EDGE_CTRL) { - /* * Manual Edge Control Mode * @@ -1064,7 +1063,7 @@ static int ov772x_set_params(struct ov772x_priv *priv, } static int ov772x_get_selection(struct v4l2_subdev *sd, - struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_selection *sel) { struct ov772x_priv *priv = to_ov772x(sd); @@ -1087,7 +1086,7 @@ static int ov772x_get_selection(struct v4l2_subdev *sd, } static int ov772x_get_fmt(struct v4l2_subdev *sd, - struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_format *format) { struct v4l2_mbus_framefmt *mf = &format->format; @@ -1106,7 +1105,7 @@ static int ov772x_get_fmt(struct v4l2_subdev *sd, } static int ov772x_set_fmt(struct v4l2_subdev *sd, - struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_format *format) { struct ov772x_priv *priv = to_ov772x(sd); @@ -1219,7 +1218,7 @@ static int ov772x_enum_frame_interval(struct v4l2_subdev *sd, } static int ov772x_enum_mbus_code(struct v4l2_subdev *sd, - struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_mbus_code_enum *code) { if (code->pad || code->index >= ARRAY_SIZE(ov772x_cfmts)) @@ -1282,11 +1281,11 @@ static int ov772x_probe(struct i2c_client *client, v4l2_i2c_subdev_init(&priv->subdev, client, &ov772x_subdev_ops); v4l2_ctrl_handler_init(&priv->hdl, 3); v4l2_ctrl_new_std(&priv->hdl, &ov772x_ctrl_ops, - V4L2_CID_VFLIP, 0, 1, 1, 0); + V4L2_CID_VFLIP, 0, 1, 1, 0); v4l2_ctrl_new_std(&priv->hdl, &ov772x_ctrl_ops, - V4L2_CID_HFLIP, 0, 1, 1, 0); + V4L2_CID_HFLIP, 0, 1, 1, 0); v4l2_ctrl_new_std(&priv->hdl, &ov772x_ctrl_ops, - V4L2_CID_BAND_STOP_FILTER, 0, 256, 1, 0); + V4L2_CID_BAND_STOP_FILTER, 0, 256, 1, 0); priv->subdev.ctrl_handler = &priv->hdl; if (priv->hdl.error) return priv->hdl.error;