From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-media@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/3] [media] uvcvideo: Add some spaces for better code readability
Date: Thu, 21 Sep 2017 21:26:23 +0200 [thread overview]
Message-ID: <74183bb1-f78e-9ca1-06ab-9de5c00a5fe5@users.sourceforge.net> (raw)
In-Reply-To: <20a8d1a5-45f1-2f98-e4b3-cfc24e9c04b0@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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);
--
2.14.1
prev parent reply other threads:[~2017-09-21 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 19:23 [PATCH 0/3] [media] uvcvideo: Fine-tuning for some function implementations SF Markus Elfring
2017-09-21 19:24 ` [PATCH 1/3] [media] uvcvideo: Use common error handling code in uvc_ioctl_g_ext_ctrls() SF Markus Elfring
2017-09-21 19:25 ` [PATCH 2/3] [media] uvcvideo: Adjust 14 checks for null pointers SF Markus Elfring
2017-09-21 19:26 ` SF Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74183bb1-f78e-9ca1-06ab-9de5c00a5fe5@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome