Module Name: src Committed By: jmcneill Date: Sat Jan 18 02:42:23 UTC 2020
Modified Files: src/sys/external/bsd/drm2/include/asm: io.h Log Message: memset_io works with bytes not dwords, noted by riastradh@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/asm/io.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/include/asm/io.h diff -u src/sys/external/bsd/drm2/include/asm/io.h:1.5 src/sys/external/bsd/drm2/include/asm/io.h:1.6 --- src/sys/external/bsd/drm2/include/asm/io.h:1.5 Fri Jan 17 20:28:59 2020 +++ src/sys/external/bsd/drm2/include/asm/io.h Sat Jan 18 02:42:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: io.h,v 1.5 2020/01/17 20:28:59 jmcneill Exp $ */ +/* $NetBSD: io.h,v 1.6 2020/01/18 02:42:23 jmcneill Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -51,12 +51,13 @@ static inline void * memset_io(void *b, int c, size_t len) { - uint32_t *ptr = b; - while (len >= 4) { + uint8_t *ptr = b; + + while (len > 0) { *ptr++ = c; - len -= 4; + len--; } - KASSERT(len == 0); + return b; } #else