Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/rockchip rework slightly to avoid stupid gcc wa...



details:   https://anonhg.NetBSD.org/src/rev/49e50cab18b5
branches:  trunk
changeset: 967579:49e50cab18b5
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Dec 15 00:49:00 2019 +0000

description:
rework slightly to avoid stupid gcc warnings.

ok jmcneill.

diffstat:

 sys/arch/arm/rockchip/rk_vop.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r b3f438d49e82 -r 49e50cab18b5 sys/arch/arm/rockchip/rk_vop.c
--- a/sys/arch/arm/rockchip/rk_vop.c    Sat Dec 14 21:36:00 2019 +0000
+++ b/sys/arch/arm/rockchip/rk_vop.c    Sun Dec 15 00:49:00 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_vop.c,v 1.2 2019/11/14 20:31:50 jmcneill Exp $ */
+/* $NetBSD: rk_vop.c,v 1.3 2019/12/15 00:49:00 mrg Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.2 2019/11/14 20:31:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.3 2019/12/15 00:49:00 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -542,11 +542,6 @@
        }
 
        const u_int ep_index = fdt_endpoint_index(ep);
-       if (ep_index >= VOP_NEP) {
-               DRM_ERROR("endpoint index %d out of range\n", ep_index);
-               return ENXIO;
-       }
-
        switch (ep_index) {
        case VOP_EP_MIPI:
        case VOP_EP_MIPI1:
@@ -557,6 +552,9 @@
        case VOP_EP_DP:
                encoder_type = DRM_MODE_ENCODER_TMDS;
                break;
+       default:
+               DRM_ERROR("endpoint index %d out of range\n", ep_index);
+               return ENXIO;
        }
 
        sc->sc_encoder[ep_index].sc = sc;



Home | Main Index | Thread Index | Old Index