drivers/char/isicom.c MIN/MAX removal
Subsystems (2)
PATCH 1/1 drivers/char/isicom.c MIN/MAX removal
Patch (against 2.6.7) removes unnecessary min/max macros and changes calls to use kernel.h macros instead.
Feedback is always welcome
Michael
drivers/char/isicom.c +7 -7
@@ -388,7 +388,7 @@ tty = port->tty;save_flags (flags);cli (); - txcount =MIN (TX_SIZE , port->xmit_cnt); + txcount =min_t (short,TX_SIZE , port->xmit_cnt);if ((txcount <=0 ) || tty->stopped || tty->hw_stopped) {restore_flags (flags);continue ;
@@ -420,7 +420,7 @@ residue =NO ; wrd =0 ;while (1 ) { - cnt =MIN (txcount, (SERIAL_XMIT_SIZE - port->xmit_tail)); + cnt =min_t (int, txcount, (SERIAL_XMIT_SIZE - port->xmit_tail));if (residue ==YES ) { residue =NO ;if (cnt >0 ) {
@@ -649,7 +649,7 @@ } }else {/* Data Packet */ - count =MIN (byte_count, (TTY_FLIPBUF_SIZE - tty->flip.count)); + count = min_t(unsigned short, byte_count, (TTY_FLIPBUF_SIZE - tty->flip.count));#ifdef ISICOM_DEBUG printk (KERN_DEBUG "ISICOM: Intr: Can rx %d of %d bytes.\n" , count, byte_count);
@@ -1162,8 +1162,8 @@save_flags (flags);while (1 ) {cli (); - cnt =MIN (count,MIN (SERIAL_XMIT_SIZE - port->xmit_cnt -1 , -SERIAL_XMIT_SIZE - port->xmit_head)); + cnt =min_t (int, count,min (SERIAL_XMIT_SIZE - port->xmit_cnt -1 , +SERIAL_XMIT_SIZE - port->xmit_head));if (cnt <=0 )break ;
@@ -1179,8 +1179,8 @@return -EFAULT ; }cli (); - cnt =MIN (cnt,MIN (SERIAL_XMIT_SIZE - port->xmit_cnt -1 , -SERIAL_XMIT_SIZE - port->xmit_head)); + cnt =min_t (int, cnt,min (SERIAL_XMIT_SIZE - port->xmit_cnt -1 , +SERIAL_XMIT_SIZE - port->xmit_head));memcpy (port->xmit_buf + port->xmit_head, tmp_buf, cnt); }else
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors