summaryrefslogtreecommitdiff
path: root/drivers/media/pci/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-18 17:44:04 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-21 09:09:41 -0200
commite318e584f70f60170809dd975bbd480fc06cc5e4 (patch)
tree8ca76bbc243cb90881b48f8a3c0f155bb1c592cc /drivers/media/pci/cx88/cx88-mpeg.c
parent07ab29e11696cf05c3563479bfc838c28a03d606 (diff)
downloadlinux-next-e318e584f70f60170809dd975bbd480fc06cc5e4.tar.gz
[media] cx88: 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>
Diffstat (limited to 'drivers/media/pci/cx88/cx88-mpeg.c')
-rw-r--r--drivers/media/pci/cx88/cx88-mpeg.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c
index 245357adbc25..86b46b62d985 100644
--- a/drivers/media/pci/cx88/cx88-mpeg.c
+++ b/drivers/media/pci/cx88/cx88-mpeg.c
@@ -401,8 +401,8 @@ static int cx8802_init_common(struct cx8802_dev *dev)
dev->pci_rev = dev->pci->revision;
pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER, &dev->pci_lat);
- printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, "
- "latency: %d, mmio: 0x%llx\n", dev->core->name,
+ printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n",
+ dev->core->name,
pci_name(dev->pci), dev->pci_rev, dev->pci->irq,
dev->pci_lat,(unsigned long long)pci_resource_start(dev->pci,0));
@@ -690,8 +690,8 @@ int cx8802_unregister_driver(struct cx8802_driver *drv)
list_del(&d->drvlist);
kfree(d);
} else
- printk(KERN_ERR "%s/2: cx8802 driver remove "
- "failed (%d)\n", dev->core->name, err);
+ printk(KERN_ERR "%s/2: cx8802 driver remove failed (%d)\n",
+ dev->core->name, err);
}
mutex_unlock(&dev->core->lock);
@@ -768,8 +768,7 @@ static void cx8802_remove(struct pci_dev *pci_dev)
struct cx8802_driver *drv, *tmp;
int err;
- printk(KERN_WARNING "%s/2: Trying to remove cx8802 driver "
- "while cx8802 sub-drivers still loaded?!\n",
+ printk(KERN_WARNING "%s/2: Trying to remove cx8802 driver while cx8802 sub-drivers still loaded?!\n",
dev->core->name);
list_for_each_entry_safe(drv, tmp, &dev->drvlist, drvlist) {
@@ -777,8 +776,8 @@ static void cx8802_remove(struct pci_dev *pci_dev)
if (err == 0) {
list_del(&drv->drvlist);
} else
- printk(KERN_ERR "%s/2: cx8802 driver remove "
- "failed (%d)\n", dev->core->name, err);
+ printk(KERN_ERR "%s/2: cx8802 driver remove failed (%d)\n",
+ dev->core->name, err);
kfree(drv);
}
}