drivers/char/mxser.c MIN/MAX removal
Subsystems (3)
PATCH 1/1 drivers/char/mxser.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/mxser.c +3 -7
@@ -101,10 +101,6 @@#define IRQ_T (info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) -#ifndef MIN -#define MIN (a,b) ((a) < (b) ? (a) : (b)) -#endif -/* * Define the Moxa PCI vendor and device IDs. */
@@ -847,7 +843,7 @@if (from_user) {down (&mxvar_tmp_buf_sem);while (1 ) { - c =MIN (count,MIN (SERIAL_XMIT_SIZE - info->xmit_cnt -1 , + c =min_t (int, count,min (SERIAL_XMIT_SIZE - info->xmit_cnt -1 ,SERIAL_XMIT_SIZE - info->xmit_head));if (c <=0 )break ;
@@ -860,7 +856,7 @@ }cli (); - c =MIN (c,MIN (SERIAL_XMIT_SIZE - info->xmit_cnt -1 , + c =min_t (int, c,min (SERIAL_XMIT_SIZE - info->xmit_cnt -1 ,SERIAL_XMIT_SIZE - info->xmit_head));memcpy (info->xmit_buf + info->xmit_head, mxvar_tmp_buf, c); info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE -1 );
@@ -875,7 +871,7 @@ }else {while (1 ) {cli (); - c =MIN (count,MIN (SERIAL_XMIT_SIZE - info->xmit_cnt -1 , + c =min_t (int, count,min (SERIAL_XMIT_SIZE - info->xmit_cnt -1 ,SERIAL_XMIT_SIZE - info->xmit_head));if (c <=0 ) {restore_flags (flags);
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors