Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/ibm4xx Appease the -Wshadow and -Wcast-qual...
details: https://anonhg.NetBSD.org/src/rev/b7521a0f5d56
branches: trunk
changeset: 581624:b7521a0f5d56
user: scw <scw%NetBSD.org@localhost>
date: Fri Jun 03 11:54:48 2005 +0000
description:
Appease the -Wshadow and -Wcast-qual gods.
diffstat:
sys/arch/powerpc/ibm4xx/clock.c | 12 ++++++------
sys/arch/powerpc/ibm4xx/trap.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diffs (101 lines):
diff -r 255a126f292c -r b7521a0f5d56 sys/arch/powerpc/ibm4xx/clock.c
--- a/sys/arch/powerpc/ibm4xx/clock.c Fri Jun 03 11:52:50 2005 +0000
+++ b/sys/arch/powerpc/ibm4xx/clock.c Fri Jun 03 11:54:48 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.11 2005/01/19 00:26:54 simonb Exp $ */
+/* $NetBSD: clock.c,v 1.12 2005/06/03 11:54:48 scw Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.11 2005/01/19 00:26:54 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.12 2005/06/03 11:54:48 scw Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -82,7 +82,7 @@
decr_intr(struct clockframe *frame)
{
int pri;
- long tick, xticks;
+ long tbtick, xticks;
int nticks;
extern u_long intrcnt[];
/*
@@ -91,16 +91,16 @@
if (!ticks_per_intr)
return;
- tick = mftbl();
+ tbtick = mftbl();
mtspr(SPR_TSR, TSR_PIS); /* Clear TSR[PIS] */
/*
* lasttb is used during microtime. Set it to the virtual
* start of this tick interval.
*/
- xticks = tick - lasttb; /* Number of TLB cycles since last exception */
+ xticks = tbtick - lasttb; /* Number of TLB cycles since last exception */
for (nticks = 0; xticks > ticks_per_intr; nticks++)
xticks -= ticks_per_intr;
- lasttb = tick - xticks;
+ lasttb = tbtick - xticks;
intrcnt[CNT_CLOCK]++;
pri = splclock();
diff -r 255a126f292c -r b7521a0f5d56 sys/arch/powerpc/ibm4xx/trap.c
--- a/sys/arch/powerpc/ibm4xx/trap.c Fri Jun 03 11:52:50 2005 +0000
+++ b/sys/arch/powerpc/ibm4xx/trap.c Fri Jun 03 11:54:48 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.25 2005/02/25 07:09:58 simonb Exp $ */
+/* $NetBSD: trap.c,v 1.26 2005/06/03 11:54:48 scw Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.25 2005/02/25 07:09:58 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.26 2005/06/03 11:54:48 scw Exp $");
#include "opt_altivec.h"
#include "opt_ddb.h"
@@ -398,7 +398,7 @@
if (srr1 & PSL_PR) {
pm = curproc->p_vmspace->vm_map.pmap;
if (!pm->pm_ctx) {
- ctx_alloc((struct pmap *)pm);
+ ctx_alloc(__UNVOLATILE(pm));
}
ctx = pm->pm_ctx;
if (srr1 & PSL_SE) {
@@ -496,7 +496,7 @@
* Stolen from physio():
*/
PHOLD(l);
- error = uvm_vslock(p, (caddr_t)udaddr, len, VM_PROT_READ);
+ error = uvm_vslock(p, __UNCONST(udaddr), len, VM_PROT_READ);
if (error) {
PRELE(l);
return EFAULT;
@@ -505,7 +505,7 @@
memcpy(kp, up, len);
vunmaprange((vaddr_t)up, len);
- uvm_vsunlock(p, (caddr_t)udaddr, len);
+ uvm_vsunlock(p, __UNCONST(udaddr), len);
PRELE(l);
return 0;
@@ -562,7 +562,7 @@
bigcopyout(const void *kaddr, void *udaddr, size_t len)
{
char *up;
- const char *kp = (char *)kaddr;
+ const char *kp = (const char *)kaddr;
struct lwp *l = curlwp;
struct proc *p;
int error;
Home |
Main Index |
Thread Index |
Old Index