Use vaddr_t casts rather than pointer arithmetic (in #ifdef DIAGNOSTIC).
This commit is contained in:
parent
736b47b76e
commit
2ab13d3a78
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bus_space.c,v 1.13 2007/03/04 05:59:49 christos Exp $ */
|
/* $NetBSD: bus_space.c,v 1.14 2007/03/12 12:09:34 tsutsui Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.13 2007/03/04 05:59:49 christos Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.14 2007/03/12 12:09:34 tsutsui Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -145,8 +145,8 @@ bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size)
|
||||||
size = m68k_round_page(offset + size);
|
size = m68k_round_page(offset + size);
|
||||||
|
|
||||||
#ifdef DIAGNOSTIC
|
#ifdef DIAGNOSTIC
|
||||||
if ((void *)bsh < extiobase ||
|
if (bsh < (vaddr_t)extiobase ||
|
||||||
(void *)bsh >= (extiobase + ptoa(EIOMAPSIZE)))
|
bsh >= ((vaddr_t)extiobase + ptoa(EIOMAPSIZE)))
|
||||||
panic("bus_space_unmap: bad bus space handle");
|
panic("bus_space_unmap: bad bus space handle");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue