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/0bc53f1e052d
branches:  trunk
changeset: 366328:0bc53f1e052d
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 99fdf183139f -r 0bc53f1e052d 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