dev_dbg() already can state the function name. No need to state it again explicitly. Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx> --- drivers/usb/serial/whiteheat.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index d3ea90b..b795f34 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -542,15 +542,15 @@ static void command_port_read_callback(struct urb *urb) command_info = usb_get_serial_port_data(command_port); if (!command_info) { - dev_dbg(&urb->dev->dev, "%s - command_info is NULL, exiting.\n", __func__); + dev_dbg(&urb->dev->dev, "command_info is NULL, exiting.\n"); return; } if (!urb->actual_length) { - dev_dbg(&urb->dev->dev, "%s - empty response, exiting.\n", __func__); + dev_dbg(&urb->dev->dev, "empty response, exiting.\n"); return; } if (status) { - dev_dbg(&urb->dev->dev, "%s - nonzero urb status: %d\n", __func__, status); + dev_dbg(&urb->dev->dev, "nonzero urb status: %d\n", status); if (status != -ENOENT) command_info->command_finished = WHITEHEAT_CMD_FAILURE; wake_up(&command_info->wait_command); @@ -568,7 +568,7 @@ static void command_port_read_callback(struct urb *urb) } else if (data[0] == WHITEHEAT_EVENT) { /* These are unsolicited reports from the firmware, hence no waiting command to wakeup */ - dev_dbg(&urb->dev->dev, "%s - event received\n", __func__); + dev_dbg(&urb->dev->dev, "event received\n"); } else if ((data[0] == WHITEHEAT_GET_DTR_RTS) && (urb->actual_length - 1 <= sizeof(command_info->result_buffer))) { memcpy(command_info->result_buffer, &data[1], @@ -576,13 +576,12 @@ static void command_port_read_callback(struct urb *urb) command_info->command_finished = WHITEHEAT_CMD_COMPLETE; wake_up(&command_info->wait_command); } else - dev_dbg(&urb->dev->dev, "%s - bad reply from firmware\n", __func__); + dev_dbg(&urb->dev->dev, "bad reply from firmware\n"); /* Continue trying to always read */ result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC); if (result) - dev_dbg(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", - __func__, result); + dev_dbg(&urb->dev->dev, "failed resubmitting read urb, error %d\n", result); } @@ -600,7 +599,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, int retval = 0; int t; - dev_dbg(dev, "%s - command %d\n", __func__, command); + dev_dbg(dev, "command %d\n", command); command_port = port->serial->port[COMMAND_PORT]; command_info = usb_get_serial_port_data(command_port); @@ -613,7 +612,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, command_port->write_urb->transfer_buffer_length = datasize + 1; retval = usb_submit_urb(command_port->write_urb, GFP_NOIO); if (retval) { - dev_dbg(dev, "%s - submit urb failed\n", __func__); + dev_dbg(dev, "submit urb failed\n"); goto exit; } @@ -624,19 +623,19 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, usb_kill_urb(command_port->write_urb); if (command_info->command_finished == false) { - dev_dbg(dev, "%s - command timed out.\n", __func__); + dev_dbg(dev, "command timed out.\n"); retval = -ETIMEDOUT; goto exit; } if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) { - dev_dbg(dev, "%s - command failed.\n", __func__); + dev_dbg(dev, "command failed.\n"); retval = -EIO; goto exit; } if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) { - dev_dbg(dev, "%s - command completed.\n", __func__); + dev_dbg(dev, "command completed.\n"); switch (command) { case WHITEHEAT_GET_DTR_RTS: info = usb_get_serial_port_data(port); @@ -688,7 +687,7 @@ static void firm_setup_port(struct tty_struct *tty) default: case CS8: port_settings.bits = 8; break; } - dev_dbg(dev, "%s - data bits = %d\n", __func__, port_settings.bits); + dev_dbg(dev, "data bits = %d\n", port_settings.bits); /* determine the parity */ if (cflag & PARENB) @@ -704,14 +703,14 @@ static void firm_setup_port(struct tty_struct *tty) port_settings.parity = WHITEHEAT_PAR_EVEN; else port_settings.parity = WHITEHEAT_PAR_NONE; - dev_dbg(dev, "%s - parity = %c\n", __func__, port_settings.parity); + dev_dbg(dev, "parity = %c\n", port_settings.parity); /* figure out the stop bits requested */ if (cflag & CSTOPB) port_settings.stop = 2; else port_settings.stop = 1; - dev_dbg(dev, "%s - stop bits = %d\n", __func__, port_settings.stop); + dev_dbg(dev, "stop bits = %d\n", port_settings.stop); /* figure out the flow control settings */ if (cflag & CRTSCTS) @@ -719,7 +718,7 @@ static void firm_setup_port(struct tty_struct *tty) WHITEHEAT_HFLOW_RTS); else port_settings.hflow = WHITEHEAT_HFLOW_NONE; - dev_dbg(dev, "%s - hardware flow control = %s %s %s %s\n", __func__, + dev_dbg(dev, "hardware flow control = %s %s %s %s\n", (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "", (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "", (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "", @@ -730,15 +729,15 @@ static void firm_setup_port(struct tty_struct *tty) port_settings.sflow = WHITEHEAT_SFLOW_RXTX; else port_settings.sflow = WHITEHEAT_SFLOW_NONE; - dev_dbg(dev, "%s - software flow control = %c\n", __func__, port_settings.sflow); + dev_dbg(dev, "software flow control = %c\n", port_settings.sflow); port_settings.xon = START_CHAR(tty); port_settings.xoff = STOP_CHAR(tty); - dev_dbg(dev, "%s - XON = %2x, XOFF = %2x\n", __func__, port_settings.xon, port_settings.xoff); + dev_dbg(dev, "XON = %2x, XOFF = %2x\n", port_settings.xon, port_settings.xoff); /* get the baud rate wanted */ port_settings.baud = tty_get_baud_rate(tty); - dev_dbg(dev, "%s - baud rate = %d\n", __func__, port_settings.baud); + dev_dbg(dev, "baud rate = %d\n", port_settings.baud); /* fixme: should set validated settings */ tty_encode_baud_rate(tty, port_settings.baud, port_settings.baud); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html