Staging: xillybus: quoted strings split across lines
Fix checkpatch.pl issues with quoted strings split across lines in xillybus_core.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4910071518
commit
ae1dd9bc55
@ -112,8 +112,7 @@ static void malformed_message(u32 *buf)
|
|||||||
msg_bufno = (buf[0] >> 12) & 0x3ff;
|
msg_bufno = (buf[0] >> 12) & 0x3ff;
|
||||||
msg_data = buf[1] & 0xfffffff;
|
msg_data = buf[1] & 0xfffffff;
|
||||||
|
|
||||||
pr_warn("xillybus: Malformed message (skipping): "
|
pr_warn("xillybus: Malformed message (skipping): opcode=%d, channel=%03x, dir=%d, bufno=%03x, data=%07x\n",
|
||||||
"opcode=%d, channel=%03x, dir=%d, bufno=%03x, data=%07x\n",
|
|
||||||
opcode, msg_channel, msg_dir, msg_bufno, msg_data);
|
opcode, msg_channel, msg_dir, msg_bufno, msg_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,15 +152,13 @@ irqreturn_t xillybus_isr(int irq, void *data)
|
|||||||
for (i = 0; i < buf_size; i += 2)
|
for (i = 0; i < buf_size; i += 2)
|
||||||
if (((buf[i+1] >> 28) & 0xf) != ep->msg_counter) {
|
if (((buf[i+1] >> 28) & 0xf) != ep->msg_counter) {
|
||||||
malformed_message(&buf[i]);
|
malformed_message(&buf[i]);
|
||||||
pr_warn("xillybus: Sending a NACK on "
|
pr_warn("xillybus: Sending a NACK on counter %x (instead of %x) on entry %d\n",
|
||||||
"counter %x (instead of %x) on entry %d\n",
|
|
||||||
((buf[i+1] >> 28) & 0xf),
|
((buf[i+1] >> 28) & 0xf),
|
||||||
ep->msg_counter,
|
ep->msg_counter,
|
||||||
i/2);
|
i/2);
|
||||||
|
|
||||||
if (++ep->failed_messages > 10)
|
if (++ep->failed_messages > 10)
|
||||||
pr_err("xillybus: Lost sync with "
|
pr_err("xillybus: Lost sync with interrupt messages. Stopping.\n");
|
||||||
"interrupt messages. Stopping.\n");
|
|
||||||
else {
|
else {
|
||||||
ep->ephw->hw_sync_sgl_for_device(
|
ep->ephw->hw_sync_sgl_for_device(
|
||||||
ep,
|
ep,
|
||||||
@ -283,13 +280,7 @@ irqreturn_t xillybus_isr(int irq, void *data)
|
|||||||
case XILLYMSG_OPCODE_FATAL_ERROR:
|
case XILLYMSG_OPCODE_FATAL_ERROR:
|
||||||
ep->fatal_error = 1;
|
ep->fatal_error = 1;
|
||||||
wake_up_interruptible(&ep->ep_wait); /* For select() */
|
wake_up_interruptible(&ep->ep_wait); /* For select() */
|
||||||
pr_err("xillybus: FPGA reported a fatal "
|
pr_err("xillybus: FPGA reported a fatal error. This means that the low-level communication with the device has failed. This hardware problem is most likely unrelated to xillybus (neither kernel module nor FPGA core), but reports are still welcome. All I/O is aborted.\n");
|
||||||
"error. This means that the low-level "
|
|
||||||
"communication with the device has failed. "
|
|
||||||
"This hardware problem is most likely "
|
|
||||||
"unrelated to xillybus (neither kernel "
|
|
||||||
"module nor FPGA core), but reports are "
|
|
||||||
"still welcome. All I/O is aborted.\n");
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
malformed_message(&buf[i]);
|
malformed_message(&buf[i]);
|
||||||
@ -486,8 +477,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
|
|||||||
|
|
||||||
if ((channelnum > ep->num_channels) ||
|
if ((channelnum > ep->num_channels) ||
|
||||||
((channelnum == 0) && !is_writebuf)) {
|
((channelnum == 0) && !is_writebuf)) {
|
||||||
pr_err("xillybus: IDT requests channel out "
|
pr_err("xillybus: IDT requests channel out of range. Aborting.\n");
|
||||||
"of range. Aborting.\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -565,9 +555,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
|
|||||||
*/
|
*/
|
||||||
if ((left_of_wr_salami < bytebufsize) &&
|
if ((left_of_wr_salami < bytebufsize) &&
|
||||||
(left_of_wr_salami > 0)) {
|
(left_of_wr_salami > 0)) {
|
||||||
pr_err("xillybus: "
|
pr_err("xillybus: Corrupt buffer allocation in IDT. Aborting.\n");
|
||||||
"Corrupt buffer allocation "
|
|
||||||
"in IDT. Aborting.\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,9 +632,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
|
|||||||
*/
|
*/
|
||||||
if ((left_of_rd_salami < bytebufsize) &&
|
if ((left_of_rd_salami < bytebufsize) &&
|
||||||
(left_of_rd_salami > 0)) {
|
(left_of_rd_salami > 0)) {
|
||||||
pr_err("xillybus: "
|
pr_err("xillybus: Corrupt buffer allocation in IDT. Aborting.\n");
|
||||||
"Corrupt buffer allocation "
|
|
||||||
"in IDT. Aborting.\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -706,16 +692,14 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!msg_buf_done) {
|
if (!msg_buf_done) {
|
||||||
pr_err("xillybus: Corrupt IDT: No message buffer. "
|
pr_err("xillybus: Corrupt IDT: No message buffer. Aborting.\n");
|
||||||
"Aborting.\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
memfail:
|
memfail:
|
||||||
pr_err("xillybus: Failed to allocate write buffer memory. "
|
pr_err("xillybus: Failed to allocate write buffer memory. Aborting.\n");
|
||||||
"Aborting.\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
dmafail:
|
dmafail:
|
||||||
pr_err("xillybus: Failed to map DMA memory!. Aborting.\n");
|
pr_err("xillybus: Failed to map DMA memory!. Aborting.\n");
|
||||||
@ -745,8 +729,7 @@ static void xilly_scan_idt(struct xilly_endpoint *endpoint,
|
|||||||
scan++;
|
scan++;
|
||||||
|
|
||||||
if (scan > end_of_idt) {
|
if (scan > end_of_idt) {
|
||||||
pr_err("xillybus: IDT device name list overflow. "
|
pr_err("xillybus: IDT device name list overflow. Aborting.\n");
|
||||||
"Aborting.\n");
|
|
||||||
idt_handle->chandesc = NULL;
|
idt_handle->chandesc = NULL;
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
@ -757,8 +740,7 @@ static void xilly_scan_idt(struct xilly_endpoint *endpoint,
|
|||||||
if (len & 0x03) {
|
if (len & 0x03) {
|
||||||
idt_handle->chandesc = NULL;
|
idt_handle->chandesc = NULL;
|
||||||
|
|
||||||
pr_err("xillybus: Corrupt IDT device name list. "
|
pr_err("xillybus: Corrupt IDT device name list. Aborting.\n");
|
||||||
"Aborting.\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
idt_handle->entries = len >> 2;
|
idt_handle->entries = len >> 2;
|
||||||
@ -803,8 +785,7 @@ static int xilly_obtain_idt(struct xilly_endpoint *endpoint)
|
|||||||
DMA_FROM_DEVICE);
|
DMA_FROM_DEVICE);
|
||||||
|
|
||||||
if (channel->wr_buffers[0]->end_offset != endpoint->idtlen) {
|
if (channel->wr_buffers[0]->end_offset != endpoint->idtlen) {
|
||||||
pr_err("xillybus: IDT length mismatch (%d != %d). "
|
pr_err("xillybus: IDT length mismatch (%d != %d). Aborting.\n",
|
||||||
"Aborting.\n",
|
|
||||||
channel->wr_buffers[0]->end_offset, endpoint->idtlen);
|
channel->wr_buffers[0]->end_offset, endpoint->idtlen);
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
return rc;
|
return rc;
|
||||||
@ -821,9 +802,7 @@ static int xilly_obtain_idt(struct xilly_endpoint *endpoint)
|
|||||||
|
|
||||||
/* Check version number. Accept anything below 0x82 for now. */
|
/* Check version number. Accept anything below 0x82 for now. */
|
||||||
if (*version > 0x82) {
|
if (*version > 0x82) {
|
||||||
pr_err("xillybus: No support for IDT version 0x%02x. "
|
pr_err("xillybus: No support for IDT version 0x%02x. Maybe the xillybus driver needs an upgarde. Aborting.\n",
|
||||||
"Maybe the xillybus driver needs an upgarde. "
|
|
||||||
"Aborting.\n",
|
|
||||||
(int) *version);
|
(int) *version);
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
return rc;
|
return rc;
|
||||||
@ -1312,9 +1291,7 @@ static int xillybus_myflush(struct xilly_channel *channel, long timeout)
|
|||||||
channel->rd_wait,
|
channel->rd_wait,
|
||||||
(!channel->rd_full),
|
(!channel->rd_full),
|
||||||
timeout) == 0) {
|
timeout) == 0) {
|
||||||
pr_warn("xillybus: "
|
pr_warn("xillybus: Timed out while flushing. Output data may be lost.\n");
|
||||||
"Timed out while flushing. "
|
|
||||||
"Output data may be lost.\n");
|
|
||||||
|
|
||||||
rc = -ETIMEDOUT;
|
rc = -ETIMEDOUT;
|
||||||
break;
|
break;
|
||||||
@ -1354,11 +1331,9 @@ static void xillybus_autoflush(struct work_struct *work)
|
|||||||
rc = xillybus_myflush(channel, -1);
|
rc = xillybus_myflush(channel, -1);
|
||||||
|
|
||||||
if (rc == -EINTR)
|
if (rc == -EINTR)
|
||||||
pr_warn("xillybus: Autoflush failed because "
|
pr_warn("xillybus: Autoflush failed because work queue thread got a signal.\n");
|
||||||
"work queue thread got a signal.\n");
|
|
||||||
else if (rc)
|
else if (rc)
|
||||||
pr_err("xillybus: Autoflush failed under "
|
pr_err("xillybus: Autoflush failed under weird circumstances.\n");
|
||||||
"weird circumstances.\n");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1615,8 +1590,8 @@ static int xillybus_open(struct inode *inode, struct file *filp)
|
|||||||
mutex_unlock(&ep_list_lock);
|
mutex_unlock(&ep_list_lock);
|
||||||
|
|
||||||
if (!endpoint) {
|
if (!endpoint) {
|
||||||
pr_err("xillybus: open() failed to find a device "
|
pr_err("xillybus: open() failed to find a device for major=%d and minor=%d\n",
|
||||||
"for major=%d and minor=%d\n", major, minor);
|
major, minor);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1642,15 +1617,13 @@ static int xillybus_open(struct inode *inode, struct file *filp)
|
|||||||
if ((filp->f_mode & FMODE_READ) && (filp->f_flags & O_NONBLOCK) &&
|
if ((filp->f_mode & FMODE_READ) && (filp->f_flags & O_NONBLOCK) &&
|
||||||
(channel->wr_synchronous || !channel->wr_allow_partial ||
|
(channel->wr_synchronous || !channel->wr_allow_partial ||
|
||||||
!channel->wr_supports_nonempty)) {
|
!channel->wr_supports_nonempty)) {
|
||||||
pr_err("xillybus: open() failed: "
|
pr_err("xillybus: open() failed: O_NONBLOCK not allowed for read on this device\n");
|
||||||
"O_NONBLOCK not allowed for read on this device\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((filp->f_mode & FMODE_WRITE) && (filp->f_flags & O_NONBLOCK) &&
|
if ((filp->f_mode & FMODE_WRITE) && (filp->f_flags & O_NONBLOCK) &&
|
||||||
(channel->rd_synchronous || !channel->rd_allow_partial)) {
|
(channel->rd_synchronous || !channel->rd_allow_partial)) {
|
||||||
pr_err("xillybus: open() failed: "
|
pr_err("xillybus: open() failed: O_NONBLOCK not allowed for write on this device\n");
|
||||||
"O_NONBLOCK not allowed for write on this device\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1765,8 +1738,7 @@ static int xillybus_release(struct inode *inode, struct file *filp)
|
|||||||
rc = mutex_lock_interruptible(&channel->rd_mutex);
|
rc = mutex_lock_interruptible(&channel->rd_mutex);
|
||||||
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
pr_warn("xillybus: Failed to close file. "
|
pr_warn("xillybus: Failed to close file. Hardware left in messy state.\n");
|
||||||
"Hardware left in messy state.\n");
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1791,8 +1763,7 @@ static int xillybus_release(struct inode *inode, struct file *filp)
|
|||||||
if (filp->f_mode & FMODE_READ) {
|
if (filp->f_mode & FMODE_READ) {
|
||||||
rc = mutex_lock_interruptible(&channel->wr_mutex);
|
rc = mutex_lock_interruptible(&channel->wr_mutex);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
pr_warn("xillybus: Failed to close file. "
|
pr_warn("xillybus: Failed to close file. Hardware left in messy state.\n");
|
||||||
"Hardware left in messy state.\n");
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1853,10 +1824,7 @@ static int xillybus_release(struct inode *inode, struct file *filp)
|
|||||||
|
|
||||||
if (channel->wr_sleepy) {
|
if (channel->wr_sleepy) {
|
||||||
mutex_unlock(&channel->wr_mutex);
|
mutex_unlock(&channel->wr_mutex);
|
||||||
pr_warn("xillybus: Hardware failed to "
|
pr_warn("xillybus: Hardware failed to respond to close command, therefore left in messy state.\n");
|
||||||
"respond to close command, "
|
|
||||||
"therefore left in "
|
|
||||||
"messy state.\n");
|
|
||||||
return -EINTR;
|
return -EINTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2057,8 +2025,7 @@ static int xillybus_init_chrdev(struct xilly_endpoint *endpoint,
|
|||||||
"%s", devname);
|
"%s", devname);
|
||||||
|
|
||||||
if (IS_ERR(device)) {
|
if (IS_ERR(device)) {
|
||||||
pr_warn("xillybus: Failed to create %s "
|
pr_warn("xillybus: Failed to create %s device. Aborting.\n", devname);
|
||||||
"device. Aborting.\n", devname);
|
|
||||||
goto error3;
|
goto error3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2141,8 +2108,7 @@ static int xilly_quiesce(struct xilly_endpoint *endpoint)
|
|||||||
XILLY_TIMEOUT);
|
XILLY_TIMEOUT);
|
||||||
|
|
||||||
if (endpoint->idtlen < 0) {
|
if (endpoint->idtlen < 0) {
|
||||||
pr_err("xillybus: Failed to quiesce the device on "
|
pr_err("xillybus: Failed to quiesce the device on exit. Quitting while leaving a mess.\n");
|
||||||
"exit. Quitting while leaving a mess.\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
return 0; /* Success */
|
return 0; /* Success */
|
||||||
|
Loading…
Reference in New Issue
Block a user