mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cyclades cleanups
@ 2004-05-03 19:17 Marcelo Tosatti
  2004-05-04 16:14 ` Aristeu Sergio Rozanski Filho
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2004-05-03 19:17 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

Hi, 

The following patch against 2.6.6-rc3-bk5:

- cleanups for cyclades Kconfig entry	(Adrian Bunk/me)
- janitors project: remove dead function	(Don Koch)

Please apply

diff -Nur linux-2.6.5.orig/drivers/char/Kconfig linux-2.6.5/drivers/char/Kconfig
--- linux-2.6.5.orig/drivers/char/Kconfig	2004-05-03 15:38:58.972659880 -0300
+++ linux-2.6.5/drivers/char/Kconfig	2004-05-03 15:45:44.365030872 -0300
@@ -112,15 +112,13 @@
 	tristate "Cyclades async mux support"
 	depends on SERIAL_NONSTANDARD
 	---help---
-	  This is a driver for a card that gives you many serial ports. You
-	  would need something like this to connect more than two modems to
+	  This driver supports Cyclades Z and Y multiserial boards. 
+	  You would need something like this to connect more than two modems to
 	  your Linux box, for instance in order to become a dial-in server.
+
 	  For information about the Cyclades-Z card, read
 	  <file:drivers/char/README.cycladesZ>.
 
-	  As of 1.3.9x kernels, this driver's minor numbers start at 0 instead
-	  of 32.
-
 	  To compile this driver as a module, choose M here: the
 	  module will be called cyclades.
 
diff -Nur linux-2.6.5.orig/drivers/char/cyclades.c linux-2.6.5/drivers/char/cyclades.c
--- linux-2.6.5.orig/drivers/char/cyclades.c	2004-05-03 15:38:58.977659120 -0300
+++ linux-2.6.5/drivers/char/cyclades.c	2004-05-03 15:48:27.348253656 -0300
@@ -681,16 +681,6 @@
 static void cy_throttle (struct tty_struct *tty);
 static void cy_send_xchar (struct tty_struct *tty, char ch);
 
-static unsigned long 
-cy_get_user(unsigned long *addr)
-{
-	unsigned long result = 0;
-	int error = get_user (result, addr);
-	if (error)
-		printk ("cyclades: cy_get_user: error == %d\n", error);
-	return result;
-}
-
 #ifndef MIN
 #define MIN(a,b)        ((a) < (b) ? (a) : (b))
 #endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cyclades cleanups
  2004-05-03 19:17 [PATCH] cyclades cleanups Marcelo Tosatti
@ 2004-05-04 16:14 ` Aristeu Sergio Rozanski Filho
  0 siblings, 0 replies; 2+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2004-05-04 16:14 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

Hi Marcelo,
> diff -Nur linux-2.6.5.orig/drivers/char/cyclades.c linux-2.6.5/drivers/char/cyclades.c
> --- linux-2.6.5.orig/drivers/char/cyclades.c	2004-05-03 15:38:58.977659120 -0300
> +++ linux-2.6.5/drivers/char/cyclades.c	2004-05-03 15:48:27.348253656 -0300
> @@ -681,16 +681,6 @@
>  static void cy_throttle (struct tty_struct *tty);
>  static void cy_send_xchar (struct tty_struct *tty, char ch);
>  
> -static unsigned long 
> -cy_get_user(unsigned long *addr)
> -{
> -	unsigned long result = 0;
> -	int error = get_user (result, addr);
> -	if (error)
> -		printk ("cyclades: cy_get_user: error == %d\n", error);
> -	return result;
> -}
> -
>  #ifndef MIN
>  #define MIN(a,b)        ((a) < (b) ? (a) : (b))
>  #endif
janitorial alarm! patch attached :)

-- 
Aristeu Sergio Rozanski Filho


[-- Attachment #2: cyclades-use_kernel_h_min_macro.diff --]
[-- Type: text/plain, Size: 2537 bytes --]

--- linux-2.6.5/drivers/char/cyclades.c.old	2004-05-04 08:23:08.000000000 -0300
+++ linux-2.6.5/drivers/char/cyclades.c	2004-05-04 13:01:09.000000000 -0300
@@ -681,10 +681,6 @@ static char rcsid[] =
 static void cy_throttle (struct tty_struct *tty);
 static void cy_send_xchar (struct tty_struct *tty, char ch);
 
-#ifndef MIN
-#define MIN(a,b)        ((a) < (b) ? (a) : (b))
-#endif
-
 #define IS_CYC_Z(card) ((card).num_chips == -1)
 
 #define Z_FPGA_CHECK(card) \
@@ -698,7 +694,7 @@ static void cy_send_xchar (struct tty_st
 			((card).base_addr+ID_ADDRESS))->signature)))
 
 #ifndef SERIAL_XMIT_SIZE
-#define	SERIAL_XMIT_SIZE	(MIN(PAGE_SIZE, 4096))
+#define	SERIAL_XMIT_SIZE	(min(PAGE_SIZE, 4096))
 #endif
 #define WAKEUP_CHARS		256
 
@@ -2670,7 +2666,7 @@ cy_wait_until_sent(struct tty_struct *tt
   unsigned char *base_addr;
   int card,chip,channel,index;
   unsigned long orig_jiffies;
-  signed long char_time;
+  int char_time;
 	
     if (serial_paranoia_check(info, tty->name, "cy_wait_until_sent"))
 	return;
@@ -2695,7 +2691,7 @@ cy_wait_until_sent(struct tty_struct *tt
     if (timeout < 0)
 	timeout = 0;
     if (timeout)
-	char_time = MIN(char_time, timeout);
+	char_time = min(char_time, timeout);
     /*
      * If the transmitter hasn't cleared in twice the approximate
      * amount of time to send the entire FIFO, it probably won't
@@ -2922,8 +2918,8 @@ cy_write(struct tty_struct * tty, int fr
 	while (1) {
 	    int c1;
 	    
-	    c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
-				SERIAL_XMIT_SIZE - info->xmit_head));
+	    c = min(count, min((int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1),
+				(int)(SERIAL_XMIT_SIZE - info->xmit_head)));
 	    if (c <= 0)
 		break;
 
@@ -2935,8 +2931,8 @@ cy_write(struct tty_struct * tty, int fr
 		break;
 	    }
 	    CY_LOCK(info, flags);
-	    c1 = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
-			SERIAL_XMIT_SIZE - info->xmit_head));
+	    c1 = min(c, min((int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1),
+			(int)(SERIAL_XMIT_SIZE - info->xmit_head)));
 			
 	    if (c1 < c)
 	    	c = c1;
@@ -2952,8 +2948,8 @@ cy_write(struct tty_struct * tty, int fr
     } else {
 	CY_LOCK(info, flags);
 	while (1) {
-	    c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, 
-			SERIAL_XMIT_SIZE - info->xmit_head));
+	    c = min(count, min((int)(SERIAL_XMIT_SIZE - info->xmit_cnt - 1),
+			(int)(SERIAL_XMIT_SIZE - info->xmit_head)));
 	        
 	    if (c <= 0)
 		break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-04 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-03 19:17 [PATCH] cyclades cleanups Marcelo Tosatti
2004-05-04 16:14 ` Aristeu Sergio Rozanski Filho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®