* [PATCH 1/7] Char: rocket, switch long delay to sleep
@ 2007-11-09 23:34 Jiri Slaby
2007-11-09 23:35 ` [PATCH 2/7] Char: rocket, printk cleanup Jiri Slaby
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Jiri Slaby @ 2007-11-09 23:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
rocket, switch long delay to sleep
Don't busy wait for whole 1s when registering some rocket modems. Sleep
instead since we are not in atomic.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit a9b06d9c7a580246dc328e96f31039d932bca47c
tree eb2e25299ebce29c89efa19c3014d41f742454c0
parent 5b07d82896b4d783e76f82dab6c4ba162545e414
author Jiri Slaby <jirislaby@gmail.com> Sat, 20 Oct 2007 11:51:04 +0200
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:21:49 +0100
drivers/char/rocket.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index d83419c..7a63f57 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -2191,10 +2191,10 @@ static __init int register_PCI(int i, struct pci_dev *dev)
num_chan = ports_per_aiop;
for (chan = 0; chan < num_chan; chan++)
sPCIModemReset(ctlp, chan, 1);
- mdelay(500);
+ msleep(500);
for (chan = 0; chan < num_chan; chan++)
sPCIModemReset(ctlp, chan, 0);
- mdelay(500);
+ msleep(500);
rmSpeakerReset(ctlp, rocketModel[i].model);
}
return (1);
@@ -2309,10 +2309,10 @@ static int __init init_ISA(int i)
total_num_chan = num_chan;
for (chan = 0; chan < num_chan; chan++)
sModemReset(ctlp, chan, 1);
- mdelay(500);
+ msleep(500);
for (chan = 0; chan < num_chan; chan++)
sModemReset(ctlp, chan, 0);
- mdelay(500);
+ msleep(500);
strcpy(rocketModel[i].modelString, "RocketModem ISA");
} else {
strcpy(rocketModel[i].modelString, "RocketPort ISA");
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/7] Char: rocket, printk cleanup
2007-11-09 23:34 [PATCH 1/7] Char: rocket, switch long delay to sleep Jiri Slaby
@ 2007-11-09 23:35 ` Jiri Slaby
2007-11-09 23:41 ` Alan Cox
2007-11-09 23:36 ` [PATCH 3/7] Char: rocket, remove useless macros Jiri Slaby
` (4 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2007-11-09 23:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
rocket, printk cleanup
- add KERN_ level to each print
- change some levels appropriately
- add \n at the ends where missing
- change two complex printks into dev_info, where the original info is
printed automatically
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit c0e0b8a247ca469f85e51867fb11b5dbc19dace7
tree cd0bea2e5da957ac4131e04b9c2c9dd7fcddf653
parent a9b06d9c7a580246dc328e96f31039d932bca47c
author Jiri Slaby <jirislaby@gmail.com> Sat, 20 Oct 2007 21:58:17 +0200
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:25:15 +0100
drivers/char/rocket.c | 89 ++++++++++++++++++++++++---------------------
drivers/char/rocket_int.h | 6 ++-
2 files changed, 51 insertions(+), 44 deletions(-)
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 7a63f57..ffb34c4 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -305,8 +305,8 @@ static inline int rocket_paranoia_check(struct r_port *info,
if (!info)
return 1;
if (info->magic != RPORT_MAGIC) {
- printk(KERN_INFO "Warning: bad magic number for rocketport struct in %s\n",
- routine);
+ printk(KERN_WARNING "Warning: bad magic number for rocketport "
+ "struct in %s\n", routine);
return 1;
}
#endif
@@ -328,7 +328,7 @@ static void rp_do_receive(struct r_port *info,
ToRecv = sGetRxCnt(cp);
#ifdef ROCKET_DEBUG_INTR
- printk(KERN_INFO "rp_do_receive(%d)...", ToRecv);
+ printk(KERN_INFO "rp_do_receive(%d)...\n", ToRecv);
#endif
if (ToRecv == 0)
return;
@@ -341,7 +341,7 @@ static void rp_do_receive(struct r_port *info,
if (ChanStatus & (RXFOVERFL | RXBREAK | RXFRAME | RXPARITY)) {
if (!(ChanStatus & STATMODE)) {
#ifdef ROCKET_DEBUG_RECEIVE
- printk(KERN_INFO "Entering STATMODE...");
+ printk(KERN_INFO "Entering STATMODE...\n");
#endif
ChanStatus |= STATMODE;
sEnRxStatusMode(cp);
@@ -355,15 +355,15 @@ static void rp_do_receive(struct r_port *info,
*/
if (ChanStatus & STATMODE) {
#ifdef ROCKET_DEBUG_RECEIVE
- printk(KERN_INFO "Ignore %x, read %x...", info->ignore_status_mask,
- info->read_status_mask);
+ printk(KERN_INFO "Ignore %x, read %x...\n",
+ info->ignore_status_mask, info->read_status_mask);
#endif
while (ToRecv) {
char flag;
CharNStat = sInW(sGetTxRxDataIO(cp));
#ifdef ROCKET_DEBUG_RECEIVE
- printk(KERN_INFO "%x...", CharNStat);
+ printk(KERN_INFO "%x...\n", CharNStat);
#endif
if (CharNStat & STMBREAKH)
CharNStat &= ~(STMFRAMEH | STMPARITYH);
@@ -435,12 +435,13 @@ static void rp_do_transmit(struct r_port *info)
unsigned long flags;
#ifdef ROCKET_DEBUG_INTR
- printk(KERN_INFO "rp_do_transmit ");
+ printk(KERN_DEBUG "%s\n", __func__);
#endif
if (!info)
return;
if (!info->tty) {
- printk(KERN_INFO "rp: WARNING rp_do_transmit called with info->tty==NULL\n");
+ printk(KERN_WARNING "rp: WARNING %s called with "
+ "info->tty==NULL\n", __func__);
clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
return;
}
@@ -464,7 +465,7 @@ static void rp_do_transmit(struct r_port *info)
info->xmit_cnt -= c;
info->xmit_fifo_room -= c;
#ifdef ROCKET_DEBUG_INTR
- printk(KERN_INFO "tx %d chars...", c);
+ printk(KERN_INFO "tx %d chars...\n", c);
#endif
}
@@ -481,7 +482,7 @@ static void rp_do_transmit(struct r_port *info)
spin_unlock_irqrestore(&info->slock, flags);
#ifdef ROCKET_DEBUG_INTR
- printk(KERN_INFO "(%d,%d,%d,%d)...", info->xmit_cnt, info->xmit_head,
+ printk(KERN_DEBUG "(%d,%d,%d,%d)...\n", info->xmit_cnt, info->xmit_head,
info->xmit_tail, info->xmit_fifo_room);
#endif
}
@@ -501,11 +502,13 @@ static void rp_handle_port(struct r_port *info)
return;
if ((info->flags & ROCKET_INITIALIZED) == 0) {
- printk(KERN_INFO "rp: WARNING: rp_handle_port called with info->flags & NOT_INIT\n");
+ printk(KERN_WARNING "rp: WARNING: rp_handle_port called with "
+ "info->flags & NOT_INIT\n");
return;
}
if (!info->tty) {
- printk(KERN_INFO "rp: WARNING: rp_handle_port called with info->tty==NULL\n");
+ printk(KERN_WARNING "rp: WARNING: rp_handle_port called with "
+ "info->tty==NULL\n");
return;
}
cp = &info->channel;
@@ -513,7 +516,7 @@ static void rp_handle_port(struct r_port *info)
IntMask = sGetChanIntID(cp) & info->intmask;
#ifdef ROCKET_DEBUG_INTR
- printk(KERN_INFO "rp_interrupt %02x...", IntMask);
+ printk(KERN_INFO "rp_interrupt %02x...\n", IntMask);
#endif
ChanStatus = sGetChanStatus(cp);
if (IntMask & RXF_TRIG) { /* Rx FIFO trigger level */
@@ -521,7 +524,7 @@ static void rp_handle_port(struct r_port *info)
}
if (IntMask & DELTA_CD) { /* CD change */
#if (defined(ROCKET_DEBUG_OPEN) || defined(ROCKET_DEBUG_INTR) || defined(ROCKET_DEBUG_HANGUP))
- printk(KERN_INFO "ttyR%d CD now %s...", info->line,
+ printk(KERN_INFO "ttyR%d CD now %s...\n", info->line,
(ChanStatus & CD_ACT) ? "on" : "off");
#endif
if (!(ChanStatus & CD_ACT) && info->cd_status) {
@@ -638,7 +641,8 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)
/* Get a r_port struct for the port, fill it in and save it globally, indexed by line number */
info = kzalloc(sizeof (struct r_port), GFP_KERNEL);
if (!info) {
- printk(KERN_INFO "Couldn't allocate info struct for line #%d\n", line);
+ printk(KERN_ERR "Couldn't allocate info struct for line #%d\n",
+ line);
return;
}
@@ -668,7 +672,8 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)
info->intmask = RXF_TRIG | TXFIFO_MT | SRC_INT | DELTA_CD | DELTA_CTS | DELTA_DSR;
if (sInitChan(ctlp, &info->channel, aiop, chan) == 0) {
- printk(KERN_INFO "RocketPort sInitChan(%d, %d, %d) failed!\n", board, aiop, chan);
+ printk(KERN_ERR "RocketPort sInitChan(%d, %d, %d) failed!\n",
+ board, aiop, chan);
kfree(info);
return;
}
@@ -1007,7 +1012,8 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
atomic_inc(&rp_num_ports_open);
#ifdef ROCKET_DEBUG_OPEN
- printk(KERN_INFO "rocket mod++ = %d...", atomic_read(&rp_num_ports_open));
+ printk(KERN_INFO "rocket mod++ = %d...\n",
+ atomic_read(&rp_num_ports_open));
#endif
}
#ifdef ROCKET_DEBUG_OPEN
@@ -1103,13 +1109,13 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
* one, we've got real problems, since it means the
* serial port won't be shutdown.
*/
- printk(KERN_INFO "rp_close: bad serial port count; tty->count is 1, "
- "info->count is %d\n", info->count);
+ printk(KERN_WARNING "rp_close: bad serial port count; "
+ "tty->count is 1, info->count is %d\n", info->count);
info->count = 1;
}
if (--info->count < 0) {
- printk(KERN_INFO "rp_close: bad serial port count for ttyR%d: %d\n",
- info->line, info->count);
+ printk(KERN_WARNING "rp_close: bad serial port count for "
+ "ttyR%d: %d\n", info->line, info->count);
info->count = 0;
}
if (info->count) {
@@ -1184,7 +1190,8 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
atomic_dec(&rp_num_ports_open);
#ifdef ROCKET_DEBUG_OPEN
- printk(KERN_INFO "rocket mod-- = %d...", atomic_read(&rp_num_ports_open));
+ printk(KERN_INFO "rocket mod-- = %d...\n",
+ atomic_read(&rp_num_ports_open));
printk(KERN_INFO "rp_close ttyR%d complete shutdown\n", info->line);
#endif
@@ -1569,9 +1576,9 @@ static void rp_wait_until_sent(struct tty_struct *tty, int timeout)
orig_jiffies = jiffies;
#ifdef ROCKET_DEBUG_WAIT_UNTIL_SENT
- printk(KERN_INFO "In RP_wait_until_sent(%d) (jiff=%lu)...", timeout,
+ printk(KERN_INFO "In RP_wait_until_sent(%d) (jiff=%lu)...\n", timeout,
jiffies);
- printk(KERN_INFO "cps=%d...", info->cps);
+ printk(KERN_INFO "cps=%d...\n", info->cps);
#endif
while (1) {
txcnt = sGetTxCnt(cp);
@@ -1592,7 +1599,8 @@ static void rp_wait_until_sent(struct tty_struct *tty, int timeout)
if (check_time == 0)
check_time = 1;
#ifdef ROCKET_DEBUG_WAIT_UNTIL_SENT
- printk(KERN_INFO "txcnt = %d (jiff=%lu,check=%d)...", txcnt, jiffies, check_time);
+ printk(KERN_INFO "txcnt = %d (jiff=%lu,check=%d)...\n", txcnt,
+ jiffies, check_time);
#endif
msleep_interruptible(jiffies_to_msecs(check_time));
if (signal_pending(current))
@@ -1616,7 +1624,7 @@ static void rp_hangup(struct tty_struct *tty)
return;
#if (defined(ROCKET_DEBUG_OPEN) || defined(ROCKET_DEBUG_HANGUP))
- printk(KERN_INFO "rp_hangup of ttyR%d...", info->line);
+ printk(KERN_INFO "rp_hangup of ttyR%d...\n", info->line);
#endif
rp_flush_buffer(tty);
if (info->flags & ROCKET_CLOSING)
@@ -1664,7 +1672,7 @@ static void rp_put_char(struct tty_struct *tty, unsigned char ch)
mutex_lock(&info->write_mtx);
#ifdef ROCKET_DEBUG_WRITE
- printk(KERN_INFO "rp_put_char %c...", ch);
+ printk(KERN_INFO "rp_put_char %c...\n", ch);
#endif
spin_lock_irqsave(&info->slock, flags);
@@ -1709,7 +1717,7 @@ static int rp_write(struct tty_struct *tty,
return -ERESTARTSYS;
#ifdef ROCKET_DEBUG_WRITE
- printk(KERN_INFO "rp_write %d chars...", count);
+ printk(KERN_INFO "rp_write %d chars...\n", count);
#endif
cp = &info->channel;
@@ -1798,7 +1806,7 @@ static int rp_write_room(struct tty_struct *tty)
if (ret < 0)
ret = 0;
#ifdef ROCKET_DEBUG_WRITE
- printk(KERN_INFO "rp_write_room returns %d...", ret);
+ printk(KERN_INFO "rp_write_room returns %d...\n", ret);
#endif
return ret;
}
@@ -1818,7 +1826,7 @@ static int rp_chars_in_buffer(struct tty_struct *tty)
cp = &info->channel;
#ifdef ROCKET_DEBUG_WRITE
- printk(KERN_INFO "rp_chars_in_buffer returns %d...", info->xmit_cnt);
+ printk(KERN_INFO "rp_chars_in_buffer returns %d...\n", info->xmit_cnt);
#endif
return info->xmit_cnt;
}
@@ -2161,14 +2169,11 @@ static __init int register_PCI(int i, struct pci_dev *dev)
for (aiop = 0; aiop < max_num_aiops; aiop++)
ctlp->AiopNumChan[aiop] = ports_per_aiop;
- printk("Comtrol PCI controller #%d ID 0x%x found in bus:slot:fn %s at address %04lx, "
- "%d AIOP(s) (%s)\n", i, dev->device, pci_name(dev),
- rcktpt_io_addr[i], num_aiops, rocketModel[i].modelString);
- printk(KERN_INFO "Installing %s, creating /dev/ttyR%d - %ld\n",
- rocketModel[i].modelString,
- rocketModel[i].startingPortNumber,
- rocketModel[i].startingPortNumber +
- rocketModel[i].numPorts - 1);
+ dev_info(&dev->dev, "comtrol PCI controller #%d found at "
+ "address %04lx, %d AIOP(s) (%s), creating ttyR%d - %ld\n",
+ i, rcktpt_io_addr[i], num_aiops, rocketModel[i].modelString,
+ rocketModel[i].startingPortNumber,
+ rocketModel[i].startingPortNumber + rocketModel[i].numPorts-1);
if (num_aiops <= 0) {
rcktpt_io_addr[i] = 0;
@@ -2240,7 +2245,9 @@ static int __init init_ISA(int i)
/* Reserve the IO region */
if (!request_region(rcktpt_io_addr[i], 64, "Comtrol RocketPort")) {
- printk(KERN_INFO "Unable to reserve IO region for configured ISA RocketPort at address 0x%lx, board not installed...\n", rcktpt_io_addr[i]);
+ printk(KERN_ERR "Unable to reserve IO region for configured "
+ "ISA RocketPort at address 0x%lx, board not "
+ "installed...\n", rcktpt_io_addr[i]);
rcktpt_io_addr[i] = 0;
return (0);
}
@@ -2480,7 +2487,7 @@ static void rp_cleanup_module(void)
retval = tty_unregister_driver(rocket_driver);
if (retval)
- printk(KERN_INFO "Error %d while trying to unregister "
+ printk(KERN_ERR "Error %d while trying to unregister "
"rocketport driver\n", -retval);
for (i = 0; i < MAX_RP_PORTS; i++)
diff --git a/drivers/char/rocket_int.h b/drivers/char/rocket_int.h
index 55b8f2d..c3aab52 100644
--- a/drivers/char/rocket_int.h
+++ b/drivers/char/rocket_int.h
@@ -42,7 +42,7 @@ typedef unsigned int DWordIO_t;
static inline void sOutB(unsigned short port, unsigned char value)
{
#ifdef ROCKET_DEBUG_IO
- printk("sOutB(%x, %x)...", port, value);
+ printk(KERN_DEBUG "sOutB(%x, %x)...\n", port, value);
#endif
outb_p(value, port);
}
@@ -50,7 +50,7 @@ static inline void sOutB(unsigned short port, unsigned char value)
static inline void sOutW(unsigned short port, unsigned short value)
{
#ifdef ROCKET_DEBUG_IO
- printk("sOutW(%x, %x)...", port, value);
+ printk(KERN_DEBUG "sOutW(%x, %x)...\n", port, value);
#endif
outw_p(value, port);
}
@@ -58,7 +58,7 @@ static inline void sOutW(unsigned short port, unsigned short value)
static inline void sOutDW(unsigned short port, unsigned long value)
{
#ifdef ROCKET_DEBUG_IO
- printk("sOutDW(%x, %lx)...", port, value);
+ printk(KERN_DEBUG "sOutDW(%x, %lx)...\n", port, value);
#endif
outl_p(cpu_to_le32(value), port);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/7] Char: rocket, remove useless macros
2007-11-09 23:34 [PATCH 1/7] Char: rocket, switch long delay to sleep Jiri Slaby
2007-11-09 23:35 ` [PATCH 2/7] Char: rocket, printk cleanup Jiri Slaby
@ 2007-11-09 23:36 ` Jiri Slaby
2007-11-09 23:42 ` Alan Cox
2007-11-09 23:36 ` [PATCH 4/7] Char: char/serial, remove SERIAL_TYPE_NORMAL redefines Jiri Slaby
` (3 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2007-11-09 23:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
rocket, remove useless macros
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 585adae2019a87909ec738cbd414a330afbe04a8
tree cb170c8236ae0e49b81b50c305fa221aeb4315c2
parent c0e0b8a247ca469f85e51867fb11b5dbc19dace7
author Jiri Slaby <jirislaby@gmail.com> Sat, 20 Oct 2007 22:18:40 +0200
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:26:05 +0100
drivers/char/rocket.c | 11 ++---------
drivers/char/rocket_int.h | 18 ------------------
2 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index ffb34c4..68c289f 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -40,12 +40,6 @@
*/
/****** Defines ******/
-#ifdef PCI_NUM_RESOURCES
-#define PCI_BASE_ADDRESS(dev, r) ((dev)->resource[r].start)
-#else
-#define PCI_BASE_ADDRESS(dev, r) ((dev)->base_address[r])
-#endif
-
#define ROCKET_PARANOIA_CHECK
#define ROCKET_DISABLE_SIMUSAGE
@@ -981,7 +975,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
CHANNEL_t *cp;
unsigned long page;
- line = TTY_GET_LINE(tty);
+ line = tty->index;
if ((line < 0) || (line >= MAX_RP_PORTS) || ((info = rp_table[line]) == NULL))
return -ENXIO;
@@ -1166,8 +1160,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
if (C_HUPCL(tty))
sClrDTR(cp);
- if (TTY_DRIVER_FLUSH_BUFFER_EXISTS(tty))
- TTY_DRIVER_FLUSH_BUFFER(tty);
+ rp_flush_buffer(tty);
tty_ldisc_flush(tty);
diff --git a/drivers/char/rocket_int.h b/drivers/char/rocket_int.h
index c3aab52..f3a7579 100644
--- a/drivers/char/rocket_int.h
+++ b/drivers/char/rocket_int.h
@@ -105,12 +105,6 @@ static inline unsigned short sInW(unsigned short port)
#define AIOPID_NULL -1 /* no AIOP or channel exists */
#define AIOPID_0001 0x0001 /* AIOP release 1 */
-#define NULLDEV -1 /* identifies non-existant device */
-#define NULLCTL -1 /* identifies non-existant controller */
-#define NULLCTLPTR (CONTROLLER_T *)0 /* identifies non-existant controller */
-#define NULLAIOP -1 /* identifies non-existant AIOP */
-#define NULLCHAN -1 /* identifies non-existant channel */
-
/************************************************************************
Global Register Offsets - Direct Access - Fixed values
************************************************************************/
@@ -1187,9 +1181,6 @@ struct r_port {
#define ROCKET_CLOSING 0x40000000 /* Serial port is closing */
#define ROCKET_NORMAL_ACTIVE 0x20000000 /* Normal port is active */
-/* tty subtypes */
-#define SERIAL_TYPE_NORMAL 1
-
/*
* Assigned major numbers for the Comtrol Rocketport
*/
@@ -1240,12 +1231,3 @@ struct r_port {
/* Compact PCI device */
#define PCI_DEVICE_ID_CRP16INTF 0x0903 /* Rocketport Compact PCI 16 port w/external I/F */
-#define TTY_GET_LINE(t) t->index
-#define TTY_DRIVER_MINOR_START(t) t->driver->minor_start
-#define TTY_DRIVER_SUBTYPE(t) t->driver->subtype
-#define TTY_DRIVER_NAME(t) t->driver->name
-#define TTY_DRIVER_NAME_BASE(t) t->driver->name_base
-#define TTY_DRIVER_FLUSH_BUFFER_EXISTS(t) t->driver->flush_buffer
-#define TTY_DRIVER_FLUSH_BUFFER(t) t->driver->flush_buffer(t)
-
-
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/7] Char: char/serial, remove SERIAL_TYPE_NORMAL redefines
2007-11-09 23:34 [PATCH 1/7] Char: rocket, switch long delay to sleep Jiri Slaby
2007-11-09 23:35 ` [PATCH 2/7] Char: rocket, printk cleanup Jiri Slaby
2007-11-09 23:36 ` [PATCH 3/7] Char: rocket, remove useless macros Jiri Slaby
@ 2007-11-09 23:36 ` Jiri Slaby
2007-11-09 23:37 ` [PATCH 5/7] Char: mxser_new, ioaddresses are ulong Jiri Slaby
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Jiri Slaby @ 2007-11-09 23:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Alan Cox
char/serial, remove SERIAL_TYPE_NORMAL redefines
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
---
commit d927dc37e63aa8347e596052615b85ff4936b3e2
tree 0c62b277b0a1b414cd1ac911de0f65b0ebcfd216
parent 585adae2019a87909ec738cbd414a330afbe04a8
author Jiri Slaby <jirislaby@gmail.com> Sat, 20 Oct 2007 22:35:24 +0200
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:33:04 +0100
drivers/char/epca.h | 1 -
drivers/char/esp.c | 3 ---
drivers/char/ip2/ip2main.c | 3 ---
drivers/char/mxser.c | 3 ---
drivers/char/serial167.c | 2 --
drivers/char/sx.h | 2 --
drivers/serial/68328serial.c | 3 ---
drivers/serial/crisv10.c | 5 -----
include/linux/isicom.h | 2 --
9 files changed, 0 insertions(+), 24 deletions(-)
diff --git a/drivers/char/epca.h b/drivers/char/epca.h
index a297238..3c77c02 100644
--- a/drivers/char/epca.h
+++ b/drivers/char/epca.h
@@ -77,7 +77,6 @@ static char *board_desc[] =
#define ON 1
#define FEPTIMEOUT 200000
-#define SERIAL_TYPE_NORMAL 1
#define SERIAL_TYPE_INFO 3
#define EPCA_EVENT_HANGUP 1
#define EPCA_MAGIC 0x5c6df104L
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 2860776..b5df2dc 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -111,9 +111,6 @@ static char serial_version[] __initdata = "2.2";
static struct tty_driver *esp_driver;
-/* serial subtype definitions */
-#define SERIAL_TYPE_NORMAL 1
-
/*
* Serial driver configuration section. Here are the various options:
*
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index e04e66c..d46d068 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -153,9 +153,6 @@ static char *pcVersion = "1.2.14";
static char *pcDriver_name = "ip2";
static char *pcIpl = "ip2ipl";
-/* Serial subtype definitions */
-#define SERIAL_TYPE_NORMAL 1
-
// cheezy kludge or genius - you decide?
int ip2_loadmain(int *, int *, unsigned char *, int);
static unsigned char *Fip_firmware;
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 4742078..5d79010 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -81,9 +81,6 @@
#define MXSER_ERR_IRQ_CONFLIT -3
#define MXSER_ERR_VECTOR -4
-#define SERIAL_TYPE_NORMAL 1
-#define SERIAL_TYPE_CALLOUT 2
-
#define WAKEUP_CHARS 256
#define UART_MCR_AFE 0x20
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index f1497ce..cbf21cc 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -90,8 +90,6 @@
#define STD_COM_FLAGS (0)
-#define SERIAL_TYPE_NORMAL 1
-
static struct tty_driver *cy_serial_driver;
extern int serial_console;
static struct cyclades_port *serial_console_info = NULL;
diff --git a/drivers/char/sx.h b/drivers/char/sx.h
index 70d9783..87c2def 100644
--- a/drivers/char/sx.h
+++ b/drivers/char/sx.h
@@ -88,8 +88,6 @@ struct vpd_prom {
#define IS_CF_BOARD(board) (board->flags & (SX_CFISA_BOARD | SX_CFPCI_BOARD))
-#define SERIAL_TYPE_NORMAL 1
-
/* The SI processor clock is required to calculate the cc_int_count register
value for the SI cards. */
#define SI_PROCESSOR_CLOCK 25000000
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index aad4012..b6bb826 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -84,9 +84,6 @@ extern wait_queue_head_t keypress_wait;
struct tty_driver *serial_driver;
-/* serial subtype definitions */
-#define SERIAL_TYPE_NORMAL 1
-
/* number of characters left in xmit buffer before we ask for more */
#define WAKEUP_CHARS 256
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c
index a4e23cf..383c4e6 100644
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -68,11 +68,6 @@ static char *serial_version = "$Revision: 1.25 $";
struct tty_driver *serial_driver;
-/* serial subtype definitions */
-#ifndef SERIAL_TYPE_NORMAL
-#define SERIAL_TYPE_NORMAL 1
-#endif
-
/* number of characters left in xmit buffer before we ask for more */
#define WAKEUP_CHARS 256
diff --git a/include/linux/isicom.h b/include/linux/isicom.h
index 45b3d48..8f4c717 100644
--- a/include/linux/isicom.h
+++ b/include/linux/isicom.h
@@ -37,8 +37,6 @@
#define BOARD_COUNT 4
#define PORT_COUNT (BOARD_COUNT*16)
-#define SERIAL_TYPE_NORMAL 1
-
/* character sizes */
#define ISICOM_CS5 0x0000
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/7] Char: mxser_new, ioaddresses are ulong
2007-11-09 23:34 [PATCH 1/7] Char: rocket, switch long delay to sleep Jiri Slaby
` (2 preceding siblings ...)
2007-11-09 23:36 ` [PATCH 4/7] Char: char/serial, remove SERIAL_TYPE_NORMAL redefines Jiri Slaby
@ 2007-11-09 23:37 ` Jiri Slaby
2007-11-09 23:38 ` [PATCH 6/7] Char: stallion, fix compiler warnings Jiri Slaby
2007-11-09 23:38 ` [PATCH 7/7] Char: riscom8, change rc_init_drivers prototype Jiri Slaby
5 siblings, 0 replies; 9+ messages in thread
From: Jiri Slaby @ 2007-11-09 23:37 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
mxser_new, ioaddresses are ulong
To not pass ulong address as int parameter, switch it to ulong.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit f412e3e0d4d012b7b57e381ae85ddfb1b5fc99bf
tree 3c00698655cc3b6fd7a99139607578a34358093d
parent d927dc37e63aa8347e596052615b85ff4936b3e2
author Jiri Slaby <jirislaby@gmail.com> Sat, 20 Oct 2007 22:56:49 +0200
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:34:26 +0100
drivers/char/mxser_new.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index bf1bee4..a4358ac 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -320,7 +320,7 @@ static struct mxser_mon_ext mon_data_ext;
static int mxser_set_baud_method[MXSER_PORTS + 1];
#ifdef CONFIG_PCI
-static int __devinit CheckIsMoxaMust(int io)
+static int __devinit CheckIsMoxaMust(unsigned long io)
{
u8 oldmcr, hwid;
int i;
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6/7] Char: stallion, fix compiler warnings
2007-11-09 23:34 [PATCH 1/7] Char: rocket, switch long delay to sleep Jiri Slaby
` (3 preceding siblings ...)
2007-11-09 23:37 ` [PATCH 5/7] Char: mxser_new, ioaddresses are ulong Jiri Slaby
@ 2007-11-09 23:38 ` Jiri Slaby
2007-11-09 23:38 ` [PATCH 7/7] Char: riscom8, change rc_init_drivers prototype Jiri Slaby
5 siblings, 0 replies; 9+ messages in thread
From: Jiri Slaby @ 2007-11-09 23:38 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
stallion, fix compiler warnings
Don't emit warnings on 64 bit platforms from min(). sizeof() on those
is not uint, neither 2 pointers difference, cast it to uint by min_t in
both cases.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 7a411a4d1729e34bd7dc6697a8eedec7dd989c32
tree 2422610e5f3cdde71c9a5cec4d134baf9b72daa5
parent f412e3e0d4d012b7b57e381ae85ddfb1b5fc99bf
author Jiri Slaby <jirislaby@gmail.com> Tue, 23 Oct 2007 12:47:28 +0200
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:36:31 +0100
drivers/char/stallion.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 45758d5..5050aa5 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -3546,7 +3546,8 @@ static void stl_cd1400txisr(struct stlpanel *panelp, int ioaddr)
} else {
len = min(len, CD1400_TXFIFOSIZE);
portp->stats.txtotal += len;
- stlen = min(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
+ stlen = min_t(unsigned int, len,
+ (portp->tx.buf + STL_TXBUFSIZE) - tail);
outb((TDR + portp->uartaddr), ioaddr);
outsb((ioaddr + EREG_DATA), tail, stlen);
len -= stlen;
@@ -3599,7 +3600,7 @@ static void stl_cd1400rxisr(struct stlpanel *panelp, int ioaddr)
outb((RDCR + portp->uartaddr), ioaddr);
len = inb(ioaddr + EREG_DATA);
if (tty == NULL || (buflen = tty_buffer_request_room(tty, len)) == 0) {
- len = min(len, sizeof(stl_unwanted));
+ len = min_t(unsigned int, len, sizeof(stl_unwanted));
outb((RDSR + portp->uartaddr), ioaddr);
insb((ioaddr + EREG_DATA), &stl_unwanted[0], len);
portp->stats.rxlost += len;
@@ -4465,7 +4466,8 @@ static void stl_sc26198txisr(struct stlport *portp)
} else {
len = min(len, SC26198_TXFIFOSIZE);
portp->stats.txtotal += len;
- stlen = min(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
+ stlen = min_t(unsigned int, len,
+ (portp->tx.buf + STL_TXBUFSIZE) - tail);
outb(GTXFIFO, (ioaddr + XP_ADDR));
outsb((ioaddr + XP_DATA), tail, stlen);
len -= stlen;
@@ -4506,7 +4508,7 @@ static void stl_sc26198rxisr(struct stlport *portp, unsigned int iack)
if ((iack & IVR_TYPEMASK) == IVR_RXDATA) {
if (tty == NULL || (buflen = tty_buffer_request_room(tty, len)) == 0) {
- len = min(len, sizeof(stl_unwanted));
+ len = min_t(unsigned int, len, sizeof(stl_unwanted));
outb(GRXFIFO, (ioaddr + XP_ADDR));
insb((ioaddr + XP_DATA), &stl_unwanted[0], len);
portp->stats.rxlost += len;
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 7/7] Char: riscom8, change rc_init_drivers prototype
2007-11-09 23:34 [PATCH 1/7] Char: rocket, switch long delay to sleep Jiri Slaby
` (4 preceding siblings ...)
2007-11-09 23:38 ` [PATCH 6/7] Char: stallion, fix compiler warnings Jiri Slaby
@ 2007-11-09 23:38 ` Jiri Slaby
5 siblings, 0 replies; 9+ messages in thread
From: Jiri Slaby @ 2007-11-09 23:38 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
riscom8, change rc_init_drivers prototype
Let compiler decide if the rc_init_drivers function will be inlined and
mark it as __init, because it's called only from __init function.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit da1c9104ea38d0ca6e5ce0ee9be8cb6adff0ee71
tree 6878cf4f80d1e7bd4aa81a188dff5d13761ed867
parent 7a411a4d1729e34bd7dc6697a8eedec7dd989c32
author Jiri Slaby <jirislaby@gmail.com> Sat, 27 Oct 2007 00:31:26 +0200
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:40:52 +0100
drivers/char/riscom8.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index d130b87..9b19abf 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -1618,7 +1618,7 @@ static const struct tty_operations riscom_ops = {
.tiocmset = rc_tiocmset,
};
-static inline int rc_init_drivers(void)
+static int __init rc_init_drivers(void)
{
int error;
int i;
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/7] Char: rocket, printk cleanup
2007-11-09 23:35 ` [PATCH 2/7] Char: rocket, printk cleanup Jiri Slaby
@ 2007-11-09 23:41 ` Alan Cox
0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2007-11-09 23:41 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Andrew Morton, linux-kernel
> - printk(KERN_INFO "rp_do_receive(%d)...", ToRecv);
> + printk(KERN_INFO "rp_do_receive(%d)...\n", ToRecv);
The missing \n was intentional looking at the old code, and meant you got
a lot of trace per line for debugging. The KERN_ additions are the
breakage here.
We might as well just lose them, we have proper debuggers now and they
are useless with \n, and pretty useless without.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/7] Char: rocket, remove useless macros
2007-11-09 23:36 ` [PATCH 3/7] Char: rocket, remove useless macros Jiri Slaby
@ 2007-11-09 23:42 ` Alan Cox
0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2007-11-09 23:42 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Andrew Morton, linux-kernel
On Fri, 9 Nov 2007 18:36:08 -0500
Jiri Slaby <jirislaby@gmail.com> wrote:
> rocket, remove useless macros
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
I'd just done some of that in my tree too. I have some other changes but
they don't overlap (termios and a very very minor auth fix)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-11-09 23:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-09 23:34 [PATCH 1/7] Char: rocket, switch long delay to sleep Jiri Slaby
2007-11-09 23:35 ` [PATCH 2/7] Char: rocket, printk cleanup Jiri Slaby
2007-11-09 23:41 ` Alan Cox
2007-11-09 23:36 ` [PATCH 3/7] Char: rocket, remove useless macros Jiri Slaby
2007-11-09 23:42 ` Alan Cox
2007-11-09 23:36 ` [PATCH 4/7] Char: char/serial, remove SERIAL_TYPE_NORMAL redefines Jiri Slaby
2007-11-09 23:37 ` [PATCH 5/7] Char: mxser_new, ioaddresses are ulong Jiri Slaby
2007-11-09 23:38 ` [PATCH 6/7] Char: stallion, fix compiler warnings Jiri Slaby
2007-11-09 23:38 ` [PATCH 7/7] Char: riscom8, change rc_init_drivers prototype Jiri Slaby
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®