[media] cx18: don't break long lines

Due to the 80-cols restrictions, and latter due to checkpatch
warnings, several strings were broken into multiple lines. This
is not considered a good practice anymore, as it makes harder
to grep for strings at the source code.

As we're right now fixing other drivers due to KERN_CONT, we need
to be able to identify what printk strings don't end with a "\n".
It is a way easier to detect those if we don't break long lines.

So, join those continuation lines.

The patch was generated via the script below, and manually
adjusted if needed.

</script>
use Text::Tabs;
while (<>) {
	if ($next ne "") {
		$c=$_;
		if ($c =~ /^\s+\"(.*)/) {
			$c2=$1;
			$next =~ s/\"\n$//;
			$n = expand($next);
			$funpos = index($n, '(');
			$pos = index($c2, '",');
			if ($funpos && $pos > 0) {
				$s1 = substr $c2, 0, $pos + 2;
				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
				$s2 =~ s/^\s+//;

				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");

				print unexpand("$next$s1\n");
				print unexpand("$s2\n") if ($s2 ne "");
			} else {
				print "$next$c2\n";
			}
			$next="";
			next;
		} else {
			print $next;
		}
		$next="";
	} else {
		if (m/\"$/) {
			if (!m/\\n\"$/) {
				$next=$_;
				next;
			}
		}
	}
	print $_;
}
</script>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Mauro Carvalho Chehab 2016-10-18 17:44:03 -02:00
parent 652fd6eaeb
commit 6beb1388a0
12 changed files with 58 additions and 90 deletions

View File

@ -217,8 +217,8 @@ static int cx18_alsa_load(struct cx18 *cx)
s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM]; s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM];
if (s->video_dev.v4l2_dev == NULL) { if (s->video_dev.v4l2_dev == NULL) {
CX18_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - " CX18_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - skipping\n",
"skipping\n", __func__); __func__);
return 0; return 0;
} }
@ -232,8 +232,8 @@ static int cx18_alsa_load(struct cx18 *cx)
CX18_ALSA_ERR("%s: failed to create struct snd_cx18_card\n", CX18_ALSA_ERR("%s: failed to create struct snd_cx18_card\n",
__func__); __func__);
} else { } else {
CX18_DEBUG_ALSA_INFO("%s: created cx18 ALSA interface instance " CX18_DEBUG_ALSA_INFO("%s: created cx18 ALSA interface instance\n",
"\n", __func__); __func__);
} }
return 0; return 0;
} }

View File

@ -468,21 +468,19 @@ void cx18_av_std_setup(struct cx18 *cx)
CX18_DEBUG_INFO_DEV(sd, "Pixel rate = %d.%06d Mpixel/sec\n", CX18_DEBUG_INFO_DEV(sd, "Pixel rate = %d.%06d Mpixel/sec\n",
pll / 8000000, (pll / 8) % 1000000); pll / 8000000, (pll / 8) % 1000000);
CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio " CX18_DEBUG_INFO_DEV(sd, "ADC XTAL/pixel clock decimation ratio = %d.%03d\n",
"= %d.%03d\n", src_decimation / 256, src_decimation / 256,
((src_decimation % 256) * 1000) / 256); ((src_decimation % 256) * 1000) / 256);
tmp = 28636360 * (u64) sc; tmp = 28636360 * (u64) sc;
do_div(tmp, src_decimation); do_div(tmp, src_decimation);
fsc = tmp >> 13; fsc = tmp >> 13;
CX18_DEBUG_INFO_DEV(sd, CX18_DEBUG_INFO_DEV(sd,
"Chroma sub-carrier initial freq = %d.%06d " "Chroma sub-carrier initial freq = %d.%06d MHz\n",
"MHz\n", fsc / 1000000, fsc % 1000000); fsc / 1000000, fsc % 1000000);
CX18_DEBUG_INFO_DEV(sd, "hblank %i, hactive %i, vblank %i, " CX18_DEBUG_INFO_DEV(sd,
"vactive %i, vblank656 %i, src_dec %i, " "hblank %i, hactive %i, vblank %i, vactive %i, vblank656 %i, src_dec %i, burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, sc 0x%06x\n",
"burst 0x%02x, luma_lpf %i, uv_lpf %i, "
"comb 0x%02x, sc 0x%06x\n",
hblank, hactive, vblank, vactive, vblank656, hblank, hactive, vblank, vactive, vblank656,
src_decimation, burst, luma_lpf, uv_lpf, src_decimation, burst, luma_lpf, uv_lpf,
comb, sc); comb, sc);
@ -1069,8 +1067,7 @@ static void log_video_status(struct cx18 *cx)
CX18_INFO_DEV(sd, "Specified video input: Composite %d\n", CX18_INFO_DEV(sd, "Specified video input: Composite %d\n",
vid_input - CX18_AV_COMPOSITE1 + 1); vid_input - CX18_AV_COMPOSITE1 + 1);
} else { } else {
CX18_INFO_DEV(sd, "Specified video input: " CX18_INFO_DEV(sd, "Specified video input: S-Video (Luma In%d, Chroma In%d)\n",
"S-Video (Luma In%d, Chroma In%d)\n",
(vid_input & 0xf0) >> 4, (vid_input & 0xf0) >> 4,
(vid_input & 0xf00) >> 8); (vid_input & 0xf00) >> 8);
} }

