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 Name the number of words...



details:   https://anonhg.NetBSD.org/src/rev/41958004e3ee
branches:  trunk
changeset: 993027:41958004e3ee
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:51:05 2018 +0000

description:
Name the number of words in bitmap_zero too.

diffstat:

 sys/external/bsd/drm2/include/linux/bitmap.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r ee1124c68e3d -r 41958004e3ee sys/external/bsd/drm2/include/linux/bitmap.h
--- a/sys/external/bsd/drm2/include/linux/bitmap.h      Mon Aug 27 14:50:52 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/bitmap.h      Mon Aug 27 14:51:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bitmap.h,v 1.6 2018/08/27 14:50:52 riastradh Exp $     */
+/*     $NetBSD: bitmap.h,v 1.7 2018/08/27 14:51:05 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -46,8 +46,9 @@
 bitmap_zero(unsigned long *bitmap, size_t nbits)
 {
        const size_t bpl = NBBY * sizeof(*bitmap);
+       size_t n = howmany(nbits, bpl);
 
-       memset(bitmap, 0, howmany(nbits, bpl) * sizeof(*bitmap));
+       memset(bitmap, 0, n * sizeof(*bitmap));
 }
 
 /*



Home | Main Index | Thread Index | Old Index