diff options
| author | dyoung <dyoung@NetBSD.org> | 2008-06-03 20:35:01 +0000 |
|---|---|---|
| committer | dyoung <dyoung@NetBSD.org> | 2008-06-03 20:35:01 +0000 |
| commit | e71b1ed16ec938bafe798c0567bb8e99dc38f2fe (patch) | |
| tree | fb22c0af46dbc23b5bc15da51b317cc4d77b8a83 /sys/dev | |
| parent | e0e78e766fda6d45bc88c43cd0ac470c2bc6de91 (diff) | |
Make the atomic macros compile: do not discard 'volatile' qualification
from argument `p'. Use `b' instead of `bit'.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/drm/drm_atomic.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/drm/drm_atomic.h b/sys/dev/drm/drm_atomic.h index 323535fb37a..630a438cec1 100644 --- a/sys/dev/drm/drm_atomic.h +++ b/sys/dev/drm/drm_atomic.h @@ -1,4 +1,4 @@ -/* $NetBSD: drm_atomic.h,v 1.6 2008/05/28 04:51:20 bjs Exp $ */ +/* $NetBSD: drm_atomic.h,v 1.7 2008/06/03 20:35:01 dyoung Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: drm_atomic.h,v 1.6 2008/05/28 04:51:20 bjs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_atomic.h,v 1.7 2008/06/03 20:35:01 dyoung Exp $"); #include <sys/atomic.h> @@ -54,15 +54,15 @@ typedef uint32_t atomic_t; ((old == atomic_cas_uint(p, o, n)) ? 1 : 0) #define set_bit(b, p) \ - atomic_set_int(((volatile uint32_t *)(void *)p) + (b >> 5), \ + atomic_set_int(((volatile uint32_t *)(volatile void *)p) + (b >> 5),\ (1 << (b & 0x1f))) #define clear_bit(b, p) \ - atomic_clear_int(((volatile uint32_t *)(void *)p) + (b >> 5), \ + atomic_clear_int(((volatile uint32_t *)(volatile void *)p) + (b >> 5), \ (1 << (b & 0x1f))) #define test_bit(b, p) \ - (((volatile uint32_t *)(void *)p)[bit >> 5] & (1 << (bit & 0x1f))) + (((volatile uint32_t *)(volatile void *)p)[b >> 5] & (1 << (b & 0x1f))) static inline uint32_t test_and_set_bit(int b, volatile void *p) |
