svn commit: r221840 - projects/largeSMP/sys/dev/cfi
Attilio Rao
attilio at FreeBSD.org
Fri May 13 15:09:35 UTC 2011
Author: attilio
Date: Fri May 13 15:09:35 2011
New Revision: 221840
URL: http://svn.freebsd.org/changeset/base/221840
Log:
After rewriting powerpc atomic we decided to commit at the constraint
that for _ptr operations, when not used directly with uintptr_t, we
needed to manually cast.
Use the cast on the _ptr version, where it actually wasn't (please note
that i386 doesn't get it right, while amd64 doesn't seem to compile
cfi neither in LINT, that is why it doesn't fail).
Reported by: sbruno
Modified:
projects/largeSMP/sys/dev/cfi/cfi_dev.c
Modified: projects/largeSMP/sys/dev/cfi/cfi_dev.c
==============================================================================
--- projects/largeSMP/sys/dev/cfi/cfi_dev.c Fri May 13 15:06:35 2011 (r221839)
+++ projects/largeSMP/sys/dev/cfi/cfi_dev.c Fri May 13 15:09:35 2011 (r221840)
@@ -145,7 +145,8 @@ cfi_devopen(struct cdev *dev, int oflags
sc = dev->si_drv1;
/* We allow only 1 open. */
- if (!atomic_cmpset_acq_ptr(&sc->sc_opened, NULL, td->td_proc))
+ if (!atomic_cmpset_acq_ptr((uintptr_t *)&sc->sc_opened,
+ (uintptr_t)NULL, (uintptr_t)td->td_proc))
return (EBUSY);
return (0);
}
More information about the svn-src-projects
mailing list