Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm/pmap Use C99-ism to reduce ifdefs. Pointed out by c...
details: https://anonhg.NetBSD.org/src/rev/be4fb7a83f6e
branches: trunk
changeset: 970228:be4fb7a83f6e
user: ad <ad%NetBSD.org@localhost>
date: Mon Mar 16 20:07:44 2020 +0000
description:
Use C99-ism to reduce ifdefs. Pointed out by christos@.
diffstat:
sys/uvm/pmap/pmap_pvt.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (37 lines):
diff -r 2a8ac6322be1 -r be4fb7a83f6e sys/uvm/pmap/pmap_pvt.c
--- a/sys/uvm/pmap/pmap_pvt.c Mon Mar 16 19:56:39 2020 +0000
+++ b/sys/uvm/pmap/pmap_pvt.c Mon Mar 16 20:07:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_pvt.c,v 1.9 2020/03/16 19:56:39 ad Exp $ */
+/* $NetBSD: pmap_pvt.c,v 1.10 2020/03/16 20:07:44 ad Exp $ */
/*-
* Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pmap_pvt.c,v 1.9 2020/03/16 19:56:39 ad Exp $");
+__RCSID("$NetBSD: pmap_pvt.c,v 1.10 2020/03/16 20:07:44 ad Exp $");
#include <sys/atomic.h>
#include <sys/kmem.h>
@@ -77,9 +77,6 @@
{
struct pv_track *pvt;
size_t npages;
-#ifdef PMAP_PAGE_INIT
- size_t i;
-#endif
KASSERT(start == trunc_page(start));
KASSERT(size == trunc_page(size));
@@ -94,7 +91,7 @@
pvt->pvt_size = size;
#ifdef PMAP_PAGE_INIT
- for (i = 0; i < npages; i++)
+ for (size_t i = 0; i < npages; i++)
PMAP_PAGE_INIT(&pvt->pvt_pages[i]);
#endif
Home |
Main Index |
Thread Index |
Old Index