Skip to content

Commit 759f363

Browse files
JoePerchesgregkh
authored andcommitted
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: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 815e173 commit 759f363

12 files changed

Lines changed: 24 additions & 24 deletions

File tree

‎drivers/usb/serial/cp210x.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
612612
baud);
613613
if (cp210x_set_config_single(port, CP210X_SET_BAUDDIV,
614614
((BAUD_RATE_GEN_FREQ + baud/2) / baud))) {
615-
dbg("Baud rate requested not supported by device\n");
615+
dbg("Baud rate requested not supported by device");
616616
baud = tty_termios_baud_rate(old_termios);
617617
}
618618
}

‎drivers/usb/serial/cyberjack.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static void cyberjack_read_bulk_callback(struct urb *urb)
391391

392392
tty = tty_port_tty_get(&port->port);
393393
if (!tty) {
394-
dbg("%s - ignoring since device not open\n", __func__);
394+
dbg("%s - ignoring since device not open", __func__);
395395
return;
396396
}
397397
if (urb->actual_length) {

‎drivers/usb/serial/ftdi_sio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port,
18361836
spin_lock_irqsave(&priv->tx_lock, flags);
18371837
if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) {
18381838
spin_unlock_irqrestore(&priv->tx_lock, flags);
1839-
dbg("%s - write limit hit\n", __func__);
1839+
dbg("%s - write limit hit", __func__);
18401840
return 0;
18411841
}
18421842
priv->tx_outstanding_urbs++;

‎drivers/usb/serial/generic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static int usb_serial_multi_urb_write(struct tty_struct *tty,
194194
if (port->urbs_in_flight >
195195
port->serial->type->max_in_flight_urbs) {
196196
spin_unlock_irqrestore(&port->lock, flags);
197-
dbg("%s - write limit hit\n", __func__);
197+
dbg("%s - write limit hit", __func__);
198198
return bwrite;
199199
}
200200
port->tx_bytes_flight += towrite;

‎drivers/usb/serial/io_edgeport.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial,
19711971
return;
19721972

19731973
case IOSP_EXT_STATUS_RX_CHECK_RSP:
1974-
dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __func__, edge_serial->rxPort, byte3);
1974+
dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============", __func__, edge_serial->rxPort, byte3);
19751975
/* Port->RxCheckRsp = true; */
19761976
return;
19771977
}
@@ -2039,7 +2039,7 @@ static void process_rcvd_status(struct edgeport_serial *edge_serial,
20392039
break;
20402040

20412041
default:
2042-
dbg("%s - Unrecognized IOSP status code %u\n", __func__, code);
2042+
dbg("%s - Unrecognized IOSP status code %u", __func__, code);
20432043
break;
20442044
}
20452045
return;
@@ -2494,7 +2494,7 @@ static int calc_baud_rate_divisor(int baudrate, int *divisor)
24942494

24952495
*divisor = custom;
24962496

2497-
dbg("%s - Baud %d = %d\n", __func__, baudrate, custom);
2497+
dbg("%s - Baud %d = %d", __func__, baudrate, custom);
24982498
return 0;
24992499
}
25002500

@@ -2879,7 +2879,7 @@ static void load_application_firmware(struct edgeport_serial *edge_serial)
28792879
break;
28802880

28812881
case EDGE_DOWNLOAD_FILE_NONE:
2882-
dbg ("No download file specified, skipping download\n");
2882+
dbg("No download file specified, skipping download");
28832883
return;
28842884

28852885
default:

