From a6a8fbd50cdc8a1e6b0b60e90dbe6c178f3e1e2d Mon Sep 17 00:00:00 2001 From: scottl Date: Sat, 8 Mar 2008 18:06:48 +0000 Subject: 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. --- sys/dev/hptrr/hptrr_os_bsd.c | 6 +++--- sys/dev/hptrr/hptrr_osm_bsd.c | 4 ++-- sys/dev/hptrr/ldm.h | 2 +- sys/dev/hptrr/osm.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/dev/hptrr') 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); -- cgit v1.1