From patchwork Thu Jul 14 20:01:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 9230539 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 D2B786075D for ; Thu, 14 Jul 2016 20:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3755281B7 for ; Thu, 14 Jul 2016 20:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7D2B28307; Thu, 14 Jul 2016 20:03:46 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 22FA2281DB for ; Thu, 14 Jul 2016 20:03:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNmpz-0003uf-Gc; Thu, 14 Jul 2016 20:02:23 +0000 Received: from resqmta-po-12v.sys.comcast.net ([2001:558:fe16:19:96:114:154:171]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNmpw-0003sD-Am for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 20:02:21 +0000 Received: from resomta-po-07v.sys.comcast.net ([96.114.154.231]) by resqmta-po-12v.sys.comcast.net with SMTP id NmoWbtckFlHMYNmpabnQ9i; Thu, 14 Jul 2016 20:01:59 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by comcast with SMTP id NmpZbtQiXOW4ANmpZbkzFS; Thu, 14 Jul 2016 20:01:58 +0000 Received: from shuah-XPS-13-9350.sisa.samsung.com (shuah-xps.internal [192.168.1.87]) by mail.gonehiking.org (Postfix) with ESMTP id 68F8C9F22D; Thu, 14 Jul 2016 14:01:57 -0600 (MDT) From: Shuah Khan To: andrzej.p@samsung.com, j.anaszewski@samsung.com, mchehab@kernel.org Subject: [PATCH] media: s5p-jpeg add missing blank lines after declarations Date: Thu, 14 Jul 2016 14:01:56 -0600 Message-Id: <1468526516-8892-1-git-send-email-shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.7.4 X-CMAE-Envelope: MS4wfFepqHRwq0t5hZCCvhbT/VXvme/u3UA2cj7H6J1bAaX64vGueNWAFtlIEzJCW1gLhrpUOuBFI+JMXMz5KPav6qJjFGWUIJQi4GxnIT36HIw0Uuit8hSJ nx7n2ifwf+KHr/o+hWT4BGgVwH6qWqOKXrpFHFCcVKKU6pt7uzr9Vz1mYxhFxWt/42cDRnPWTX+LUlIkmoMcbBpvSDsAJiN6IwDyx+lfkXvXGXmiGP0dY+xX CaEFlERUPdgsoww2eQDJY4ho2qAYH8755KDByDBooql3KuG+QqR256sjmLzuMRo65WGZqhV7Spw3hVll1vW4vih7bX5XLFeHkRU862EKirEk5HYnFI4e8Dp9 09/jwiusxG/prs0TsnHABai5jM9bZBeegtr01f/2rn75A/bpSmufw1fVq2AkZtAU7bp0xC6ltp3s+3+Cn63Q4dP3mKXusqn2uBlQBPrsad93pdmhb98= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_130220_507980_04FF7477 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: javier@osg.samsung.com, linux-kernel@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Missing blank lines after declarations are making it hard to read the code. Fix them and also fix other checkpatch warnings at the same time. Signed-off-by: Shuah Khan Acked-by: Jacek Anaszewski --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 17bc94092..fe5554f 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -537,6 +537,7 @@ static const u32 fourcc_to_dwngrd_schema_id[] = { static int s5p_jpeg_get_dwngrd_sch_id_by_fourcc(u32 fourcc) { int i; + for (i = 0; i < ARRAY_SIZE(fourcc_to_dwngrd_schema_id); ++i) { if (fourcc_to_dwngrd_schema_id[i] == fourcc) return i; @@ -1273,7 +1274,8 @@ static int enum_fmt(struct s5p_jpeg_fmt *sjpeg_formats, int n, if (num == f->index) break; /* Correct type but haven't reached our index yet, - * just increment per-type index */ + * just increment per-type index + */ ++num; } } @@ -1349,6 +1351,7 @@ static int s5p_jpeg_g_fmt(struct file *file, void *priv, struct v4l2_format *f) pix->bytesperline = 0; if (q_data->fmt->fourcc != V4L2_PIX_FMT_JPEG) { u32 bpl = q_data->w; + if (q_data->fmt->colplanes == 1) bpl = (bpl * q_data->fmt->depth) >> 3; pix->bytesperline = bpl; @@ -1374,6 +1377,7 @@ static struct s5p_jpeg_fmt *s5p_jpeg_find_format(struct s5p_jpeg_ctx *ctx, for (k = 0; k < ARRAY_SIZE(sjpeg_formats); k++) { struct s5p_jpeg_fmt *fmt = &sjpeg_formats[k]; + if (fmt->fourcc == pixelformat && fmt->flags & fmt_flag && fmt->flags & ctx->jpeg->variant->fmt_ver_flag) { @@ -1431,7 +1435,8 @@ static int vidioc_try_fmt(struct v4l2_format *f, struct s5p_jpeg_fmt *fmt, return -EINVAL; /* V4L2 specification suggests the driver corrects the format struct - * if any of the dimensions is unsupported */ + * if any of the dimensions is unsupported + */ if (q_type == FMT_TYPE_OUTPUT) jpeg_bound_align_image(ctx, &pix->width, S5P_JPEG_MIN_WIDTH, S5P_JPEG_MAX_WIDTH, 0, @@ -2490,6 +2495,7 @@ static void s5p_jpeg_buf_queue(struct vb2_buffer *vb) if (ctx->mode == S5P_JPEG_DECODE && vb->vb2_queue->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { struct s5p_jpeg_q_data tmp, *q_data; + ctx->hdr_parsed = s5p_jpeg_parse_hdr(&tmp, (unsigned long)vb2_plane_vaddr(vb, 0), min((unsigned long)ctx->out_q.size, @@ -3025,7 +3031,8 @@ static int s5p_jpeg_resume(struct device *dev) static const struct dev_pm_ops s5p_jpeg_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume) - SET_RUNTIME_PM_OPS(s5p_jpeg_runtime_suspend, s5p_jpeg_runtime_resume, NULL) + SET_RUNTIME_PM_OPS(s5p_jpeg_runtime_suspend, s5p_jpeg_runtime_resume, + NULL) }; static struct s5p_jpeg_variant s5p_jpeg_drvdata = {