Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/include/linux Use correct length for h...



details:   https://anonhg.NetBSD.org/src/rev/f77a09bf8921
branches:  trunk
changeset: 804097:f77a09bf8921
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Nov 23 16:07:10 2014 +0000

description:
Use correct length for hdmi_infoframe_header_pack in <linux/hdmi.h>.

Fixes PR kern/49411.

diffstat:

 sys/external/bsd/drm2/include/linux/hdmi.h |  18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diffs (61 lines):

diff -r 6acaa1793554 -r f77a09bf8921 sys/external/bsd/drm2/include/linux/hdmi.h
--- a/sys/external/bsd/drm2/include/linux/hdmi.h        Sun Nov 23 15:43:49 2014 +0000
+++ b/sys/external/bsd/drm2/include/linux/hdmi.h        Sun Nov 23 16:07:10 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hdmi.h,v 1.2 2014/07/16 20:59:58 riastradh Exp $       */
+/*     $NetBSD: hdmi.h,v 1.3 2014/11/23 16:07:10 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -260,9 +260,11 @@
 
        KASSERT(frame->header.length == HDMI_AUDIO_INFOFRAME_SIZE);
 
-       ret = hdmi_infoframe_header_pack(&frame->header, length, p, size);
+       ret = hdmi_infoframe_header_pack(&frame->header, frame->header.length,
+           p, size);
        if (ret < 0)
                return ret;
+       KASSERT(ret == HDMI_INFOFRAME_HEADER_SIZE);
        p += HDMI_INFOFRAME_HEADER_SIZE;
        size -= HDMI_INFOFRAME_HEADER_SIZE;
 
@@ -335,9 +337,11 @@
 
        KASSERT(frame->header.length == HDMI_AVI_INFOFRAME_SIZE);
 
-       ret = hdmi_infoframe_header_pack(&frame->header, length, p, size);
+       ret = hdmi_infoframe_header_pack(&frame->header, frame->header.length,
+           p, size);
        if (ret < 0)
                return ret;
+       KASSERT(ret == HDMI_INFOFRAME_HEADER_SIZE);
        p += HDMI_INFOFRAME_HEADER_SIZE;
        size -= HDMI_INFOFRAME_HEADER_SIZE;
 
@@ -424,9 +428,11 @@
 
        KASSERT(frame->header.length == HDMI_SPD_INFOFRAME_SIZE);
 
-       ret = hdmi_infoframe_header_pack(&frame->header, length, p, size);
+       ret = hdmi_infoframe_header_pack(&frame->header, frame->header.length,
+           p, size);
        if (ret < 0)
                return ret;
+       KASSERT(ret == HDMI_INFOFRAME_HEADER_SIZE);
        p += HDMI_INFOFRAME_HEADER_SIZE;
        size -= HDMI_INFOFRAME_HEADER_SIZE;
 
@@ -490,9 +496,11 @@
        if (frame->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF)
                length += 1;
 
-       ret = hdmi_infoframe_header_pack(&frame->header, length, p, size);
+       ret = hdmi_infoframe_header_pack(&frame->header, frame->header.length,
+           p, size);
        if (ret < 0)
                return ret;
+       KASSERT(ret == HDMI_INFOFRAME_HEADER_SIZE);
        p += HDMI_INFOFRAME_HEADER_SIZE;
        size -= HDMI_INFOFRAME_HEADER_SIZE;
 



Home | Main Index | Thread Index | Old Index