View File

@ -61,8 +61,7 @@ static int cx18_av_verifyfw(struct cx18 *cx, const struct firmware *fw)
dl_control &= 0xffff3fff; /* ignore top 2 bits of address */ dl_control &= 0xffff3fff; /* ignore top 2 bits of address */
expected = 0x0f000000 | ((u32)data[addr] << 16) | addr; expected = 0x0f000000 | ((u32)data[addr] << 16) | addr;
if (expected != dl_control) { if (expected != dl_control) {
CX18_ERR_DEV(sd, "verification of %s firmware load " CX18_ERR_DEV(sd, "verification of %s firmware load failed: expected %#010x got %#010x\n",
"failed: expected %#010x got %#010x\n",
FWFILE, expected, dl_control); FWFILE, expected, dl_control);
ret = -EIO; ret = -EIO;
break; break;

View File

@ -44,8 +44,7 @@ static int cx18_s_stream_vbi_fmt(struct cx2341x_handler *cxhdl, u32 fmt)
type == V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD)) { type == V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD)) {
/* Only IVTV fmt VBI insertion & only MPEG-2 PS type streams */ /* Only IVTV fmt VBI insertion & only MPEG-2 PS type streams */
cx->vbi.insert_mpeg = V4L2_MPEG_STREAM_VBI_FMT_NONE; cx->vbi.insert_mpeg = V4L2_MPEG_STREAM_VBI_FMT_NONE;
CX18_DEBUG_INFO("disabled insertion of sliced VBI data into " CX18_DEBUG_INFO("disabled insertion of sliced VBI data into the MPEG stream\n");
"the MPEG stream\n");
return 0; return 0;
} }
@ -63,16 +62,14 @@ static int cx18_s_stream_vbi_fmt(struct cx2341x_handler *cxhdl, u32 fmt)
} }
cx->vbi.insert_mpeg = cx->vbi.insert_mpeg =
V4L2_MPEG_STREAM_VBI_FMT_NONE; V4L2_MPEG_STREAM_VBI_FMT_NONE;
CX18_WARN("Unable to allocate buffers for " CX18_WARN("Unable to allocate buffers for sliced VBI data insertion\n");
"sliced VBI data insertion\n");
return -ENOMEM; return -ENOMEM;
} }
} }
} }
cx->vbi.insert_mpeg = fmt; cx->vbi.insert_mpeg = fmt;
CX18_DEBUG_INFO("enabled insertion of sliced VBI data into the MPEG PS," CX18_DEBUG_INFO("enabled insertion of sliced VBI data into the MPEG PS,when sliced VBI is enabled\n");
"when sliced VBI is enabled\n");
/* /*
* If our current settings have no lines set for capture, store a valid, * If our current settings have no lines set for capture, store a valid,

View File

@ -405,8 +405,8 @@ static void cx18_process_eeprom(struct cx18 *cx)
CX18_ERR("Invalid EEPROM\n"); CX18_ERR("Invalid EEPROM\n");
return; return;
default: default:
CX18_ERR("Unknown model %d, defaulting to original HVR-1600 " CX18_ERR("Unknown model %d, defaulting to original HVR-1600 (cardtype=1)\n",
"(cardtype=1)\n", tv.model); tv.model);
cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT); cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT);
break; break;
} }
@ -635,8 +635,8 @@ static void cx18_process_options(struct cx18 *cx)
/* convert from kB to bytes */ /* convert from kB to bytes */
cx->stream_buf_size[i] *= 1024; cx->stream_buf_size[i] *= 1024;
} }
CX18_DEBUG_INFO("Stream type %d options: %d MB, %d buffers, " CX18_DEBUG_INFO("Stream type %d options: %d MB, %d buffers, %d bytes\n",
"%d bytes\n", i, cx->options.megabytes[i], i, cx->options.megabytes[i],
cx->stream_buffers[i], cx->stream_buf_size[i]); cx->stream_buffers[i], cx->stream_buf_size[i]);
} }
@ -838,14 +838,13 @@ static int cx18_setup_pci(struct cx18 *cx, struct pci_dev *pci_dev,
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &pci_latency); pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &pci_latency);
if (pci_latency < 64 && cx18_pci_latency) { if (pci_latency < 64 && cx18_pci_latency) {
CX18_INFO("Unreasonably low latency timer, " CX18_INFO("Unreasonably low latency timer, setting to 64 (was %d)\n",
"setting to 64 (was %d)\n", pci_latency); pci_latency);
pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, 64); pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, 64);
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &pci_latency); pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &pci_latency);
} }
CX18_DEBUG_INFO("cx%d (rev %d) at %02x:%02x.%x, " CX18_DEBUG_INFO("cx%d (rev %d) at %02x:%02x.%x, irq: %d, latency: %d, memory: 0x%llx\n",
"irq: %d, latency: %d, memory: 0x%llx\n",
cx->pci_dev->device, cx->card_rev, pci_dev->bus->number, cx->pci_dev->device, cx->card_rev, pci_dev->bus->number,
PCI_SLOT(pci_dev->devfn), PCI_FUNC(pci_dev->devfn), PCI_SLOT(pci_dev->devfn), PCI_FUNC(pci_dev->devfn),
cx->pci_dev->irq, pci_latency, (u64)cx->base_addr); cx->pci_dev->irq, pci_latency, (u64)cx->base_addr);
@ -910,8 +909,8 @@ static int cx18_probe(struct pci_dev *pci_dev,
/* FIXME - module parameter arrays constrain max instances */ /* FIXME - module parameter arrays constrain max instances */
i = atomic_inc_return(&cx18_instance) - 1; i = atomic_inc_return(&cx18_instance) - 1;
if (i >= CX18_MAX_CARDS) { if (i >= CX18_MAX_CARDS) {
printk(KERN_ERR "cx18: cannot manage card %d, driver has a " printk(KERN_ERR "cx18: cannot manage card %d, driver has a limit of 0 - %d\n",
"limit of 0 - %d\n", i, CX18_MAX_CARDS - 1); i, CX18_MAX_CARDS - 1);
return -ENOMEM; return -ENOMEM;
} }
@ -926,8 +925,8 @@ static int cx18_probe(struct pci_dev *pci_dev,
retval = v4l2_device_register(&pci_dev->dev, &cx->v4l2_dev); retval = v4l2_device_register(&pci_dev->dev, &cx->v4l2_dev);
if (retval) { if (retval) {
printk(KERN_ERR "cx18: v4l2_device_register of card %d failed" printk(KERN_ERR "cx18: v4l2_device_register of card %d failed\n",
"\n", cx->instance); cx->instance);
kfree(cx); kfree(cx);
return retval; return retval;
} }
@ -958,13 +957,10 @@ static int cx18_probe(struct pci_dev *pci_dev,
cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET, cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET,
CX18_MEM_SIZE); CX18_MEM_SIZE);
if (!cx->enc_mem) { if (!cx->enc_mem) {
CX18_ERR("ioremap failed. Can't get a window into CX23418 " CX18_ERR("ioremap failed. Can't get a window into CX23418 memory and register space\n");
"memory and register space\n"); CX18_ERR("Each capture card with a CX23418 needs 64 MB of vmalloc address space for the window\n");
CX18_ERR("Each capture card with a CX23418 needs 64 MB of "
"vmalloc address space for the window\n");
CX18_ERR("Check the output of 'grep Vmalloc /proc/meminfo'\n"); CX18_ERR("Check the output of 'grep Vmalloc /proc/meminfo'\n");
CX18_ERR("Use the vmalloc= kernel command line option to set " CX18_ERR("Use the vmalloc= kernel command line option to set VmallocTotal to a larger value\n");
"VmallocTotal to a larger value\n");
retval = -ENOMEM; retval = -ENOMEM;
goto free_mem; goto free_mem;
} }
@ -1000,8 +996,7 @@ static int cx18_probe(struct pci_dev *pci_dev,
/* Initialize GPIO Reset Controller to do chip resets during i2c init */ /* Initialize GPIO Reset Controller to do chip resets during i2c init */
if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) { if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) {
if (cx18_gpio_register(cx, CX18_HW_GPIO_RESET_CTRL) != 0) if (cx18_gpio_register(cx, CX18_HW_GPIO_RESET_CTRL) != 0)
CX18_WARN("Could not register GPIO reset controller" CX18_WARN("Could not register GPIO reset controllersubdevice; proceeding anyway.\n");
"subdevice; proceeding anyway.\n");
else else
cx->hw_flags |= CX18_HW_GPIO_RESET_CTRL; cx->hw_flags |= CX18_HW_GPIO_RESET_CTRL;
} }

