From: David Schleef Date: Fri, 14 Sep 2001 03:54:54 +0000 (+0000) Subject: Remove min() macro X-Git-Tag: r0_7_61~90 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7d5ecb9e9fb97ef402abb901024352a1d5116bbb;p=comedi.git Remove min() macro --- diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index 8b378ba1..8978e3a9 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -71,7 +71,6 @@ struct mite_struct *mite_devices = NULL; #define TOP_OF_PAGE(x) ((x)|(~(PAGE_MASK))) -#define min(a,b) (((a)<(b))?(a):(b)) #ifdef PCI_SUPPORT_VER1 /* routines for the old PCI code (before 2.1.55) */ @@ -360,8 +359,11 @@ unsigned long mite_ll_from_kvmem(struct mite_struct *mite,comedi_async *async,in (unsigned long)prealloc_buf,prealloc_bufsz); while(((void*)nup < (async->data+len))&&(i<(MITE_RING_SIZE-1))) { + int n; + count = 1+TOP_OF_PAGE(nup)-nup; + if(count>len-size_so_far) count = len-size_so_far; mite->ring[i].addr =kvirt_to_bus(nup);// it's already a kernel address :-) - mite->ring[i].count=min(1+TOP_OF_PAGE(nup)-nup,len-size_so_far); + mite->ring[i].count=count; mite->ring[i].next=virt_to_bus(mite->ring+i+1); size_so_far += mite->ring[i].count; nup += mite->ring[i].count;