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/29c807e1a25a
branches:  trunk
changeset: 835409:29c807e1a25a
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 1631df4e5e7b -r 29c807e1a25a 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