Commit 07ab29e1 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] cx23885: 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: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 6beb1388
...@@ -365,11 +365,8 @@ static void netup_read_ci_status(struct work_struct *work) ...@@ -365,11 +365,8 @@ static void netup_read_ci_status(struct work_struct *work)
if (ret != 0) if (ret != 0)
return; return;
ci_dbg_print("%s: Slot Status Addr=[0x%04x], " ci_dbg_print("%s: Slot Status Addr=[0x%04x], Reg=[0x%02x], data=%02x, TS config = %02x\n",
"Reg=[0x%02x], data=%02x, " __func__, state->ci_i2c_addr, 0, buf[0], buf[0]);
"TS config = %02x\n", __func__,
state->ci_i2c_addr, 0, buf[0],
buf[0]);
if (buf[0] & 1) if (buf[0] & 1)
......
...@@ -770,9 +770,8 @@ static int cx23885_mbox_func(void *priv, ...@@ -770,9 +770,8 @@ static int cx23885_mbox_func(void *priv,
mc417_memory_read(dev, dev->cx23417_mailbox - 4, &value); mc417_memory_read(dev, dev->cx23417_mailbox - 4, &value);
if (value != 0x12345678) { if (value != 0x12345678) {
printk(KERN_ERR printk(KERN_ERR
"Firmware and/or mailbox pointer not initialized " "Firmware and/or mailbox pointer not initialized or corrupted, signature = 0x%x, cmd = %s\n",
"or corrupted, signature = 0x%x, cmd = %s\n", value, value, cmd_to_str(command));
cmd_to_str(command));
return -1; return -1;
} }
...@@ -781,8 +780,8 @@ static int cx23885_mbox_func(void *priv, ...@@ -781,8 +780,8 @@ static int cx23885_mbox_func(void *priv,
*/ */
mc417_memory_read(dev, dev->cx23417_mailbox, &flag); mc417_memory_read(dev, dev->cx23417_mailbox, &flag);
if (flag) { if (flag) {
printk(KERN_ERR "ERROR: Mailbox appears to be in use " printk(KERN_ERR "ERROR: Mailbox appears to be in use (%x), cmd = %s\n",
"(%x), cmd = %s\n", flag, cmd_to_str(command)); flag, cmd_to_str(command));
return -1; return -1;
} }
...@@ -935,14 +934,12 @@ static int cx23885_load_firmware(struct cx23885_dev *dev) ...@@ -935,14 +934,12 @@ static int cx23885_load_firmware(struct cx23885_dev *dev)
printk(KERN_ERR printk(KERN_ERR
"ERROR: Hotplug firmware request failed (%s).\n", "ERROR: Hotplug firmware request failed (%s).\n",
CX23885_FIRM_IMAGE_NAME); CX23885_FIRM_IMAGE_NAME);
printk(KERN_ERR "Please fix your hotplug setup, the board will " printk(KERN_ERR "Please fix your hotplug setup, the board will not work without firmware loaded!\n");
"not work without firmware loaded!\n");
return -1; return -1;
} }
if (firmware->size != CX23885_FIRM_IMAGE_SIZE) { if (firmware->size != CX23885_FIRM_IMAGE_SIZE) {
printk(KERN_ERR "ERROR: Firmware size mismatch " printk(KERN_ERR "ERROR: Firmware size mismatch (have %zu, expected %d)\n",
"(have %zu, expected %d)\n",
firmware->size, CX23885_FIRM_IMAGE_SIZE); firmware->size, CX23885_FIRM_IMAGE_SIZE);
release_firmware(firmware); release_firmware(firmware);
return -1; return -1;
...@@ -1077,8 +1074,7 @@ static int cx23885_initialize_codec(struct cx23885_dev *dev, int startencoder) ...@@ -1077,8 +1074,7 @@ static int cx23885_initialize_codec(struct cx23885_dev *dev, int startencoder)
retval = cx23885_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1, retval = cx23885_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1,
&version); &version);
if (retval < 0) { if (retval < 0) {
printk(KERN_ERR "ERROR: cx23417 firmware get encoder :" printk(KERN_ERR "ERROR: cx23417 firmware get encoder :version failed!\n");
"version failed!\n");
return -1; return -1;
} }
dprintk(1, "cx23417 firmware version is 0x%08x\n", version); dprintk(1, "cx23417 firmware version is 0x%08x\n", version);
......
...@@ -186,8 +186,8 @@ static int cx23885_start_audio_dma(struct cx23885_audio_dev *chip) ...@@ -186,8 +186,8 @@ static int cx23885_start_audio_dma(struct cx23885_audio_dev *chip)
cx_write(AUD_INT_A_GPCNT_CTL, GP_COUNT_CONTROL_RESET); cx_write(AUD_INT_A_GPCNT_CTL, GP_COUNT_CONTROL_RESET);
atomic_set(&chip->count, 0); atomic_set(&chip->count, 0);
dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d " dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d byte buffer\n",
"byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start+12)>>1, buf->bpl, cx_read(audio_ch->cmds_start+12)>>1,
chip->num_periods, buf->bpl * chip->num_periods); chip->num_periods, buf->bpl * chip->num_periods);
/* Enables corresponding bits at AUD_INT_STAT */ /* Enables corresponding bits at AUD_INT_STAT */
...@@ -327,8 +327,7 @@ static int snd_cx23885_pcm_open(struct snd_pcm_substream *substream) ...@@ -327,8 +327,7 @@ static int snd_cx23885_pcm_open(struct snd_pcm_substream *substream)
int err; int err;
if (!chip) { if (!chip) {
printk(KERN_ERR "BUG: cx23885 can't find device struct." printk(KERN_ERR "BUG: cx23885 can't find device struct. Can't proceed with open\n");
" Can't proceed with open\n");
return -ENODEV; return -ENODEV;
} }
...@@ -555,8 +554,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev) ...@@ -555,8 +554,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev)
return NULL; return NULL;
if (dev->sram_channels[AUDIO_SRAM_CHANNEL].cmds_start == 0) { if (dev->sram_channels[AUDIO_SRAM_CHANNEL].cmds_start == 0) {
printk(KERN_WARNING "%s(): Missing SRAM channel configuration " printk(KERN_WARNING "%s(): Missing SRAM channel configuration for analog TV Audio\n",
"for analog TV Audio\n", __func__); __func__);
return NULL; return NULL;
} }
...@@ -590,8 +589,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev) ...@@ -590,8 +589,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev)
error: error:
snd_card_free(card); snd_card_free(card);
printk(KERN_ERR "%s(): Failed to register analog " printk(KERN_ERR "%s(): Failed to register analog audio adapter\n",
"audio adapter\n", __func__); __func__);
return NULL; return NULL;
} }
......
...@@ -1304,8 +1304,7 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) ...@@ -1304,8 +1304,7 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
*/ */
break; break;
default: default:
printk(KERN_WARNING "%s: warning: " printk(KERN_WARNING "%s: warning: unknown hauppauge model #%d\n",
"unknown hauppauge model #%d\n",
dev->name, tv.model); dev->name, tv.model);
break; break;
} }
...@@ -2342,9 +2341,8 @@ void cx23885_card_setup(struct cx23885_dev *dev) ...@@ -2342,9 +2341,8 @@ void cx23885_card_setup(struct cx23885_dev *dev)
ret = request_firmware(&fw, filename, &dev->pci->dev); ret = request_firmware(&fw, filename, &dev->pci->dev);
if (ret != 0) if (ret != 0)
printk(KERN_ERR "did not find the firmware file. (%s) " printk(KERN_ERR "did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems.",
"Please see linux/Documentation/dvb/ for more details " filename);
"on firmware-problems.", filename);
else else
altera_init(&netup_config, fw); altera_init(&netup_config, fw);
......
...@@ -915,8 +915,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) ...@@ -915,8 +915,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
cx23885_init_tsport(dev, &dev->ts2, 2); cx23885_init_tsport(dev, &dev->ts2, 2);
if (get_resources(dev) < 0) { if (get_resources(dev) < 0) {
printk(KERN_ERR "CORE %s No more PCIe resources for " printk(KERN_ERR "CORE %s No more PCIe resources for subsystem: %04x:%04x\n",
"subsystem: %04x:%04x\n",
dev->name, dev->pci->subsystem_vendor, dev->name, dev->pci->subsystem_vendor,
dev->pci->subsystem_device); dev->pci->subsystem_device);
...@@ -980,8 +979,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) ...@@ -980,8 +979,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
if (cx23885_boards[dev->board].porta == CX23885_ANALOG_VIDEO) { if (cx23885_boards[dev->board].porta == CX23885_ANALOG_VIDEO) {
if (cx23885_video_register(dev) < 0) { if (cx23885_video_register(dev) < 0) {
printk(KERN_ERR "%s() Failed to register analog " printk(KERN_ERR "%s() Failed to register analog video adapters on VID_A\n",
"video adapters on VID_A\n", __func__); __func__);
} }
} }
...@@ -1579,8 +1578,8 @@ int cx23885_irq_417(struct cx23885_dev *dev, u32 status) ...@@ -1579,8 +1578,8 @@ int cx23885_irq_417(struct cx23885_dev *dev, u32 status)
(status & VID_B_MSK_VBI_SYNC) || (status & VID_B_MSK_VBI_SYNC) ||
(status & VID_B_MSK_OF) || (status & VID_B_MSK_OF) ||
(status & VID_B_MSK_VBI_OF)) { (status & VID_B_MSK_VBI_OF)) {
printk(KERN_ERR "%s: V4L mpeg risc op code error, status " printk(KERN_ERR "%s: V4L mpeg risc op code error, status = 0x%x\n",
"= 0x%x\n", dev->name, status); dev->name, status);
if (status & VID_B_MSK_BAD_PKT) if (status & VID_B_MSK_BAD_PKT)
dprintk(1, " VID_B_MSK_BAD_PKT\n"); dprintk(1, " VID_B_MSK_BAD_PKT\n");
if (status & VID_B_MSK_OPC_ERR) if (status & VID_B_MSK_OPC_ERR)
...@@ -1995,8 +1994,8 @@ static int cx23885_initdev(struct pci_dev *pci_dev, ...@@ -1995,8 +1994,8 @@ static int cx23885_initdev(struct pci_dev *pci_dev,
/* print pci info */ /* print pci info */
dev->pci_rev = pci_dev->revision; dev->pci_rev = pci_dev->revision;
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat); pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, " printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n",
"latency: %d, mmio: 0x%llx\n", dev->name, dev->name,
pci_name(pci_dev), dev->pci_rev, pci_dev->irq, pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
dev->pci_lat, dev->pci_lat,
(unsigned long long)pci_resource_start(pci_dev, 0)); (unsigned long long)pci_resource_start(pci_dev, 0));
......
...@@ -2482,8 +2482,7 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -2482,8 +2482,7 @@ static int dvb_register(struct cx23885_tsport *port)
break; break;
default: default:
printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " printk(KERN_INFO "%s: The frontend of your DVB/ATSC card isn't supported yet\n",
" isn't supported yet\n",
dev->name); dev->name);
break; break;
} }
......
...@@ -1065,8 +1065,7 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) ...@@ -1065,8 +1065,7 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status)
} }
if (status & VID_BC_MSK_SYNC) if (status & VID_BC_MSK_SYNC)
dprintk(7, " (VID_BC_MSK_SYNC 0x%08x) " dprintk(7, " (VID_BC_MSK_SYNC 0x%08x) video lines miss-match\n",
"video lines miss-match\n",
VID_BC_MSK_SYNC); VID_BC_MSK_SYNC);
if (status & VID_BC_MSK_OF) if (status & VID_BC_MSK_OF)
......
...@@ -1015,8 +1015,8 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd) ...@@ -1015,8 +1015,8 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd)
j = 0; j = 0;
break; break;
} }
v4l2_info(sd, "\tNext carrier edge window: 16 clocks " v4l2_info(sd, "\tNext carrier edge window: 16 clocks -%1d/+%1d, %u to %u Hz\n",
"-%1d/+%1d, %u to %u Hz\n", i, j, i, j,
clock_divider_to_freq(rxclk, 16 + j), clock_divider_to_freq(rxclk, 16 + j),
clock_divider_to_freq(rxclk, 16 - i)); clock_divider_to_freq(rxclk, 16 - i));
} }
...@@ -1026,8 +1026,7 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd) ...@@ -1026,8 +1026,7 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd)
v4l2_info(sd, "\tLow pass filter: %s\n", v4l2_info(sd, "\tLow pass filter: %s\n",
filtr ? "enabled" : "disabled"); filtr ? "enabled" : "disabled");
if (filtr) if (filtr)
v4l2_info(sd, "\tMin acceptable pulse width (LPF): %u us, " v4l2_info(sd, "\tMin acceptable pulse width (LPF): %u us, %u ns\n",
"%u ns\n",
lpf_count_to_us(filtr), lpf_count_to_us(filtr),
lpf_count_to_ns(filtr)); lpf_count_to_ns(filtr));
v4l2_info(sd, "\tPulse width timer timed-out: %s\n", v4l2_info(sd, "\tPulse width timer timed-out: %s\n",
......
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