View File

@ -155,10 +155,8 @@ static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream,
} }
if (ret) { if (ret) {
CX18_ERR("The MPC718 board variant with the MT352 DVB-T" CX18_ERR("The MPC718 board variant with the MT352 DVB-Tdemodualtor will not work without it\n");
"demodualtor will not work without it\n"); CX18_ERR("Run 'linux/Documentation/dvb/get_dvb_firmware mpc718' if you need the firmware\n");
CX18_ERR("Run 'linux/Documentation/dvb/get_dvb_firmware "
"mpc718' if you need the firmware\n");
} }
return ret; return ret;
} }

View File

@ -49,8 +49,7 @@ int cx18_claim_stream(struct cx18_open_id *id, int type)
/* Nothing should ever try to directly claim the IDX stream */ /* Nothing should ever try to directly claim the IDX stream */
if (type == CX18_ENC_STREAM_TYPE_IDX) { if (type == CX18_ENC_STREAM_TYPE_IDX) {
CX18_WARN("MPEG Index stream cannot be claimed " CX18_WARN("MPEG Index stream cannot be claimed directly, but something tried.\n");
"directly, but something tried.\n");
return -EINVAL; return -EINVAL;
} }
@ -728,8 +727,7 @@ void cx18_stop_capture(struct cx18_open_id *id, int gop_end)
/* Stop internal use associated VBI and IDX streams */ /* Stop internal use associated VBI and IDX streams */
if (test_bit(CX18_F_S_STREAMING, &s_vbi->s_flags) && if (test_bit(CX18_F_S_STREAMING, &s_vbi->s_flags) &&
!test_bit(CX18_F_S_APPL_IO, &s_vbi->s_flags)) { !test_bit(CX18_F_S_APPL_IO, &s_vbi->s_flags)) {
CX18_DEBUG_INFO("close stopping embedded VBI " CX18_DEBUG_INFO("close stopping embedded VBI capture\n");
"capture\n");
cx18_stop_v4l2_encode_stream(s_vbi, 0); cx18_stop_v4l2_encode_stream(s_vbi, 0);
} }
if (test_bit(CX18_F_S_STREAMING, &s_idx->s_flags)) { if (test_bit(CX18_F_S_STREAMING, &s_idx->s_flags)) {

View File

@ -951,8 +951,7 @@ static int cx18_encoder_cmd(struct file *file, void *fh,
return 0; return 0;
h = cx18_find_handle(cx); h = cx18_find_handle(cx);
if (h == CX18_INVALID_TASK_HANDLE) { if (h == CX18_INVALID_TASK_HANDLE) {
CX18_ERR("Can't find valid task handle for " CX18_ERR("Can't find valid task handle for V4L2_ENC_CMD_PAUSE\n");
"V4L2_ENC_CMD_PAUSE\n");
return -EBADFD; return -EBADFD;
} }
cx18_mute(cx); cx18_mute(cx);
@ -968,8 +967,7 @@ static int cx18_encoder_cmd(struct file *file, void *fh,
return 0; return 0;
h = cx18_find_handle(cx); h = cx18_find_handle(cx);
if (h == CX18_INVALID_TASK_HANDLE) { if (h == CX18_INVALID_TASK_HANDLE) {
CX18_ERR("Can't find valid task handle for " CX18_ERR("Can't find valid task handle for V4L2_ENC_CMD_RESUME\n");
"V4L2_ENC_CMD_RESUME\n");
return -EBADFD; return -EBADFD;
} }
cx18_vapi(cx, CX18_CPU_CAPTURE_RESUME, 1, h); cx18_vapi(cx, CX18_CPU_CAPTURE_RESUME, 1, h);

View File

@ -59,8 +59,8 @@ irqreturn_t cx18_irq_handler(int irq, void *dev_id)
cx18_write_reg_expect(cx, hw2, HW2_INT_CLR_STATUS, ~hw2, hw2); cx18_write_reg_expect(cx, hw2, HW2_INT_CLR_STATUS, ~hw2, hw2);
if (sw1 || sw2 || hw2) if (sw1 || sw2 || hw2)
CX18_DEBUG_HI_IRQ("received interrupts " CX18_DEBUG_HI_IRQ("received interrupts SW1: %x SW2: %x HW2: %x\n",
"SW1: %x SW2: %x HW2: %x\n", sw1, sw2, hw2); sw1, sw2, hw2);
/* /*
* SW1 responses have to happen first. The sending XPU times out the * SW1 responses have to happen first. The sending XPU times out the

View File

@ -123,8 +123,8 @@ static void dump_mb(struct cx18 *cx, struct cx18_mailbox *mb, char *name)
if (!(cx18_debug & CX18_DBGFLG_API)) if (!(cx18_debug & CX18_DBGFLG_API))
return; return;
CX18_DEBUG_API("%s: req %#010x ack %#010x cmd %#010x err %#010x args%s" CX18_DEBUG_API("%s: req %#010x ack %#010x cmd %#010x err %#010x args%s\n",
"\n", name, mb->request, mb->ack, mb->cmd, mb->error, name, mb->request, mb->ack, mb->cmd, mb->error,
u32arr2hex(mb->args, MAX_MB_ARGUMENTS, argstr)); u32arr2hex(mb->args, MAX_MB_ARGUMENTS, argstr));
} }
@ -255,8 +255,8 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order)
s = cx18_handle_to_stream(cx, handle); s = cx18_handle_to_stream(cx, handle);
if (s == NULL) { if (s == NULL) {
CX18_WARN("Got DMA done notification for unknown/inactive" CX18_WARN("Got DMA done notification for unknown/inactive handle %d, %s mailbox seq no %d\n",
" handle %d, %s mailbox seq no %d\n", handle, handle,
(order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) ? (order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) ?
"stale" : "good", mb->request); "stale" : "good", mb->request);
return; return;
@ -290,9 +290,8 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order)
if ((order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) && if ((order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) &&
!(id >= s->mdl_base_idx && !(id >= s->mdl_base_idx &&
id < (s->mdl_base_idx + s->buffers))) { id < (s->mdl_base_idx + s->buffers))) {
CX18_WARN("Fell behind! Ignoring stale mailbox with " CX18_WARN("Fell behind! Ignoring stale mailbox with inconsistent data. Lost MDL for mailbox seq no %d\n",
" inconsistent data. Lost MDL for mailbox " mb->request);
"seq no %d\n", mb->request);
break; break;
} }
mdl = cx18_queue_get_mdl(s, id, mdl_ack->data_used); mdl = cx18_queue_get_mdl(s, id, mdl_ack->data_used);
@ -418,9 +417,7 @@ static void mb_ack_irq(struct cx18 *cx, struct cx18_in_work_order *order)
/* Don't ack if the RPU has gotten impatient and timed us out */ /* Don't ack if the RPU has gotten impatient and timed us out */
if (req != cx18_readl(cx, &ack_mb->request) || if (req != cx18_readl(cx, &ack_mb->request) ||
req == cx18_readl(cx, &ack_mb->ack)) { req == cx18_readl(cx, &ack_mb->ack)) {
CX18_DEBUG_WARN("Possibly falling behind: %s self-ack'ed our " CX18_DEBUG_WARN("Possibly falling behind: %s self-ack'ed our incoming %s to EPU mailbox (sequence no. %u) while processing\n",
"incoming %s to EPU mailbox (sequence no. %u) "
"while processing\n",
rpu_str[order->rpu], rpu_str[order->rpu], req); rpu_str[order->rpu], rpu_str[order->rpu], req);
order->flags |= CX18_F_EWO_MB_STALE_WHILE_PROC; order->flags |= CX18_F_EWO_MB_STALE_WHILE_PROC;
return; return;
@ -555,8 +552,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu)
order = alloc_in_work_order_irq(cx); order = alloc_in_work_order_irq(cx);
if (order == NULL) { if (order == NULL) {
CX18_WARN("Unable to find blank work order form to schedule " CX18_WARN("Unable to find blank work order form to schedule incoming mailbox command processing\n");
"incoming mailbox command processing\n");
return; return;
} }
@ -573,9 +569,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu)
(&order_mb->request)[i] = cx18_readl(cx, &mb->request + i); (&order_mb->request)[i] = cx18_readl(cx, &mb->request + i);
if (order_mb->request == order_mb->ack) { if (order_mb->request == order_mb->ack) {
CX18_DEBUG_WARN("Possibly falling behind: %s self-ack'ed our " CX18_DEBUG_WARN("Possibly falling behind: %s self-ack'ed our incoming %s to EPU mailbox (sequence no. %u)\n",
"incoming %s to EPU mailbox (sequence no. %u)"
"\n",
rpu_str[rpu], rpu_str[rpu], order_mb->request); rpu_str[rpu], rpu_str[rpu], order_mb->request);
if (cx18_debug & CX18_DBGFLG_WARN) if (cx18_debug & CX18_DBGFLG_WARN)
dump_mb(cx, order_mb, "incoming"); dump_mb(cx, order_mb, "incoming");
@ -663,8 +657,8 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
if (req != ack) { if (req != ack) {
/* waited long enough, make the mbox "not busy" from our end */ /* waited long enough, make the mbox "not busy" from our end */
cx18_writel(cx, req, &mb->ack); cx18_writel(cx, req, &mb->ack);
CX18_ERR("mbox was found stuck busy when setting up for %s; " CX18_ERR("mbox was found stuck busy when setting up for %s; clearing busy and trying to proceed\n",
"clearing busy and trying to proceed\n", info->name); info->name);
} else if (ret != timeout) } else if (ret != timeout)
CX18_DEBUG_API("waited %u msecs for busy mbox to be acked\n", CX18_DEBUG_API("waited %u msecs for busy mbox to be acked\n",
jiffies_to_msecs(timeout-ret)); jiffies_to_msecs(timeout-ret));
@ -707,14 +701,10 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
mutex_unlock(mb_lock); mutex_unlock(mb_lock);
if (ret >= timeout) { if (ret >= timeout) {
/* Timed out */ /* Timed out */
CX18_DEBUG_WARN("sending %s timed out waiting %d msecs " CX18_DEBUG_WARN("sending %s timed out waiting %d msecs for RPU acknowledgment\n",
"for RPU acknowledgement\n",
info->name, jiffies_to_msecs(ret)); info->name, jiffies_to_msecs(ret));
} else { } else {
CX18_DEBUG_WARN("woken up before mailbox ack was ready " CX18_DEBUG_WARN("woken up before mailbox ack was ready after submitting %s to RPU. only waited %d msecs on req %u but awakened with unmatched ack %u\n",
"after submitting %s to RPU. only "
"waited %d msecs on req %u but awakened"
" with unmatched ack %u\n",
info->name, info->name,
jiffies_to_msecs(ret), jiffies_to_msecs(ret),
req, ack); req, ack);
@ -723,8 +713,7 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
} }
if (ret >= timeout) if (ret >= timeout)
CX18_DEBUG_WARN("failed to be awakened upon RPU acknowledgment " CX18_DEBUG_WARN("failed to be awakened upon RPU acknowledgment sending %s; timed out waiting %d msecs\n",
"sending %s; timed out waiting %d msecs\n",
info->name, jiffies_to_msecs(ret)); info->name, jiffies_to_msecs(ret));
else else
CX18_DEBUG_HI_API("waited %u msecs for %s to be acked\n", CX18_DEBUG_HI_API("waited %u msecs for %s to be acked\n",

View File

@ -164,9 +164,8 @@ struct cx18_mdl *cx18_queue_get_mdl(struct cx18_stream *s, u32 id,
mdl->skipped++; mdl->skipped++;
if (mdl->skipped >= atomic_read(&s->q_busy.depth)-1) { if (mdl->skipped >= atomic_read(&s->q_busy.depth)-1) {
/* mdl must have fallen out of rotation */ /* mdl must have fallen out of rotation */
CX18_WARN("Skipped %s, MDL %d, %d " CX18_WARN("Skipped %s, MDL %d, %d times - it must have dropped out of rotation\n",
"times - it must have dropped out of " s->name, mdl->id,
"rotation\n", s->name, mdl->id,
mdl->skipped); mdl->skipped);
/* Sweep it up to put it back into rotation */ /* Sweep it up to put it back into rotation */
list_move_tail(&mdl->list, &sweep_up); list_move_tail(&mdl->list, &sweep_up);
@ -352,8 +351,7 @@ int cx18_stream_alloc(struct cx18_stream *s)
if (s->buffers == 0) if (s->buffers == 0)
return 0; return 0;
CX18_DEBUG_INFO("Allocate %s stream: %d x %d buffers " CX18_DEBUG_INFO("Allocate %s stream: %d x %d buffers (%d.%02d kB total)\n",
"(%d.%02d kB total)\n",
s->name, s->buffers, s->buf_size, s->name, s->buffers, s->buf_size,
s->buffers * s->buf_size / 1024, s->buffers * s->buf_size / 1024,
(s->buffers * s->buf_size * 100 / 1024) % 100); (s->buffers * s->buf_size * 100 / 1024) % 100);

View File

@ -353,8 +353,8 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
if (cx->card->hw_all & CX18_HW_DVB) { if (cx->card->hw_all & CX18_HW_DVB) {
s->dvb = kzalloc(sizeof(struct cx18_dvb), GFP_KERNEL); s->dvb = kzalloc(sizeof(struct cx18_dvb), GFP_KERNEL);
if (s->dvb == NULL) { if (s->dvb == NULL) {
CX18_ERR("Couldn't allocate cx18_dvb structure" CX18_ERR("Couldn't allocate cx18_dvb structure for %s\n",
" for %s\n", s->name); s->name);
return -ENOMEM; return -ENOMEM;
} }
} else { } else {
@ -462,8 +462,7 @@ static int cx18_reg_dev(struct cx18 *cx, int type)
case VFL_TYPE_VBI: case VFL_TYPE_VBI:
if (cx->stream_buffers[type]) if (cx->stream_buffers[type])
CX18_INFO("Registered device %s for %s " CX18_INFO("Registered device %s for %s (%d x %d bytes)\n",
"(%d x %d bytes)\n",
name, s->name, cx->stream_buffers[type], name, s->name, cx->stream_buffers[type],
cx->stream_buf_size[type]); cx->stream_buf_size[type]);
else else