summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptrr
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2008-03-08 18:06:48 +0000
committerscottl <scottl@FreeBSD.org>2008-03-08 18:06:48 +0000
commita6a8fbd50cdc8a1e6b0b60e90dbe6c178f3e1e2d (patch)
tree0397f830e40c56dba254410af17109ce080ce3eb /sys/dev/hptrr
parentbb693858431cd9899acd538fd6f41f570340b660 (diff)
downloadFreeBSD-src-a6a8fbd50cdc8a1e6b0b60e90dbe6c178f3e1e2d.zip
FreeBSD-src-a6a8fbd50cdc8a1e6b0b60e90dbe6c178f3e1e2d.tar.gz
Fix a mistake made during the import of the driver. Previous versions of
HPT drivers would sometimes test the value of a preprocessor definition but not always make sure that the definition existed in the first place, leading to warnings on newer compilers. I blindly assumed the same with this driver, and it turned out to be wrong and to enable some code that doesn't work.
Diffstat (limited to 'sys/dev/hptrr')
-rw-r--r--sys/dev/hptrr/hptrr_os_bsd.c6
-rw-r--r--sys/dev/hptrr/hptrr_osm_bsd.c4
-rw-r--r--sys/dev/hptrr/ldm.h2
-rw-r--r--sys/dev/hptrr/osm.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/hptrr/hptrr_os_bsd.c b/sys/dev/hptrr/hptrr_os_bsd.c
index a469e1b..81a3829 100644
--- a/sys/dev/hptrr/hptrr_os_bsd.c
+++ b/sys/dev/hptrr/hptrr_os_bsd.c
@@ -132,7 +132,7 @@ void freelist_reserve(struct freelist *list, void *osext, HPT_UINT size, HPT_UIN
list->dma = 0;
list->size = size;
list->head = 0;
-#ifdef DBG
+#if DBG
list->reserved_count =
#endif
list->count = count;
@@ -172,7 +172,7 @@ void freelist_reserve_dma(struct freelist *list, void *osext, HPT_UINT size, HPT
list->alignment = alignment;
list->size = size;
list->head = 0;
-#ifdef DBG
+#if DBG
list->reserved_count =
#endif
list->count = count;
@@ -289,7 +289,7 @@ int os_printk(char *fmt, ...)
return printf("%s: %s\n", driver_name, buf);
}
-#ifdef DBG
+#if DBG
void os_check_stack(const char *location, int size){}
void __os_dbgbreak(const char *file, int line)
diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c
index 5a1c809..3872cde 100644
--- a/sys/dev/hptrr/hptrr_osm_bsd.c
+++ b/sys/dev/hptrr/hptrr_osm_bsd.c
@@ -205,7 +205,7 @@ static void hpt_free_mem(PVBUS_EXT vbus_ext)
BUS_ADDRESS bus;
for (f=vbus_ext->freelist_head; f; f=f->next) {
-#ifdef DBG
+#if DBG
if (f->count!=f->reserved_count) {
KdPrint(("memory leak for freelist %s (%d/%d)", f->tag, f->count, f->reserved_count));
}
@@ -222,7 +222,7 @@ static void hpt_free_mem(PVBUS_EXT vbus_ext)
for (f=vbus_ext->freelist_dma_head; f; f=f->next) {
int order, size;
-#ifdef DBG
+#if DBG
if (f->count!=f->reserved_count) {
KdPrint(("memory leak for dma freelist %s (%d/%d)", f->tag, f->count, f->reserved_count));
}
diff --git a/sys/dev/hptrr/ldm.h b/sys/dev/hptrr/ldm.h
index 6075df4..93a92fa 100644
--- a/sys/dev/hptrr/ldm.h
+++ b/sys/dev/hptrr/ldm.h
@@ -76,7 +76,7 @@ struct freelist {
HPT_UINT size;
void * head;
struct freelist *next;
-#ifdef DBG
+#if DBG
char *tag;
HPT_UINT reserved_count;
#define freelist_debug_tag(list, _tag) (list)->tag = _tag
diff --git a/sys/dev/hptrr/osm.h b/sys/dev/hptrr/osm.h
index d0134ad..c33e0de 100644
--- a/sys/dev/hptrr/osm.h
+++ b/sys/dev/hptrr/osm.h
@@ -187,7 +187,7 @@ HPT_U8 os_get_vbus_seq(void *osext);
/* debug support */
int os_printk(char *fmt, ...);
-#ifdef DBG
+#if DBG
extern int hptrr_dbg_level;
#define KdPrint(x) do { if (hptrr_dbg_level) os_printk x; } while (0)
void __os_dbgbreak(const char *file, int line);
OpenPOWER on IntegriCloud