From patchwork Thu Sep 21 19:26:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9964755 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 CA8E96020C for ; Thu, 21 Sep 2017 19:26:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE0AD2968B for ; Thu, 21 Sep 2017 19:26:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2DC92968E; Thu, 21 Sep 2017 19:26:45 +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=unavailable 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 579BE2968B for ; Thu, 21 Sep 2017 19:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbdIUT0a (ORCPT ); Thu, 21 Sep 2017 15:26:30 -0400 Received: from mout.web.de ([212.227.17.11]:50961 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbdIUT03 (ORCPT ); Thu, 21 Sep 2017 15:26:29 -0400 Received: from [192.168.1.2] ([78.49.37.140]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M4I2R-1d5Lbn0Rkp-00rnH6; Thu, 21 Sep 2017 21:26:24 +0200 Subject: [PATCH 3/3] [media] uvcvideo: Add some spaces for better code readability From: SF Markus Elfring To: linux-media@vger.kernel.org, Laurent Pinchart , Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: <20a8d1a5-45f1-2f98-e4b3-cfc24e9c04b0@users.sourceforge.net> Message-ID: <74183bb1-f78e-9ca1-06ab-9de5c00a5fe5@users.sourceforge.net> Date: Thu, 21 Sep 2017 21:26:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20a8d1a5-45f1-2f98-e4b3-cfc24e9c04b0@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:qlDB+isVcw1TqvF7YBfN/AvNxRRUH6Vjd0AApYDocUerUMOv3tc bGcnnC9JAliQHb1d9reo0LO7njCU6GRhgZICF2fSqZK50+uWU+8mC9aFxvlDsTbMcmwgTrz 2/v/j/9P8vpczGby/xoS9M6+AFVAbr5bHr5+JQni4CFYVVl4bFO+Mi84LIN/Ev858cEMijm 1qc6dMmbf/dKP0mtkWgzA== X-UI-Out-Filterresults: notjunk:1; V01:K0:TdTPx8r22Pg=:BRo41RBqqVbzohUj1iXppf 3kHIjVx0zVS9SHeFc5bp647JJJOMdaijEhH/txmlVb+eFmGBmKq0QdS3WV4hd/+gIp0ieSRxG dn0m/3MdnmdyRNvnIyhycj86lpXWif1MAGnHf4smnPoJtJ80nYeXSB4VZgy4kkM2W2lzRUf5E HSF+xii7MrjVuPNzKIX7Ulz58QwJjLSQbmFfRZaiVEHwU3K9C21p+Zzvn+aHzQ00NIzRyJuSR C4k3ggiQ1Qyk8wle6y0Smvifr8ZZXB0W+R9oSNPSMvvNJwuXE2cc8Jl3UNgmC/evTTyxbdT5i qR2FyP8WukBGteTXymRRSE3YBtljg6IxTl8mxFAC6kMZnA783W7x61fxxd+yKmvvE4uTRG3Zc fkpRxilXMr1js9hrrG9FLVy/pMwrdnfkMbwGaNa8VHe6qqMxWdsOnJDHESTChs9Rv0tT3pCbH NJuSNs7KZZAckQEyzP4cxNjBIDXRTtcUYeWxz+AnkdVhjUp3gc2owuLk2GGRktMy3kusZn1Q7 2cv6bWOoF6zETT7a3vTLWk1Um6fI4HNIIk8aWJQqN6mF1MHfWt4Mkfr6XilXHtM8K04G0Hn0y 8WLQw3ubjw1igf7Oqloc1qXrVM9R16WBJmWG28Esb6kLe7dL86vmj5SA3y5vPkC9WoNmsBrAY EuZxxGYQhzMpA6MHAUQjxRzYtX/pP9BcmhsPoiUTtcvQFtkJacpDE/UenhnF6/hBq31dAs6Xf 3yz4sb8BaRTZjG87QVNjFLlTdlBMG/0iwJ7IcySzaYfwy4KPLEEuTCmy8x2Eqdd0Tve4jnwe3 HbQEFgLAEIzGA5d0EdmSs0PObWn8t5AgnSoNHo8VO2M1zkuOWE= 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 From: Markus Elfring Date: Thu, 21 Sep 2017 21:12:29 +0200 Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/media/usb/uvc/uvc_v4l2.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 184edf8a0885..cebaba5c4e86 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c @@ -123,13 +123,13 @@ static __u32 uvc_try_frame_interval(struct uvc_frame *frame, __u32 interval) best = dist; } - interval = frame->dwFrameInterval[i-1]; + interval = frame->dwFrameInterval[i - 1]; } else { const __u32 min = frame->dwFrameInterval[0]; const __u32 max = frame->dwFrameInterval[1]; const __u32 step = frame->dwFrameInterval[2]; - interval = min + (interval - min + step/2) / step * step; + interval = min + (interval - min + step / 2) / step * step; if (interval > max) interval = max; } @@ -201,7 +201,7 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream, __u16 h = format->frame[i].wHeight; d = min(w, rw) * min(h, rh); - d = w*h + rw*rh - 2*d; + d = w * h + rw * rh - 2 * d; if (d < maxd) { maxd = d; frame = &format->frame[i]; @@ -219,9 +219,10 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream, /* Use the default frame interval. */ interval = frame->dwDefaultFrameInterval; - uvc_trace(UVC_TRACE_FORMAT, "Using default frame interval %u.%u us " - "(%u.%u fps).\n", interval/10, interval%10, 10000000/interval, - (100000000/interval)%10); + uvc_trace(UVC_TRACE_FORMAT, + "Using default frame interval %u.%u us (%u.%u fps).\n", + interval / 10, interval % 10, + 10000000 / interval, (100000000 / interval) % 10); /* Set the format index, frame index and frame interval. */ memset(probe, 0, sizeof *probe);