patch-2.4.9 linux/drivers/net/wan/sbni.c

Next file: linux/drivers/net/wan/sbni.h
Previous file: linux/drivers/net/wan/farsync.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/drivers/net/wan/sbni.c linux/drivers/net/wan/sbni.c
@@ -44,7 +44,7 @@
 #include <linux/fcntl.h>
 #include <linux/ioport.h>
 #include <linux/interrupt.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/errno.h>
 
@@ -659,7 +659,7 @@
 	struct net_local  *nl    = (struct net_local *) dev->priv;
 	struct sk_buff    *skb	 = nl->tx_buf_p;
 
-	unsigned  len = min( skb->len - nl->outpos, nl->framelen );
+	unsigned  len = min(unsigned int, skb->len - nl->outpos, nl->framelen);
 
 	outsb( dev->base_addr + DAT, skb->data + nl->outpos, len );
 	*crc_p = calc_crc32( *crc_p, skb->data + nl->outpos, len );
@@ -760,8 +760,9 @@
 			nl->outpos += nl->framelen;
 
 			if( --nl->tx_frameno )
-				nl->framelen = min( nl->maxframe,
-					nl->tx_buf_p->len - nl->outpos );
+				nl->framelen = min(unsigned int,
+						   nl->maxframe,
+						   nl->tx_buf_p->len - nl->outpos);
 			else
 				send_complete( nl ),
 #ifdef CONFIG_SBNI_MULTILINE

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)