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.
This commit is contained in:
Scott Long 2008-03-08 18:06:48 +00:00
parent 36b208e008
commit 9d6a74eb84
4 changed files with 7 additions and 7 deletions

View file

@ -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)

View file

@ -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));
}

View file

@ -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

View file

@ -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);