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/dist const const const const



details:   https://anonhg.NetBSD.org/src/rev/cd023741934e
branches:  trunk
changeset: 1028181:cd023741934e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:46:13 2021 +0000

description:
const const const const


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_edid.c              |  16 ++++++++--------
 sys/external/bsd/drm2/dist/include/drm/drm_displayid.h |   6 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)

diffs (81 lines):

diff -r 25995c6c5728 -r cd023741934e sys/external/bsd/drm2/dist/drm/drm_edid.c
--- a/sys/external/bsd/drm2/dist/drm/drm_edid.c Sun Dec 19 09:46:05 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_edid.c Sun Dec 19 09:46:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_edid.c,v 1.13 2021/12/19 01:02:54 riastradh Exp $  */
+/*     $NetBSD: drm_edid.c,v 1.14 2021/12/19 09:46:13 riastradh Exp $  */
 
 /*
  * Copyright (c) 2006 Luc Verhaegen (quirks list)
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_edid.c,v 1.13 2021/12/19 01:02:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_edid.c,v 1.14 2021/12/19 09:46:13 riastradh Exp $");
 
 #include <linux/hdmi.h>
 #include <linux/i2c.h>
@@ -1593,7 +1593,7 @@
 
 static void drm_get_displayid(struct drm_connector *connector,
                              struct edid *edid);
-static int validate_displayid(u8 *displayid, int length, int idx);
+static int validate_displayid(const u8 *displayid, int length, int idx);
 
 static int drm_edid_block_checksum(const u8 *raw_edid)
 {
@@ -3186,7 +3186,7 @@
 }
 
 
-static u8 *drm_find_displayid_extension(const struct edid *edid)
+static const u8 *drm_find_displayid_extension(const struct edid *edid)
 {
        return drm_find_edid_extension(edid, DISPLAYID_EXT);
 }
@@ -3196,9 +3196,9 @@
        int ret;
        int idx = 1;
        int length = EDID_LENGTH;
-       struct displayid_block *block;
-       u8 *cea;
-       u8 *displayid;
+       const struct displayid_block *block;
+       const u8 *cea;
+       const u8 *displayid;
 
        /* Look for a top level CEA extension block */
        cea = drm_find_edid_extension(edid, CEA_EXT);
@@ -3217,7 +3217,7 @@
        idx += sizeof(struct displayid_hdr);
        for_each_displayid_db(displayid, block, idx, length) {
                if (block->tag == DATA_BLOCK_CTA) {
-                       cea = (u8 *)block;
+                       cea = (const u8 *)block;
                        break;
                }
        }
diff -r 25995c6c5728 -r cd023741934e sys/external/bsd/drm2/dist/include/drm/drm_displayid.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_displayid.h    Sun Dec 19 09:46:05 2021 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_displayid.h    Sun Dec 19 09:46:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_displayid.h,v 1.3 2021/12/18 23:45:45 riastradh Exp $      */
+/*     $NetBSD: drm_displayid.h,v 1.4 2021/12/19 09:46:13 riastradh Exp $      */
 
 /*
  * Copyright © 2014 Red Hat Inc.
@@ -95,11 +95,11 @@
 };
 
 #define for_each_displayid_db(displayid, block, idx, length) \
-       for ((block) = (struct displayid_block *)&(displayid)[idx]; \
+       for ((block) = (const struct displayid_block *)&(displayid)[idx]; \
             (idx) + sizeof(struct displayid_block) <= (length) && \
             (idx) + sizeof(struct displayid_block) + (block)->num_bytes <= (length) && \
             (block)->num_bytes > 0; \
             (idx) += (block)->num_bytes + sizeof(struct displayid_block), \
-            (block) = (struct displayid_block *)&(displayid)[idx])
+            (block) = (const struct displayid_block *)&(displayid)[idx])
 
 #endif



Home | Main Index | Thread Index | Old Index