‎drivers/usb/serial/io_ti.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ static void edge_interrupt_callback(struct urb *urb)
17161716
case TIUMP_INTERRUPT_CODE_MSR: /* MSR */
17171717
/* Copy MSR from UMP */
17181718
msr = data[1];
1719-
dbg("%s - ===== Port %u MSR Status = %02x ======\n",
1719+
dbg("%s - ===== Port %u MSR Status = %02x ======",
17201720
__func__, port_number, msr);
17211721
handle_new_msr(edge_port, msr);
17221722
break;

‎drivers/usb/serial/mos7720.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static void mos7720_interrupt_callback(struct urb *urb)
109109
__u8 sp1;
110110
__u8 sp2;
111111

112-
dbg("%s", " : Entering\n");
112+
dbg(" : Entering");
113113

114114
switch (status) {
115115
case 0:
@@ -278,7 +278,7 @@ static void mos7720_bulk_in_callback(struct urb *urb)
278278

279279
mos7720_port = urb->context;
280280
if (!mos7720_port) {
281-
dbg("%s", "NULL mos7720_port pointer \n");
281+
dbg("NULL mos7720_port pointer");
282282
return ;
283283
}
284284

@@ -386,7 +386,7 @@ static int send_mos_cmd(struct usb_serial *serial, __u8 request, __u16 value,
386386
}
387387
out:
388388
if (status < 0)
389-
dbg("Command Write failed Value %x index %x\n", value, index);
389+
dbg("Command Write failed Value %x index %x", value, index);
390390

391391
return status;
392392
}
@@ -491,7 +491,7 @@ static int mos7720_open(struct tty_struct *tty, struct usb_serial_port *port)
491491
*/
492492
port_number = port->number - port->serial->minor;
493493
send_mos_cmd(port->serial, MOS_READ, port_number, UART_LSR, &data);
494-
dbg("SS::%p LSR:%x\n", mos7720_port, data);
494+
dbg("SS::%p LSR:%x", mos7720_port, data);
495495

496496
dbg("Check:Sending Command ..........");
497497

@@ -830,7 +830,7 @@ static void mos7720_throttle(struct tty_struct *tty)
830830
struct moschip_port *mos7720_port;
831831
int status;
832832

833-
dbg("%s- port %d\n", __func__, port->number);
833+
dbg("%s- port %d", __func__, port->number);
834834

835835
mos7720_port = usb_get_serial_port_data(port);
836836

@@ -1309,7 +1309,7 @@ static void mos7720_set_termios(struct tty_struct *tty,
13091309
return;
13101310
}
13111311

1312-
dbg("%s\n", "setting termios - ASPIRE");
1312+
dbg("setting termios - ASPIRE");
13131313

13141314
cflag = tty->termios->c_cflag;
13151315

@@ -1327,7 +1327,7 @@ static void mos7720_set_termios(struct tty_struct *tty,
13271327
change_port_settings(tty, mos7720_port, old_termios);
13281328

13291329
if (!port->read_urb) {
1330-
dbg("%s", "URB KILLED !!!!!\n");
1330+
dbg("URB KILLED !!!!!");
13311331
return;
13321332
}
13331333

‎drivers/usb/serial/omninet.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static void omninet_write_bulk_callback(struct urb *urb)
332332
struct usb_serial_port *port = urb->context;
333333
int status = urb->status;
334334

335-
dbg("%s - port %0x\n", __func__, port->number);
335+
dbg("%s - port %0x", __func__, port->number);
336336

337337
port->write_urb_busy = 0;
338338
if (status) {

‎drivers/usb/serial/opticon.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
217217
spin_lock_irqsave(&priv->lock, flags);
218218
if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
219219
spin_unlock_irqrestore(&priv->lock, flags);
220-
dbg("%s - write limit hit\n", __func__);
220+
dbg("%s - write limit hit", __func__);
221221
return 0;
222222
}
223223
priv->outstanding_urbs++;
@@ -288,7 +288,7 @@ static int opticon_write_room(struct tty_struct *tty)
288288
spin_lock_irqsave(&priv->lock, flags);
289289
if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
290290
spin_unlock_irqrestore(&priv->lock, flags);
291-
dbg("%s - write limit hit\n", __func__);
291+
dbg("%s - write limit hit", __func__);
292292
return 0;
293293
}
294294
spin_unlock_irqrestore(&priv->lock, flags);

‎drivers/usb/serial/option.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ static void option_instat_callback(struct urb *urb)
10281028
(struct usb_ctrlrequest *)urb->transfer_buffer;
10291029

10301030
if (!req_pkt) {
1031-
dbg("%s: NULL req_pkt\n", __func__);
1031+
dbg("%s: NULL req_pkt", __func__);
10321032
return;
10331033
}
10341034
if ((req_pkt->bRequestType == 0xA1) &&
@@ -1452,7 +1452,7 @@ static int option_resume(struct usb_serial *serial)
14521452
for (i = 0; i < serial->num_ports; i++) {
14531453
port = serial->port[i];
14541454
if (!port->interrupt_in_urb) {
1455-
dbg("%s: No interrupt URB for port %d\n", __func__, i);
1455+
dbg("%s: No interrupt URB for port %d", __func__, i);
14561456
continue;
14571457
}
14581458
err = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);

0 commit comments

Comments
 (0)