Commit 6f418259 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Greg Kroah-Hartman

staging: dgnc: remove space after cast

Space is not necessary after typecast.
Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 205fc1fc
...@@ -438,7 +438,7 @@ static void cls_param(struct tty_struct *tty) ...@@ -438,7 +438,7 @@ static void cls_param(struct tty_struct *tty)
if (!tty || tty->magic != TTY_MAGIC) if (!tty || tty->magic != TTY_MAGIC)
return; return;
un = (struct un_t *) tty->driver_data; un = (struct un_t *)tty->driver_data;
if (!un || un->magic != DGNC_UNIT_MAGIC) if (!un || un->magic != DGNC_UNIT_MAGIC)
return; return;
...@@ -676,7 +676,7 @@ static void cls_param(struct tty_struct *tty) ...@@ -676,7 +676,7 @@ static void cls_param(struct tty_struct *tty)
*/ */
static void cls_tasklet(unsigned long data) static void cls_tasklet(unsigned long data)
{ {
struct dgnc_board *bd = (struct dgnc_board *) data; struct dgnc_board *bd = (struct dgnc_board *)data;
struct channel_t *ch; struct channel_t *ch;
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -904,7 +904,7 @@ static int cls_drain(struct tty_struct *tty, uint seconds) ...@@ -904,7 +904,7 @@ static int cls_drain(struct tty_struct *tty, uint seconds)
if (!tty || tty->magic != TTY_MAGIC) if (!tty || tty->magic != TTY_MAGIC)
return -ENXIO; return -ENXIO;
un = (struct un_t *) tty->driver_data; un = (struct un_t *)tty->driver_data;
if (!un || un->magic != DGNC_UNIT_MAGIC) if (!un || un->magic != DGNC_UNIT_MAGIC)
return -ENXIO; return -ENXIO;
......
...@@ -452,7 +452,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) ...@@ -452,7 +452,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
brd->iobase = pci_resource_start(pdev, 1); brd->iobase = pci_resource_start(pdev, 1);
brd->iobase_end = pci_resource_end(pdev, 1); brd->iobase_end = pci_resource_end(pdev, 1);
brd->iobase = ((unsigned int) (brd->iobase)) & 0xFFFE; brd->iobase = ((unsigned int)(brd->iobase)) & 0xFFFE;
/* Assign the board_ops struct */ /* Assign the board_ops struct */
brd->bd_ops = &dgnc_cls_ops; brd->bd_ops = &dgnc_cls_ops;
...@@ -559,7 +559,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) ...@@ -559,7 +559,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
/* init our poll helper tasklet */ /* init our poll helper tasklet */
tasklet_init(&brd->helper_tasklet, tasklet_init(&brd->helper_tasklet,
brd->bd_ops->tasklet, brd->bd_ops->tasklet,
(unsigned long) brd); (unsigned long)brd);
spin_lock_irqsave(&dgnc_global_lock, flags); spin_lock_irqsave(&dgnc_global_lock, flags);
brd->msgbuf = NULL; brd->msgbuf = NULL;
...@@ -672,7 +672,7 @@ static void dgnc_poll_handler(ulong dummy) ...@@ -672,7 +672,7 @@ static void dgnc_poll_handler(ulong dummy)
new_time = dgnc_poll_time - jiffies; new_time = dgnc_poll_time - jiffies;
if ((ulong) new_time >= 2 * dgnc_poll_tick) if ((ulong)new_time >= 2 * dgnc_poll_tick)
dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick); dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick);
setup_timer(&dgnc_poll_timer, dgnc_poll_handler, 0); setup_timer(&dgnc_poll_timer, dgnc_poll_handler, 0);
......
...@@ -96,7 +96,7 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file) ...@@ -96,7 +96,7 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file)
long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ {
unsigned long flags; unsigned long flags;
void __user *uarg = (void __user *) arg; void __user *uarg = (void __user *)arg;
switch (cmd) { switch (cmd) {
case DIGI_GETDD: case DIGI_GETDD:
...@@ -142,8 +142,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -142,8 +142,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
di.info_bdtype = dgnc_Board[brd]->dpatype; di.info_bdtype = dgnc_Board[brd]->dpatype;
di.info_bdstate = dgnc_Board[brd]->dpastatus; di.info_bdstate = dgnc_Board[brd]->dpastatus;
di.info_ioport = 0; di.info_ioport = 0;
di.info_physaddr = (ulong) dgnc_Board[brd]->membase; di.info_physaddr = (ulong)dgnc_Board[brd]->membase;
di.info_physsize = (ulong) dgnc_Board[brd]->membase di.info_physsize = (ulong)dgnc_Board[brd]->membase
- dgnc_Board[brd]->membase_end; - dgnc_Board[brd]->membase_end;
if (dgnc_Board[brd]->state != BOARD_FAILED) if (dgnc_Board[brd]->state != BOARD_FAILED)
di.info_nports = dgnc_Board[brd]->nasync; di.info_nports = dgnc_Board[brd]->nasync;
......
...@@ -590,7 +590,7 @@ static void neo_param(struct tty_struct *tty) ...@@ -590,7 +590,7 @@ static void neo_param(struct tty_struct *tty)
if (!tty || tty->magic != TTY_MAGIC) if (!tty || tty->magic != TTY_MAGIC)
return; return;
un = (struct un_t *) tty->driver_data; un = (struct un_t *)tty->driver_data;
if (!un || un->magic != DGNC_UNIT_MAGIC) if (!un || un->magic != DGNC_UNIT_MAGIC)
return; return;
...@@ -828,7 +828,7 @@ static void neo_param(struct tty_struct *tty) ...@@ -828,7 +828,7 @@ static void neo_param(struct tty_struct *tty)
*/ */
static void neo_tasklet(unsigned long data) static void neo_tasklet(unsigned long data)
{ {
struct dgnc_board *bd = (struct dgnc_board *) data; struct dgnc_board *bd = (struct dgnc_board *)data;
struct channel_t *ch; struct channel_t *ch;
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -1151,7 +1151,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) ...@@ -1151,7 +1151,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
break; break;
/* Make sure we don't go over the end of our queue */ /* Make sure we don't go over the end of our queue */
n = min(((uint) total), (RQUEUESIZE - (uint) head)); n = min(((uint)total), (RQUEUESIZE - (uint)head));
/* /*
* Cut down n even further if needed, this is to fix * Cut down n even further if needed, this is to fix
...@@ -1256,7 +1256,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) ...@@ -1256,7 +1256,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
} }
memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, 1); memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, 1);
ch->ch_equeue[head] = (unsigned char) linestatus; ch->ch_equeue[head] = (unsigned char)linestatus;
/* Ditch any remaining linestatus value. */ /* Ditch any remaining linestatus value. */
linestatus = 0; linestatus = 0;
...@@ -1291,7 +1291,7 @@ static int neo_drain(struct tty_struct *tty, uint seconds) ...@@ -1291,7 +1291,7 @@ static int neo_drain(struct tty_struct *tty, uint seconds)
if (!tty || tty->magic != TTY_MAGIC) if (!tty || tty->magic != TTY_MAGIC)
return -ENXIO; return -ENXIO;
un = (struct un_t *) tty->driver_data; un = (struct un_t *)tty->driver_data;
if (!un || un->magic != DGNC_UNIT_MAGIC) if (!un || un->magic != DGNC_UNIT_MAGIC)
return -ENXIO; return -ENXIO;
...@@ -1447,7 +1447,7 @@ static void neo_copy_data_from_queue_to_uart(struct channel_t *ch) ...@@ -1447,7 +1447,7 @@ static void neo_copy_data_from_queue_to_uart(struct channel_t *ch)
n = readb(&ch->ch_neo_uart->tfifo); n = readb(&ch->ch_neo_uart->tfifo);
if ((unsigned int) n > ch->ch_t_tlevel) if ((unsigned int)n > ch->ch_t_tlevel)
goto exit_unlock; goto exit_unlock;
n = UART_17158_TX_FIFOSIZE - ch->ch_t_tlevel; n = UART_17158_TX_FIFOSIZE - ch->ch_t_tlevel;
......
...@@ -1440,7 +1440,7 @@ static void dgnc_tty_close(struct tty_struct *tty, struct file *file) ...@@ -1440,7 +1440,7 @@ static void dgnc_tty_close(struct tty_struct *tty, struct file *file)
*/ */
if ((un->un_type == DGNC_PRINT) && (ch->ch_flags & CH_PRON)) { if ((un->un_type == DGNC_PRINT) && (ch->ch_flags & CH_PRON)) {
dgnc_wmove(ch, ch->ch_digi.digi_offstr, dgnc_wmove(ch, ch->ch_digi.digi_offstr,
(int) ch->ch_digi.digi_offlen); (int)ch->ch_digi.digi_offlen);
ch->ch_flags &= ~CH_PRON; ch->ch_flags &= ~CH_PRON;
} }
...@@ -1487,7 +1487,7 @@ static void dgnc_tty_close(struct tty_struct *tty, struct file *file) ...@@ -1487,7 +1487,7 @@ static void dgnc_tty_close(struct tty_struct *tty, struct file *file)
*/ */
if ((un->un_type == DGNC_PRINT) && (ch->ch_flags & CH_PRON)) { if ((un->un_type == DGNC_PRINT) && (ch->ch_flags & CH_PRON)) {
dgnc_wmove(ch, ch->ch_digi.digi_offstr, dgnc_wmove(ch, ch->ch_digi.digi_offstr,
(int) ch->ch_digi.digi_offlen); (int)ch->ch_digi.digi_offlen);
ch->ch_flags &= ~CH_PRON; ch->ch_flags &= ~CH_PRON;
} }
} }
...@@ -1756,7 +1756,7 @@ static int dgnc_tty_write(struct tty_struct *tty, ...@@ -1756,7 +1756,7 @@ static int dgnc_tty_write(struct tty_struct *tty,
*/ */
if ((un->un_type == DGNC_PRINT) && !(ch->ch_flags & CH_PRON)) { if ((un->un_type == DGNC_PRINT) && !(ch->ch_flags & CH_PRON)) {
dgnc_wmove(ch, ch->ch_digi.digi_onstr, dgnc_wmove(ch, ch->ch_digi.digi_onstr,
(int) ch->ch_digi.digi_onlen); (int)ch->ch_digi.digi_onlen);
head = (ch->ch_w_head) & tmask; head = (ch->ch_w_head) & tmask;
ch->ch_flags |= CH_PRON; ch->ch_flags |= CH_PRON;
} }
...@@ -1767,7 +1767,7 @@ static int dgnc_tty_write(struct tty_struct *tty, ...@@ -1767,7 +1767,7 @@ static int dgnc_tty_write(struct tty_struct *tty,
*/ */
if ((un->un_type != DGNC_PRINT) && (ch->ch_flags & CH_PRON)) { if ((un->un_type != DGNC_PRINT) && (ch->ch_flags & CH_PRON)) {
dgnc_wmove(ch, ch->ch_digi.digi_offstr, dgnc_wmove(ch, ch->ch_digi.digi_offstr,
(int) ch->ch_digi.digi_offlen); (int)ch->ch_digi.digi_offlen);
head = (ch->ch_w_head) & tmask; head = (ch->ch_w_head) & tmask;
ch->ch_flags &= ~CH_PRON; ch->ch_flags &= ~CH_PRON;
} }
...@@ -2554,7 +2554,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -2554,7 +2554,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
struct un_t *un; struct un_t *un;
int rc; int rc;
unsigned long flags; unsigned long flags;
void __user *uarg = (void __user *) arg; void __user *uarg = (void __user *)arg;
if (!tty || tty->magic != TTY_MAGIC) if (!tty || tty->magic != TTY_MAGIC)
return -ENODEV; return -ENODEV;
...@@ -2660,13 +2660,13 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -2660,13 +2660,13 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
spin_unlock_irqrestore(&ch->ch_lock, flags); spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = put_user(C_CLOCAL(tty) ? 1 : 0, rc = put_user(C_CLOCAL(tty) ? 1 : 0,
(unsigned long __user *) arg); (unsigned long __user *)arg);
return rc; return rc;
case TIOCSSOFTCAR: case TIOCSSOFTCAR:
spin_unlock_irqrestore(&ch->ch_lock, flags); spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = get_user(arg, (unsigned long __user *) arg); rc = get_user(arg, (unsigned long __user *)arg);
if (rc) if (rc)
return rc; return rc;
...@@ -2814,7 +2814,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -2814,7 +2814,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
* could sleep * could sleep
*/ */
spin_unlock_irqrestore(&ch->ch_lock, flags); spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = get_user(loopback, (unsigned int __user *) arg); rc = get_user(loopback, (unsigned int __user *)arg);
if (rc) if (rc)
return rc; return rc;
spin_lock_irqsave(&ch->ch_lock, flags); spin_lock_irqsave(&ch->ch_lock, flags);
...@@ -2832,7 +2832,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -2832,7 +2832,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
case DIGI_GETCUSTOMBAUD: case DIGI_GETCUSTOMBAUD:
spin_unlock_irqrestore(&ch->ch_lock, flags); spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = put_user(ch->ch_custom_speed, (unsigned int __user *) arg); rc = put_user(ch->ch_custom_speed, (unsigned int __user *)arg);
return rc; return rc;
case DIGI_SETCUSTOMBAUD: case DIGI_SETCUSTOMBAUD:
...@@ -2840,7 +2840,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -2840,7 +2840,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
int new_rate; int new_rate;
/* Let go of locks when accessing user space, could sleep */ /* Let go of locks when accessing user space, could sleep */
spin_unlock_irqrestore(&ch->ch_lock, flags); spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = get_user(new_rate, (int __user *) arg); rc = get_user(new_rate, (int __user *)arg);
if (rc) if (rc)
return rc; return rc;
spin_lock_irqsave(&ch->ch_lock, flags); spin_lock_irqsave(&ch->ch_lock, flags);
...@@ -2862,7 +2862,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -2862,7 +2862,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned char c; unsigned char c;
spin_unlock_irqrestore(&ch->ch_lock, flags); spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = get_user(c, (unsigned char __user *) arg); rc = get_user(c, (unsigned char __user *)arg);
if (rc) if (rc)
return rc; return rc;
spin_lock_irqsave(&ch->ch_lock, flags); spin_lock_irqsave(&ch->ch_lock, flags);
...@@ -2919,7 +2919,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -2919,7 +2919,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
events |= (EV_IPU | EV_IPS); events |= (EV_IPU | EV_IPS);
spin_unlock_irqrestore(&ch->ch_lock, flags); spin_unlock_irqrestore(&ch->ch_lock, flags);
rc = put_user(events, (unsigned int __user *) arg); rc = put_user(events, (unsigned int __user *)arg);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment