Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/xscale EINVAL (22) is a valid return value for ...



details:   https://anonhg.NetBSD.org/src/rev/520b3465ef80
branches:  trunk
changeset: 446037:520b3465ef80
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Nov 21 09:49:39 2018 +0000

description:
EINVAL (22) is a valid return value for ARM mmap routines; we need to
return -1 for invalid mmap attempts.

diffstat:

 sys/arch/arm/xscale/i80321_space.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (56 lines):

diff -r 1a9cc453dabd -r 520b3465ef80 sys/arch/arm/xscale/i80321_space.c
--- a/sys/arch/arm/xscale/i80321_space.c        Wed Nov 21 09:37:02 2018 +0000
+++ b/sys/arch/arm/xscale/i80321_space.c        Wed Nov 21 09:49:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80321_space.c,v 1.16 2018/11/18 06:28:39 macallan Exp $       */
+/*     $NetBSD: i80321_space.c,v 1.17 2018/11/21 09:49:39 thorpej Exp $        */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i80321_space.c,v 1.16 2018/11/18 06:28:39 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i80321_space.c,v 1.17 2018/11/21 09:49:39 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -304,10 +304,10 @@
                busbase = sc->sc_ioout_xlate;
                winpaddr = VERDE_OUT_XLATE_IO_WIN0_BASE;                
        } else
-               return (EINVAL);
+               return (-1);
 
        if ((bpa) >= (busbase + VERDE_OUT_XLATE_IO_WIN_SIZE))
-               return (EINVAL);
+               return (-1);
 
        return (arm_btop(winpaddr + (bpa - busbase)));
 }
@@ -459,10 +459,10 @@
                busbase = VERDE_OUT_DIRECT_WIN_BASE;
                physbase = VERDE_OUT_DIRECT_WIN_BASE;
        } else
-               return (EINVAL);
+               return (-1);
        if (bpa >= (VERDE_OUT_DIRECT_WIN_BASE +
            VERDE_OUT_DIRECT_WIN_SIZE))
-               return (EINVAL);
+               return (-1);
 #else
        if (bpa >= sc->sc_owin[0].owin_xlate_lo &&
            bpa < (sc->sc_owin[0].owin_xlate_lo +
@@ -470,9 +470,9 @@
                busbase = sc->sc_owin[0].owin_xlate_lo;
                physbase = sc->sc_iwin[1].iwin_xlate;
        } else
-               return (EINVAL);
+               return (-1);
        if (bpa >= (busbase + VERDE_OUT_XLATE_MEM_WIN_SIZE))
-               return (EINVAL);
+               return (-1);
 #endif
 
        pa = trunc_page((bpa - busbase) + physbase);



Home | Main Index | Thread Index | Old Index