Messages in this thread Patch in this message | | | Date | Wed, 16 Mar 2005 23:30:57 +0200 | From | "M.Baris Demiray" <> | Subject | [PATCH] Trivial fix for type mismatch warning in riotty.c |
| |
Hello, following warning encountered in 2.6.11-mm4 but it doesn't seem to show up with this tree. Rather than casting i made it unsigned since it doesn't have a signed usage. Some cosmetic changes done also.
... drivers/char/rio/riotty.c: In function `riotclose': drivers/char/rio/riotty.c:672: warning: comparison of distinct pointer types lacks a cast ...
PS: I've also found a fix [1] including this one but it's not in mainline as i see.
[1] http://lkml.org/lkml/2004/12/8/91
Signed-off-by: M.Baris Demiray <baris@labristeknoloji.com>
-- "You have to understand, most of these people are not ready to be unplugged. And many of them are no inert, so hopelessly dependent on the system, that they will fight to protect it." Morpheus
--- linux-2.6.11-mm4/drivers/char/rio/riotty.c.orig 2005-03-16 22:04:40.000000000 +0200 +++ linux-2.6.11-mm4/drivers/char/rio/riotty.c 2005-03-16 22:26:03.000000000 +0200 @@ -524,16 +524,16 @@ register uint SysPort = dev; struct ttystatics *tp; /* pointer to our ttystruct */ #endif - struct Port *PortP =ptr; /* pointer to the port structure */ + struct Port *PortP = ptr; /* pointer to the port structure */ int deleted = 0; int try = -1; /* Disable the timeouts by setting them to -1 */ int repeat_this = -1; /* Congrats to those having 15 years of uptime! (You get to break the driver.) */ - long end_time; + unsigned long end_time; struct tty_struct * tty; unsigned long flags; int Modem; - int rv =0; + int rv = 0; rio_dprintk (RIO_DEBUG_TTY, "port close SysPort %d\n",PortP->PortNum); @@ -620,7 +620,7 @@ if (repeat_this -- <= 0) { rv = -EINTR; rio_dprintk (RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); - RIOPreemptiveCmd(p, PortP, FCLOSE ); + RIOPreemptiveCmd(p, PortP, FCLOSE); goto close_end; } rio_dprintk (RIO_DEBUG_TTY, "Calling timeout to flush in closing\n"); @@ -656,14 +656,12 @@ goto close_end; } - - /* Can't call RIOShortCommand with the port locked. */ rio_spin_unlock_irqrestore(&PortP->portSem, flags); if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) { - RIOPreemptiveCmd(p, PortP,FCLOSE); - goto close_end; + RIOPreemptiveCmd(p, PortP,FCLOSE); + goto close_end; } if (!deleted) @@ -698,7 +696,6 @@ */ PortP->Config &= ~(RIO_CTSFLOW|RIO_RTSFLOW); - #ifdef STATS PortP->Stat.CloseCnt++; #endifbegin:vcard fn:M.Baris Demiray n:Demiray;M.Baris org:Labris Teknoloji adr:;;Teknokent Silikon Bina No:24 ODTU;Ankara;;06531;Turkey email;internet:baris@labristeknoloji.com title:Yazilim Gelistirme Uzmani tel;work:+903122101490 tel;fax:+903122101492 x-mozilla-html:FALSE url:http://www.labristeknoloji.com version:2.1 end:vcard
| |