Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Nix trailing whitespace.



details:   https://anonhg.NetBSD.org/src/rev/3423dad8923a
branches:  trunk
changeset: 937256:3423dad8923a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Aug 13 16:45:58 2020 +0000

description:
Nix trailing whitespace.

diffstat:

 sys/dev/video.c |  98 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 49 insertions(+), 49 deletions(-)

diffs (truncated from 422 to 300 lines):

diff -r e73df2e52108 -r 3423dad8923a sys/dev/video.c
--- a/sys/dev/video.c   Thu Aug 13 10:57:53 2020 +0000
+++ b/sys/dev/video.c   Thu Aug 13 16:45:58 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: video.c,v 1.38 2020/08/10 19:27:27 rjs Exp $ */
+/* $NetBSD: video.c,v 1.39 2020/08/13 16:45:58 riastradh Exp $ */
 
 /*
  * Copyright (c) 2008 Patrick Mahoney <pat%polycrystal.org@localhost>
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.38 2020/08/10 19:27:27 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.39 2020/08/13 16:45:58 riastradh Exp $");
 
 #include "video.h"
 #if NVIDEO > 0
@@ -140,7 +140,7 @@
                                              * sequence, wraps around */
        bool                    vs_drop; /* drop payloads from current
                                          * frameno? */
-       
+
        enum v4l2_buf_type      vs_type;
        uint8_t                 vs_nbufs;
        struct video_buffer     **vs_buf;
@@ -325,7 +325,7 @@
 static const char *    video_ioctl_str(u_long);
 #endif
 
-       
+
 static int
 video_match(device_t parent, cfdata_t match, void *aux)
 {
@@ -347,7 +347,7 @@
 
        sc = device_private(self);
        args = aux;
-       
+
        sc->sc_dev = self;
        sc->hw_dev = parent;
        sc->hw_if = args->hw_if;
@@ -398,7 +398,7 @@
        sc->sc_dying = true;
 
        pmf_device_deregister(self);
-       
+
        maj = cdevsw_lookup_major(&video_cdevsw);
        mn = device_unit(self);
        /* close open instances */
@@ -495,7 +495,7 @@
        case V4L2_CID_AUDIO_TREBLE:     return VIDEO_CONTROL_UNDEFINED;
        case V4L2_CID_AUDIO_MUTE:       return VIDEO_CONTROL_UNDEFINED;
        case V4L2_CID_AUDIO_LOUDNESS:   return VIDEO_CONTROL_UNDEFINED;
-               
+
        case V4L2_CID_AUTO_WHITE_BALANCE:
                return VIDEO_CONTROL_WHITE_BALANCE_AUTO;
        case V4L2_CID_DO_WHITE_BALANCE:
@@ -571,7 +571,7 @@
                desc_group.group_id = desc.group_id;
                desc_group.length = 1;
                desc_group.desc = &desc;
-               
+
                err = hw->get_control_desc_group(sc->hw_softc, &desc_group);
                if (err != 0)
                        return err;
@@ -618,7 +618,7 @@
                err = hw->get_control_group(sc->hw_softc, &group);
                if (err != 0)
                        return err;
-               
+
                vcontrol->value = control.value;
                return 0;
        } else {
@@ -641,7 +641,7 @@
        dest->fmt.pix.bytesperline = src->stride;
        dest->fmt.pix.sizeimage = src->sample_size;
        dest->fmt.pix.priv = src->priv;
-       
+
        switch (src->color.primaries) {
        case VIDEO_COLOR_PRIMARIES_SMPTE_170M:
                dest->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
@@ -828,7 +828,7 @@
                printf("video_enum_framesizes: type mismatch %x %x\n",
                    fmt.fmt.pix.pixelformat, frmdesc->pixel_format);
        }
-       
+
        frmdesc->type = V4L2_FRMSIZE_TYPE_DISCRETE; /* TODO: only one type for now */
        frmdesc->discrete.width = vfmt.width;
        frmdesc->discrete.height = vfmt.height;
@@ -867,7 +867,7 @@
                return err;
 
        video_format_to_v4l2_format(&vfmt, format);
-       
+
        return 0;
 }
 
@@ -890,7 +890,7 @@
 
        video_format_to_v4l2_format(&vfmt, fmt);
        sc->sc_stream_in.vs_format = vfmt;
-       
+
        return 0;
 }
 
@@ -1049,7 +1049,7 @@
 
        video_standard_to_v4l2_standard(vstd, &std);
        *stdid = std.id;
-       
+
        return 0;
 }
 
@@ -1472,7 +1472,7 @@
                group.group_id = control.group_id;
                group.length = 1;
                group.control = &control;
