revert r349460, printf -> KASSERT in bus.h, until I can fix it
I tested only kernel builds naively assuming that sys/bus.h cannot affect userland builds. Pointyhat to: me
This commit is contained in:
parent
061b38cdcc
commit
f45e9414cf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349461
@ -35,7 +35,6 @@
|
|||||||
#include <machine/_bus.h>
|
#include <machine/_bus.h>
|
||||||
#include <sys/_bus_dma.h>
|
#include <sys/_bus_dma.h>
|
||||||
#include <sys/ioccom.h>
|
#include <sys/ioccom.h>
|
||||||
#include <sys/systm.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup NEWBUS newbus - a generic framework for managing devices
|
* @defgroup NEWBUS newbus - a generic framework for managing devices
|
||||||
@ -814,9 +813,12 @@ static __inline type varp ## _get_ ## var(device_t dev) \
|
|||||||
int e; \
|
int e; \
|
||||||
e = BUS_READ_IVAR(device_get_parent(dev), dev, \
|
e = BUS_READ_IVAR(device_get_parent(dev), dev, \
|
||||||
ivarp ## _IVAR_ ## ivar, &v); \
|
ivarp ## _IVAR_ ## ivar, &v); \
|
||||||
KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \
|
if (e != 0) { \
|
||||||
__func__, device_get_nameunit(dev), \
|
device_printf(dev, "failed to read ivar " \
|
||||||
device_get_nameunit(device_get_parent(dev)), e)); \
|
__XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \
|
||||||
|
"error = %d\n", \
|
||||||
|
device_get_nameunit(device_get_parent(dev)), e); \
|
||||||
|
} \
|
||||||
return ((type) v); \
|
return ((type) v); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -826,9 +828,12 @@ static __inline void varp ## _set_ ## var(device_t dev, type t) \
|
|||||||
int e; \
|
int e; \
|
||||||
e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \
|
e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \
|
||||||
ivarp ## _IVAR_ ## ivar, v); \
|
ivarp ## _IVAR_ ## ivar, v); \
|
||||||
KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \
|
if (e != 0) { \
|
||||||
__func__, device_get_nameunit(dev), \
|
device_printf(dev, "failed to write ivar " \
|
||||||
device_get_nameunit(device_get_parent(dev)), e)); \
|
__XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \
|
||||||
|
"error = %d\n", \
|
||||||
|
device_get_nameunit(device_get_parent(dev)), e); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user