Commit e84541f0 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] wl128x: 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 3c1e3009
...@@ -230,8 +230,8 @@ inline void dump_rx_skb_data(struct sk_buff *skb) ...@@ -230,8 +230,8 @@ inline void dump_rx_skb_data(struct sk_buff *skb)
struct fm_event_msg_hdr *evt_hdr; struct fm_event_msg_hdr *evt_hdr;
evt_hdr = (struct fm_event_msg_hdr *)skb->data; evt_hdr = (struct fm_event_msg_hdr *)skb->data;
printk(KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x " printk(KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x opcode:%02x type:%s dlen:%02x",
"opcode:%02x type:%s dlen:%02x", evt_hdr->hdr, evt_hdr->len, evt_hdr->hdr, evt_hdr->len,
evt_hdr->status, evt_hdr->num_fm_hci_cmds, evt_hdr->op, evt_hdr->status, evt_hdr->num_fm_hci_cmds, evt_hdr->op,
(evt_hdr->rd_wr) ? "RD" : "WR", evt_hdr->dlen); (evt_hdr->rd_wr) ? "RD" : "WR", evt_hdr->dlen);
...@@ -271,8 +271,8 @@ static void recv_tasklet(unsigned long arg) ...@@ -271,8 +271,8 @@ static void recv_tasklet(unsigned long arg)
/* Process all packets in the RX queue */ /* Process all packets in the RX queue */
while ((skb = skb_dequeue(&fmdev->rx_q))) { while ((skb = skb_dequeue(&fmdev->rx_q))) {
if (skb->len < sizeof(struct fm_event_msg_hdr)) { if (skb->len < sizeof(struct fm_event_msg_hdr)) {
fmerr("skb(%p) has only %d bytes, " fmerr("skb(%p) has only %d bytes, at least need %zu bytes to decode\n",
"at least need %zu bytes to decode\n", skb, skb,
skb->len, sizeof(struct fm_event_msg_hdr)); skb->len, sizeof(struct fm_event_msg_hdr));
kfree_skb(skb); kfree_skb(skb);
continue; continue;
...@@ -472,8 +472,7 @@ int fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload, ...@@ -472,8 +472,7 @@ int fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload,
if (!wait_for_completion_timeout(&fmdev->maintask_comp, if (!wait_for_completion_timeout(&fmdev->maintask_comp,
FM_DRV_TX_TIMEOUT)) { FM_DRV_TX_TIMEOUT)) {
fmerr("Timeout(%d sec),didn't get reg" fmerr("Timeout(%d sec),didn't get regcompletion signal from RX tasklet\n",
"completion signal from RX tasklet\n",
jiffies_to_msecs(FM_DRV_TX_TIMEOUT) / 1000); jiffies_to_msecs(FM_DRV_TX_TIMEOUT) / 1000);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -523,8 +522,7 @@ static inline int check_cmdresp_status(struct fmdev *fmdev, ...@@ -523,8 +522,7 @@ static inline int check_cmdresp_status(struct fmdev *fmdev,
fm_evt_hdr = (void *)(*skb)->data; fm_evt_hdr = (void *)(*skb)->data;
if (fm_evt_hdr->status != 0) { if (fm_evt_hdr->status != 0) {
fmerr("irq: opcode %x response status is not zero " fmerr("irq: opcode %x response status is not zero Initiating irq recovery process\n",
"Initiating irq recovery process\n",
fm_evt_hdr->op); fm_evt_hdr->op);
mod_timer(&fmdev->irq_info.timer, jiffies + FM_DRV_TX_TIMEOUT); mod_timer(&fmdev->irq_info.timer, jiffies + FM_DRV_TX_TIMEOUT);
...@@ -564,8 +562,7 @@ static void int_timeout_handler(unsigned long data) ...@@ -564,8 +562,7 @@ static void int_timeout_handler(unsigned long data)
* reset stage index & retry count values */ * reset stage index & retry count values */
fmirq->stage = 0; fmirq->stage = 0;
fmirq->retry = 0; fmirq->retry = 0;
fmerr("Recovery action failed during" fmerr("Recovery action failed duringirq processing, max retry reached\n");
"irq processing, max retry reached\n");
return; return;
} }
fm_irq_call_stage(fmdev, FM_SEND_INTMSK_CMD_IDX); fm_irq_call_stage(fmdev, FM_SEND_INTMSK_CMD_IDX);
...@@ -1516,14 +1513,13 @@ int fmc_prepare(struct fmdev *fmdev) ...@@ -1516,14 +1513,13 @@ int fmc_prepare(struct fmdev *fmdev)
if (!wait_for_completion_timeout(&wait_for_fmdrv_reg_comp, if (!wait_for_completion_timeout(&wait_for_fmdrv_reg_comp,
FM_ST_REG_TIMEOUT)) { FM_ST_REG_TIMEOUT)) {
fmerr("Timeout(%d sec), didn't get reg " fmerr("Timeout(%d sec), didn't get reg completion signal from ST\n",
"completion signal from ST\n",
jiffies_to_msecs(FM_ST_REG_TIMEOUT) / 1000); jiffies_to_msecs(FM_ST_REG_TIMEOUT) / 1000);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
if (fmdev->streg_cbdata != 0) { if (fmdev->streg_cbdata != 0) {
fmerr("ST reg comp CB called with error " fmerr("ST reg comp CB called with error status %d\n",
"status %d\n", fmdev->streg_cbdata); fmdev->streg_cbdata);
return -EAGAIN; return -EAGAIN;
} }
......
...@@ -120,8 +120,8 @@ int fm_rx_set_freq(struct fmdev *fmdev, u32 freq) ...@@ -120,8 +120,8 @@ int fm_rx_set_freq(struct fmdev *fmdev, u32 freq)
curr_frq_in_khz = (fmdev->rx.region.bot_freq + ((u32)curr_frq * FM_FREQ_MUL)); curr_frq_in_khz = (fmdev->rx.region.bot_freq + ((u32)curr_frq * FM_FREQ_MUL));
if (curr_frq_in_khz != freq) { if (curr_frq_in_khz != freq) {
pr_info("Frequency is set to (%d) but " pr_info("Frequency is set to (%d) but requested freq is (%d)\n",
"requested freq is (%d)\n", curr_frq_in_khz, freq); curr_frq_in_khz, freq);
} }
/* Update local cache */ /* Update local cache */
...@@ -390,8 +390,8 @@ int fm_rx_set_region(struct fmdev *fmdev, u8 region_to_set) ...@@ -390,8 +390,8 @@ int fm_rx_set_region(struct fmdev *fmdev, u8 region_to_set)
new_frq = fmdev->rx.region.top_freq; new_frq = fmdev->rx.region.top_freq;
if (new_frq) { if (new_frq) {
fmdbg("Current freq is not within band limit boundary," fmdbg("Current freq is not within band limit boundary,switching to %d KHz\n",
"switching to %d KHz\n", new_frq); new_frq);
/* Current RX frequency is not in range. So, update it */ /* Current RX frequency is not in range. So, update it */
ret = fm_rx_set_freq(fmdev, new_frq); ret = fm_rx_set_freq(fmdev, new_frq);
} }
......
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