Commit 759f3634 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

USB: serial: Remove unnecessary \n's from dbg uses

#define dbg adds the newline, messages shouldn't.
Converted dbg("%s", "some string") to dbg("some string")
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 815e173e
...@@ -612,7 +612,7 @@ static void cp210x_set_termios(struct tty_struct *tty, ...@@ -612,7 +612,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
baud); baud);
if (cp210x_set_config_single(port, CP210X_SET_BAUDDIV, if (cp210x_set_config_single(port, CP210X_SET_BAUDDIV,
((BAUD_RATE_GEN_FREQ + baud/2) / baud))) { ((BAUD_RATE_GEN_FREQ + baud/2) / baud))) {
dbg("Baud rate requested not supported by device\n"); dbg("Baud rate requested not supported by device");
baud = tty_termios_baud_rate(old_termios); baud = tty_termios_baud_rate(old_termios);
} }
} }
......
...@@ -391,7 +391,7 @@ static void cyberjack_read_bulk_callback(struct urb *urb) ...@@ -391,7 +391,7 @@ static void cyberjack_read_bulk_callback(struct urb *urb)
tty = tty_port_tty_get(&port->port); tty = tty_port_tty_get(&port->port);
if (!tty) { if (!tty) {
dbg("%s - ignoring since device not open\n", __func__); dbg("%s - ignoring since device not open", __func__);
return; return;
} }
if (urb->actual_length) { if (urb->actual_length) {
......
...@@ -1836,7 +1836,7 @@ static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -1836,7 +1836,7 @@ static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port,
spin_lock_irqsave(&priv->tx_lock, flags); spin_lock_irqsave(&priv->tx_lock, flags);
if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) { if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) {
spin_unlock_irqrestore(&priv->tx_lock, flags); spin_unlock_irqrestore(&priv->tx_lock, flags);
dbg("%s - write limit hit\n", __func__); dbg("%s - write limit hit", __func__);
return 0; return 0;
} }
priv->tx_outstanding_urbs++; priv->tx_outstanding_urbs++;
......
...@@ -194,7 +194,7 @@ static int usb_serial_multi_urb_write(struct tty_struct *tty, ...@@ -194,7 +194,7 @@ static int usb_serial_multi_urb_write(struct tty_struct *tty,
if (port->urbs_in_flight > if (port->urbs_in_flight >
port->serial->type->max_in_flight_urbs) { port->serial->type->max_in_flight_urbs) {
spin_unlock_irqrestore(&port->lock, flags); spin_unlock_irqrestore(&port->lock, flags);
dbg("%s - write limit hit\n", __func__); dbg("%s - write limit hit", __func__);
return bwrite; return bwrite;
} }
port->tx_bytes_flight += towrite; port->tx_bytes_flight += towrite;
......
...@@ -1971,7 +1971,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial, ...@@ -1971,7 +1971,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial,
return; return;
case IOSP_EXT_STATUS_RX_CHECK_RSP: case IOSP_EXT_STATUS_RX_CHECK_RSP:
dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __func__, edge_serial->rxPort, byte3); dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============", __func__, edge_serial->rxPort, byte3);
/* Port->RxCheckRsp = true; */ /* Port->RxCheckRsp = true; */
return; return;
} }
...@@ -2039,7 +2039,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial, ...@@ -2039,7 +2039,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial,
break; break;
default: default:
dbg("%s - Unrecognized IOSP status code %u\n", __func__, code); dbg("%s - Unrecognized IOSP status code %u", __func__, code);
break; break;
} }
return; return;
...@@ -2494,7 +2494,7 @@ static int calc_baud_rate_divisor(int baudrate, int *divisor) ...@@ -2494,7 +2494,7 @@ static int calc_baud_rate_divisor(int baudrate, int *divisor)
*divisor = custom; *divisor = custom;
dbg("%s - Baud %d = %d\n", __func__, baudrate, custom); dbg("%s - Baud %d = %d", __func__, baudrate, custom);
return 0; return 0;
} }
...@@ -2879,7 +2879,7 @@ static void load_application_firmware(struct edgeport_serial *edge_serial) ...@@ -2879,7 +2879,7 @@ static void load_application_firmware(struct edgeport_serial *edge_serial)
break; break;
case EDGE_DOWNLOAD_FILE_NONE: case EDGE_DOWNLOAD_FILE_NONE:
dbg ("No download file specified, skipping download\n"); dbg("No download file specified, skipping download");
return; return;
default: default:
......
...@@ -1716,7 +1716,7 @@ static void edge_interrupt_callback(struct urb *urb) ...@@ -1716,7 +1716,7 @@ static void edge_interrupt_callback(struct urb *urb)
case TIUMP_INTERRUPT_CODE_MSR: /* MSR */ case TIUMP_INTERRUPT_CODE_MSR: /* MSR */
/* Copy MSR from UMP */ /* Copy MSR from UMP */
msr = data[1]; msr = data[1];
dbg("%s - ===== Port %u MSR Status = %02x ======\n", dbg("%s - ===== Port %u MSR Status = %02x ======",
__func__, port_number, msr); __func__, port_number, msr);
handle_new_msr(edge_port, msr); handle_new_msr(edge_port, msr);
break; break;
......
...@@ -109,7 +109,7 @@ static void mos7720_interrupt_callback(struct urb *urb) ...@@ -109,7 +109,7 @@ static void mos7720_interrupt_callback(struct urb *urb)
__u8 sp1; __u8 sp1;
__u8 sp2; __u8 sp2;
dbg("%s", " : Entering\n"); dbg(" : Entering");
switch (status) { switch (status) {
case 0: case 0:
...@@ -278,7 +278,7 @@ static void mos7720_bulk_in_callback(struct urb *urb) ...@@ -278,7 +278,7 @@ static void mos7720_bulk_in_callback(struct urb *urb)
mos7720_port = urb->context; mos7720_port = urb->context;
if (!mos7720_port) { if (!mos7720_port) {
dbg("%s", "NULL mos7720_port pointer \n"); dbg("NULL mos7720_port pointer");
return ; return ;
} }
...@@ -386,7 +386,7 @@ static int send_mos_cmd(struct usb_serial *serial, __u8 request, __u16 value, ...@@ -386,7 +386,7 @@ static int send_mos_cmd(struct usb_serial *serial, __u8 request, __u16 value,
} }
out: out:
if (status < 0) if (status < 0)
dbg("Command Write failed Value %x index %x\n", value, index); dbg("Command Write failed Value %x index %x", value, index);
return status; return status;
} }
...@@ -491,7 +491,7 @@ static int mos7720_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -491,7 +491,7 @@ static int mos7720_open(struct tty_struct *tty, struct usb_serial_port *port)
*/ */
port_number = port->number - port->serial->minor; port_number = port->number - port->serial->minor;
send_mos_cmd(port->serial, MOS_READ, port_number, UART_LSR, &data); send_mos_cmd(port->serial, MOS_READ, port_number, UART_LSR, &data);
dbg("SS::%p LSR:%x\n", mos7720_port, data); dbg("SS::%p LSR:%x", mos7720_port, data);
dbg("Check:Sending Command .........."); dbg("Check:Sending Command ..........");
...@@ -830,7 +830,7 @@ static void mos7720_throttle(struct tty_struct *tty) ...@@ -830,7 +830,7 @@ static void mos7720_throttle(struct tty_struct *tty)
struct moschip_port *mos7720_port; struct moschip_port *mos7720_port;
int status; int status;
dbg("%s- port %d\n", __func__, port->number); dbg("%s- port %d", __func__, port->number);
mos7720_port = usb_get_serial_port_data(port); mos7720_port = usb_get_serial_port_data(port);
...@@ -1309,7 +1309,7 @@ static void mos7720_set_termios(struct tty_struct *tty, ...@@ -1309,7 +1309,7 @@ static void mos7720_set_termios(struct tty_struct *tty,
return; return;
} }
dbg("%s\n", "setting termios - ASPIRE"); dbg("setting termios - ASPIRE");
cflag = tty->termios->c_cflag; cflag = tty->termios->c_cflag;
...@@ -1327,7 +1327,7 @@ static void mos7720_set_termios(struct tty_struct *tty, ...@@ -1327,7 +1327,7 @@ static void mos7720_set_termios(struct tty_struct *tty,
change_port_settings(tty, mos7720_port, old_termios); change_port_settings(tty, mos7720_port, old_termios);
if (!port->read_urb) { if (!port->read_urb) {
dbg("%s", "URB KILLED !!!!!\n"); dbg("URB KILLED !!!!!");
return; return;
} }
......
...@@ -332,7 +332,7 @@ static void omninet_write_bulk_callback(struct urb *urb) ...@@ -332,7 +332,7 @@ static void omninet_write_bulk_callback(struct urb *urb)
struct usb_serial_port *port = urb->context; struct usb_serial_port *port = urb->context;
int status = urb->status; int status = urb->status;
dbg("%s - port %0x\n", __func__, port->number); dbg("%s - port %0x", __func__, port->number);
port->write_urb_busy = 0; port->write_urb_busy = 0;
if (status) { if (status) {
......
...@@ -217,7 +217,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -217,7 +217,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
if (priv->outstanding_urbs > URB_UPPER_LIMIT) { if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - write limit hit\n", __func__); dbg("%s - write limit hit", __func__);
return 0; return 0;
} }
priv->outstanding_urbs++; priv->outstanding_urbs++;
...@@ -288,7 +288,7 @@ static int opticon_write_room(struct tty_struct *tty) ...@@ -288,7 +288,7 @@ static int opticon_write_room(struct tty_struct *tty)
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) { if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - write limit hit\n", __func__); dbg("%s - write limit hit", __func__);
return 0; return 0;
} }
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
......
...@@ -1028,7 +1028,7 @@ static void option_instat_callback(struct urb *urb) ...@@ -1028,7 +1028,7 @@ static void option_instat_callback(struct urb *urb)
(struct usb_ctrlrequest *)urb->transfer_buffer; (struct usb_ctrlrequest *)urb->transfer_buffer;
if (!req_pkt) { if (!req_pkt) {
dbg("%s: NULL req_pkt\n", __func__); dbg("%s: NULL req_pkt", __func__);
return; return;
} }
if ((req_pkt->bRequestType == 0xA1) && if ((req_pkt->bRequestType == 0xA1) &&
...@@ -1452,7 +1452,7 @@ static int option_resume(struct usb_serial *serial) ...@@ -1452,7 +1452,7 @@ static int option_resume(struct usb_serial *serial)
for (i = 0; i < serial->num_ports; i++) { for (i = 0; i < serial->num_ports; i++) {
port = serial->port[i]; port = serial->port[i];
if (!port->interrupt_in_urb) { if (!port->interrupt_in_urb) {
dbg("%s: No interrupt URB for port %d\n", __func__, i); dbg("%s: No interrupt URB for port %d", __func__, i);
continue; continue;
} }
err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO); err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);
......
...@@ -609,7 +609,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty, ...@@ -609,7 +609,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
if (i < 0) if (i < 0)
dev_err(&port->dev, "Set UART format %#x failed (error = %d)\n", dev_err(&port->dev, "Set UART format %#x failed (error = %d)\n",
uartdata, i); uartdata, i);
dbg("0x21:0x40:0:0 %d\n", i); dbg("0x21:0x40:0:0 %d", i);
if (cflag & CRTSCTS) { if (cflag & CRTSCTS) {
/* enable hardware flow control */ /* enable hardware flow control */
......
...@@ -368,7 +368,7 @@ static int visor_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -368,7 +368,7 @@ static int visor_write(struct tty_struct *tty, struct usb_serial_port *port,
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
if (priv->outstanding_urbs > URB_UPPER_LIMIT) { if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - write limit hit\n", __func__); dbg("%s - write limit hit", __func__);
return 0; return 0;
} }
priv->outstanding_urbs++; priv->outstanding_urbs++;
...@@ -446,7 +446,7 @@ static int visor_write_room(struct tty_struct *tty) ...@@ -446,7 +446,7 @@ static int visor_write_room(struct tty_struct *tty)
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) { if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - write limit hit\n", __func__); dbg("%s - write limit hit", __func__);
return 0; return 0;
} }
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
......
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