staging: dgnc: remove DPR Macros and related codes.
PATCH 1/1 staging: dgnc: remove DPR Macros and related codes.
In dgnc_drivers.h, DPR macro and DPR_* macros are defined but do nothing.
So remove them and related codes.
CC Lidza Louina <[email protected]>
CC Mark Hounschell <[email protected]>
Signed-off-by Seunghun Lee <[email protected]>
--- drivers/staging/dgnc/dgnc_cls.c | 51 -------- drivers/staging/dgnc/dgnc_driver.c | 19 +-- drivers/staging/dgnc/dgnc_driver.h | 21 --- drivers/staging/dgnc/dgnc_mgmt.c | 23 ---- drivers/staging/dgnc/dgnc_neo.c | 104 ++------------- drivers/staging/dgnc/dgnc_tty.c | 249 +++--------------------------------- 6 files changed, 29 insertions(+), 438 deletions(-)
drivers/staging/dgnc/dgnc_cls.c +0 -51
@@ -99,7 +99,6 @@ static inline void cls_set_cts_flow_control(struct channel_t *ch)uchar ier =readb (&ch->ch_cls_uart->ier);uchar isr_fcr =0 ; -DPR_PARAM (("Setting CTSFLOW\n" ));/* * The Enhanced Register Set may only be accessed when
@@ -144,7 +143,6 @@ static inline void cls_set_ixon_flow_control(struct channel_t *ch)uchar ier =readb (&ch->ch_cls_uart->ier);uchar isr_fcr =0 ; -DPR_PARAM (("Setting IXON FLOW\n" ));/* * The Enhanced Register Set may only be accessed when
@@ -193,7 +191,6 @@ static inline void cls_set_no_output_flow_control(struct channel_t *ch)uchar ier =readb (&ch->ch_cls_uart->ier);uchar isr_fcr =0 ; -DPR_PARAM (("Unsetting Output FLOW\n" ));/* * The Enhanced Register Set may only be accessed when
@@ -240,7 +237,6 @@ static inline void cls_set_rts_flow_control(struct channel_t *ch)uchar ier =readb (&ch->ch_cls_uart->ier);uchar isr_fcr =0 ; -DPR_PARAM (("Setting RTSFLOW\n" ));/* * The Enhanced Register Set may only be accessed when
@@ -283,7 +279,6 @@ static inline void cls_set_ixoff_flow_control(struct channel_t *ch)uchar ier =readb (&ch->ch_cls_uart->ier);uchar isr_fcr =0 ; -DPR_PARAM (("Setting IXOFF FLOW\n" ));/* * The Enhanced Register Set may only be accessed when
@@ -328,7 +323,6 @@ static inline void cls_set_no_input_flow_control(struct channel_t *ch)uchar ier =readb (&ch->ch_cls_uart->ier);uchar isr_fcr =0 ; -DPR_PARAM (("Unsetting Input FLOW\n" ));/* * The Enhanced Register Set may only be accessed when
@@ -394,8 +388,6 @@ static inline void cls_clear_break(struct channel_t *ch, int force)writeb ((temp & ~UART_LCR_SBC ), &ch->ch_cls_uart->lcr); ch->ch_flags &= ~(CH_BREAK_SENDING ); ch->ch_stop_sending_break =0 ; -DPR_IOCTL (("Finishing UART_LCR_SBC! finished: %lx\n" , - jiffies)); } }DGNC_UNLOCK (ch->ch_lock, lock_flags);
@@ -430,9 +422,6 @@ static inline void cls_parse_isr(struct dgnc_board *brd, uint port)if (isr &UART_IIR_NO_INT )break ; -DPR_INTR (("%s:%d port: %x isr: %x\n" , __FILE__, __LINE__, - port, isr)); -/* Receive Interrupt pending */ if (isr & (UART_IIR_RDI |UART_IIR_RDI_TIMEOUT )) {/* Read data from uart -> queue */
@@ -464,7 +453,6 @@ static inline void cls_parse_isr(struct dgnc_board *brd, uint port) }/* Parse any modem signal changes */ -DPR_INTR (("MOD_STAT: sending to parse_modem_sigs\n" ));cls_parse_modem (ch,readb (&ch->ch_cls_uart->msr)); } }
@@ -501,10 +489,6 @@ static void cls_param(struct tty_struct *tty)if (!bd || bd->magic !=DGNC_BOARD_MAGIC )return ; -DPR_PARAM (("param start: tdev: %x cflags: %x oflags: %x iflags: %x\n" , - ch->ch_tun.un_dev, ch->ch_c_cflag, ch->ch_c_oflag, - ch->ch_c_iflag)); -/* * If baud rate is zero, flush queues, and set mval to drop DTR. */
@@ -588,8 +572,6 @@ static void cls_param(struct tty_struct *tty) (jindex < 16)) { baud = bauds[iindex][jindex]; } else { -DPR_IOCTL (("baud indices were out of range (%d)(%d)" , - iindex, jindex)); baud =0 ; }
@@ -840,14 +822,10 @@ static irqreturn_t cls_intr(int irq, void *voidbrd)/* If 0, no interrupts pending */ if (!poll_reg) { -DPR_INTR (( -"Kernel interrupted to me, but no pending interrupts...\n" ));DGNC_UNLOCK (brd->bd_intr_lock, lock_flags);return IRQ_NONE ; } -DPR_INTR (("%s:%d poll_reg: %x\n" , __FILE__, __LINE__, poll_reg)); -/* Parse each port to find out what caused the interrupt */ for (i =0 ; i < brd->nasync; i++)cls_parse_isr (brd, i);
@@ -859,7 +837,6 @@ static irqreturn_t cls_intr(int irq, void *voidbrd)DGNC_UNLOCK (brd->bd_intr_lock, lock_flags); -DPR_INTR (("dgnc_intr finish.\n" ));return IRQ_HANDLED ; }
@@ -938,9 +915,6 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch)* I hope thats okay with everyone? Yes? Good. */ while (qleft <1 ) { -DPR_READ (("Queue full, dropping DATA:%x LSR:%x\n" , - ch->ch_rqueue[tail], ch->ch_equeue[tail])); - ch->ch_r_tail = tail = (tail +1 ) &RQUEUEMASK ; ch->ch_err_overrun++; qleft++;
@@ -954,9 +928,6 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch) qleft--; -DPR_READ (("DATA/LSR pair: %x %x\n" , ch->ch_rqueue[head], - ch->ch_equeue[head])); -if (ch->ch_equeue[head] &UART_LSR_PE ) ch->ch_err_parity++;if (ch->ch_equeue[head] &UART_LSR_BI )
@@ -1012,8 +983,6 @@ static int cls_drain(struct tty_struct *tty, uint seconds) ((un->un_flags & UN_EMPTY) == 0));/* If ret is non-zero, user ctrl-c'ed us */ -if (rc) -DPR_IOCTL (("%d Drain - User ctrl c'ed\n" , __LINE__));return rc; }
@@ -1126,7 +1095,6 @@ static void cls_copy_data_from_queue_to_uart(struct channel_t *ch)writeb (ch->ch_wqueue[ch->ch_w_tail], &ch->ch_cls_uart->txrx);dgnc_sniff_nowait_nolock (ch,"UART WRITE" , ch->ch_wqueue + ch->ch_w_tail,1 ); -DPR_WRITE (("Tx data: %x\n" , ch->ch_wqueue[ch->ch_w_tail])); ch->ch_w_tail++; ch->ch_w_tail &=WQUEUEMASK ; ch->ch_txcount++;
@@ -1149,9 +1117,6 @@ static void cls_parse_modem(struct channel_t *ch, uchar signals)if (!ch || ch->magic !=DGNC_CHANNEL_MAGIC )return ; -DPR_MSIGS (("cls_parse_modem: port: %d signals: %d\n" , - ch->ch_portnum, msignals)); -/* * Do altpin switching. Altpin switches DCD and DSR. * This prolly breaks DSRPACE, so we should be more clever here.
@@ -1206,17 +1171,6 @@ static void cls_parse_modem(struct channel_t *ch, uchar signals)else ch->ch_mistat &= ~UART_MSR_CTS ;DGNC_UNLOCK (ch->ch_lock, lock_flags); - - -DPR_MSIGS (( -"Port: %d DTR: %d RTS: %d CTS: %d DSR: %d " "RI: %d CD: %d\n" , - ch->ch_portnum, - !!((ch->ch_mistat | ch->ch_mostat) &UART_MCR_DTR ), - !!((ch->ch_mistat | ch->ch_mostat) &UART_MCR_RTS ), - !!((ch->ch_mistat | ch->ch_mostat) &UART_MSR_CTS ), - !!((ch->ch_mistat | ch->ch_mostat) &UART_MSR_DSR ), - !!((ch->ch_mistat | ch->ch_mostat) &UART_MSR_RI ), - !!((ch->ch_mistat | ch->ch_mostat) &UART_MSR_DCD ))); }
@@ -1363,8 +1317,6 @@ static void cls_send_break(struct channel_t *ch, int msecs)writeb ((temp & ~UART_LCR_SBC ), &ch->ch_cls_uart->lcr); ch->ch_flags &= ~(CH_BREAK_SENDING ); ch->ch_stop_sending_break =0 ; -DPR_IOCTL (("Finishing UART_LCR_SBC! finished: %lx\n" , - jiffies)); }return ; }
@@ -1382,9 +1334,6 @@ static void cls_send_break(struct channel_t *ch, int msecs)writeb ((temp |UART_LCR_SBC ), &ch->ch_cls_uart->lcr); ch->ch_flags |= (CH_BREAK_SENDING ); -DPR_IOCTL (( -"Port %d. Starting UART_LCR_SBC! start: %lx should end: %lx\n" , - ch->ch_portnum, jiffies, ch->ch_stop_sending_break)); } }
drivers/staging/dgnc/dgnc_driver.c +1 -18
@@ -250,7 +250,6 @@ static int __init dgnc_init_module(void)dgnc_create_driver_sysfiles (&dgnc_driver); } -DPR_INIT (("Finished init_module. Returning %d\n" , rc));return rc; }
@@ -325,10 +324,8 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) rc = -EIO ; }else { rc =dgnc_found_board (pdev, ent->driver_data); -if (rc ==0 ) { +if (rc ==0 ) dgnc_NumBoards++; -DPR_INIT (("Incrementing numboards to %d\n" , dgnc_NumBoards)); - } }return rc; }
@@ -467,8 +464,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) brd->dpatype =T_CLASSIC |T_PCIBUS ; -DPR_INIT (("dgnc_found_board - Classic.\n" )); -/* * For PCI ClassicBoards * PCI Local Address (i.e. "resource" number) space
@@ -543,8 +538,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)else brd->dpatype =T_NEO |T_PCIBUS ; -DPR_INIT (("dgnc_found_board - NEO.\n" )); -/* get the PCI Base Address Registers */ brd->membase =pci_resource_start (pdev,0 ); brd->membase_end =pci_resource_end (pdev,0 );
@@ -618,7 +611,6 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)/* init our poll helper tasklet */ tasklet_init (&brd->helper_tasklet, brd->bd_ops->tasklet, (unsigned long ) brd); -DPR_INIT (("dgnc_scan(%d) - printing out the msgbuf\n" , i));DGNC_LOCK (dgnc_global_lock, flags); brd->msgbuf =NULL ;printk ("%s" , brd->msgbuf_head);
@@ -649,13 +641,9 @@ static int dgnc_finalize_board_init(struct dgnc_board *brd) {int rc =0 ; -DPR_INIT (("dgnc_finalize_board_init() - start\n" )); -if (!brd || brd->magic !=DGNC_BOARD_MAGIC )return -ENODEV ; -DPR_INIT (("dgnc_finalize_board_init() - start #2\n" )); -if (brd->irq) { rc =request_irq (brd->irq, brd->bd_ops->intr,IRQF_SHARED ,"DGNC" , brd);
@@ -666,9 +654,6 @@ static int dgnc_finalize_board_init(struct dgnc_board *brd) brd->state =BOARD_FAILED ; brd->dpastatus =BD_NOFEP ; rc = -ENODEV ; - }else { -DPR_INIT (("Requested and received usage of IRQ %d\n" , - brd->irq)); } }return rc;
@@ -684,8 +669,6 @@ static void dgnc_do_remap(struct dgnc_board *brd)return ; brd->re_map_membase =ioremap (brd->membase,0x1000 ); - -DPR_INIT (("remapped mem: 0x%p\n" , brd->re_map_membase)); }
drivers/staging/dgnc/dgnc_driver.h +0 -21
@@ -49,8 +49,6 @@* three lines, and the driver printk's will all automagically change. * * APR((fmt, args, ...)); Always prints message -* DPR((fmt, args, ...)); Only prints if DGNC_TRACER is defined at -* compile time and dgnc_debug!=0 */ #define PROCSTR "dgnc"/* /proc entries */ #define DEVSTR "/dev/dg/dgnc"/* /dev entries */
@@ -93,25 +91,6 @@#define PRINTF_TO_KMEM (args)# define TRC (ARGS ) -# define DPR_INIT (ARGS ) -# define DPR_BASIC (ARGS ) -# define DPR_CORE (ARGS ) -# define DPR_OPEN (ARGS ) -# define DPR_CLOSE (ARGS ) -# define DPR_READ (ARGS ) -# define DPR_WRITE (ARGS ) -# define DPR_IOCTL (ARGS ) -# define DPR_PROC (ARGS ) -# define DPR_PARAM (ARGS ) -# define DPR_PSCAN (ARGS ) -# define DPR_EVENT (ARGS ) -# define DPR_DRAIN (ARGS ) -# define DPR_CARR (ARGS ) -# define DPR_MGMT (ARGS ) -# define DPR_INTR (ARGS ) -# define DPR_MSIGS (ARGS ) - -# define DPR (args)/* Number of boards we support at once. */ #define MAXBOARDS 20
drivers/staging/dgnc/dgnc_mgmt.c +0 -23
@@ -65,8 +65,6 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file)unsigned long lock_flags;unsigned int minor =iminor (inode); -DPR_MGMT (("dgnc_mgmt_open start.\n" )); -DGNC_LOCK (dgnc_global_lock, lock_flags);/* mgmt device */
@@ -84,8 +82,6 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file)DGNC_UNLOCK (dgnc_global_lock, lock_flags); -DPR_MGMT (("dgnc_mgmt_open finish.\n" )); -return 0 ; }
@@ -100,8 +96,6 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file)unsigned long lock_flags;unsigned int minor =iminor (inode); -DPR_MGMT (("dgnc_mgmt_close start.\n" )); -DGNC_LOCK (dgnc_global_lock, lock_flags);/* mgmt device */
@@ -111,8 +105,6 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file) }DGNC_UNLOCK (dgnc_global_lock, lock_flags); -DPR_MGMT (("dgnc_mgmt_close finish.\n" )); -return 0 ; }
@@ -128,8 +120,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)unsigned long lock_flags;void __user *uarg = (void __user *) arg; -DPR_MGMT (("dgnc_mgmt_ioctl start.\n" )); -switch (cmd) {case DIGI_GETDD :
@@ -148,9 +138,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)DGNC_UNLOCK (dgnc_global_lock, lock_flags); -DPR_MGMT (("DIGI_GETDD returning numboards: %d version: %s\n" , - ddi.dinfo_nboards, ddi.dinfo_version)); -if (copy_to_user (uarg, &ddi,sizeof (ddi)))return -EFAULT ;
@@ -166,8 +153,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (copy_from_user (&brd, uarg,sizeof (int )))return -EFAULT ; -DPR_MGMT (("DIGI_GETBD asking about board: %d\n" , brd)); -if ((brd <0 ) || (brd > dgnc_NumBoards) || (dgnc_NumBoards ==0 ))return -ENODEV ;
@@ -190,9 +175,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)DGNC_UNLOCK (dgnc_Board[brd]->bd_lock, lock_flags); -DPR_MGMT (("DIGI_GETBD returning type: %x state: %x ports: %x size: %x\n" , - di.info_bdtype, di.info_bdstate, di.info_nports, di.info_physsize)); -if (copy_to_user (uarg, &di,sizeof (di)))return -EFAULT ;
@@ -210,9 +192,6 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (copy_from_user (&ni, uarg,sizeof (ni)))return -EFAULT ; -DPR_MGMT (("DIGI_GETBD asking about board: %d channel: %d\n" , - ni.board, ni.channel)); - board = ni.board; channel = ni.channel;
@@ -298,7 +277,5 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } -DPR_MGMT (("dgnc_mgmt_ioctl finish.\n" )); -return 0 ; }
drivers/staging/dgnc/dgnc_neo.c +9 -95
325 lines not on this page · raw message
drivers/staging/dgnc/dgnc_tty.c +19 -230
811 lines not on this page · raw message
Signature · 1 line
1.7.9.5