* [PATCH] Trivial fix for type mismatch warning in riotty.c
@ 2005-03-16 21:30 M.Baris Demiray
0 siblings, 0 replies; only message in thread
From: M.Baris Demiray @ 2005-03-16 21:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
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
[-- Attachment #2: make-end_time-unsigned-in-riotty.c.patch --]
[-- Type: text/x-patch, Size: 1645 bytes --]
--- 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++;
#endif
[-- Attachment #3: baris.vcf --]
[-- Type: text/x-vcard, Size: 342 bytes --]
begin: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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-16 21:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-16 21:30 [PATCH] Trivial fix for type mismatch warning in riotty.c M.Baris Demiray
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®