-               
+
                return (hw->set_control_group(sc->hw_softc, &group));
        } else {
                return EINVAL;
@@ -1529,7 +1529,7 @@
                return EINVAL;
        if (buf->index >= vs->vs_nbufs)
                return EINVAL;
-       
+
        memcpy(buf, vs->vs_buf[buf->index]->vb_buf, sizeof(*buf));
 
        return 0;
@@ -1543,7 +1543,7 @@
        struct video_stream *vs = &sc->sc_stream_in;
        struct video_buffer *vb;
        struct v4l2_buffer *driverbuf;
-       
+
        if (userbuf->type != vs->vs_type) {
                DPRINTF(("video_queue_buf: expected type=%d got type=%d\n",
                         userbuf->type, vs->vs_type));
@@ -1562,9 +1562,9 @@
                                 userbuf->memory));
                        return EINVAL;
                }
-               
+
                mutex_enter(&vs->vs_lock);
-               
+
                vb = vs->vs_buf[userbuf->index];
                driverbuf = vb->vb_buf;
                if (driverbuf->flags & V4L2_BUF_FLAG_QUEUED) {
@@ -1575,7 +1575,7 @@
                }
                video_stream_enqueue(vs, vb);
                memcpy(userbuf, driverbuf, sizeof(*driverbuf));
-               
+
                mutex_exit(&vs->vs_lock);
                break;
        default:
@@ -1593,14 +1593,14 @@
        struct video_stream *vs = &sc->sc_stream_in;
        struct video_buffer *vb;
        int err;
-       
+
        if (buf->type != vs->vs_type) {
                aprint_debug_dev(sc->sc_dev,
                    "requested type %d (expected %d)\n",
                    buf->type, vs->vs_type);
                return EINVAL;
        }
-       
+
        switch (vs->vs_method) {
        case VIDEO_STREAM_METHOD_MMAP:
                if (buf->memory != V4L2_MEMORY_MMAP) {
@@ -1609,7 +1609,7 @@
                            buf->memory, V4L2_MEMORY_MMAP);
                        return EINVAL;
                }
-               
+
                mutex_enter(&vs->vs_lock);
 
                if (vs->vs_flags & O_NONBLOCK) {
@@ -1635,7 +1635,7 @@
                }
 
                memcpy(buf, vb->vb_buf, sizeof(*buf));
-               
+
                mutex_exit(&vs->vs_lock);
                break;
        default:
@@ -1653,7 +1653,7 @@
        int err;
        struct video_stream *vs = &sc->sc_stream_in;
        const struct video_hw_if *hw;
-       
+
        if (vs->vs_streaming)
                return 0;
        if (type != vs->vs_type)
@@ -1678,7 +1678,7 @@
        int err;
        struct video_stream *vs = &sc->sc_stream_in;
        const struct video_hw_if *hw;
-       
+
        if (!vs->vs_streaming)
                return 0;
        if (type != vs->vs_type)
@@ -1695,7 +1695,7 @@
        vs->vs_frameno = -1;
        vs->vs_sequence = 0;
        vs->vs_streaming = false;
-       
+
        return 0;
 }
 
@@ -1715,7 +1715,7 @@
                        VIDEOUNIT(dev)));
                return ENXIO;
        }
-       
+
        if (sc->sc_dying) {
                DPRINTF(("videoopen: dying\n"));
                return EIO;
@@ -1778,10 +1778,10 @@
                hw->close(sc->hw_softc);
 
        video_stream_teardown_bufs(&sc->sc_stream_in);
-       
+
        sc->sc_open = 0;
        sc->sc_opencnt--;
-       
+
        return 0;
 }
 
@@ -1822,14 +1822,14 @@
        }
 
        mutex_enter(&vs->vs_lock);
-       
+
 retry:
        if (SIMPLEQ_EMPTY(&vs->vs_egress)) {
                if (vs->vs_flags & O_NONBLOCK) {
                        mutex_exit(&vs->vs_lock);
                        return EAGAIN;
                }
-               
+
                /* Block until we have a sample */
                while (SIMPLEQ_EMPTY(&vs->vs_egress)) {
                        err = cv_wait_sig(&vs->vs_sample_cv,
@@ -1854,7 +1854,7 @@
        }
 
        mutex_exit(&vs->vs_lock);
-       
+
        len = uimin(uio->uio_resid, vb->vb_buf->bytesused - vs->vs_bytesread);
        offset = vb->vb_buf->m.offset + vs->vs_bytesread;
 
@@ -1866,7 +1866,7 @@
        } else {
                DPRINTF(("video: invalid read\n"));
        }
-       
+
        /* Move the sample to the ingress queue if everything has
         * been read */
        if (vs->vs_bytesread >= vb->vb_buf->bytesused) {
@@ -1874,7 +1874,7 @@
                vb = video_stream_dequeue(vs);
                video_stream_enqueue(vs, vb);
                mutex_exit(&vs->vs_lock);
-               
+
                vs->vs_bytesread = 0;



Home | Main Index | Thread Index | Old Index