diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-18 15:44:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-21 07:11:52 -0400 |
commit | f8a3dcb5a927141610e30d01e5782ba4a4516980 (patch) | |
tree | 76e03e7062fe37159c9c0505fa4255ba4cce65a6 /drivers/media/pci/meye | |
parent | 67ccf860a0181e0af627fa873990fa98a6c4036d (diff) |
[media] meye: 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/meye')
-rw-r--r-- | drivers/media/pci/meye/meye.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index ba887e8e1b17..11d81389ab1e 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c | |||
@@ -60,8 +60,7 @@ MODULE_PARM_DESC(gbuffers, "number of capture buffers, default is 2 (32 max)"); | |||
60 | /* size of a grab buffer */ | 60 | /* size of a grab buffer */ |
61 | static unsigned int gbufsize = MEYE_MAX_BUFSIZE; | 61 | static unsigned int gbufsize = MEYE_MAX_BUFSIZE; |
62 | module_param(gbufsize, int, 0444); | 62 | module_param(gbufsize, int, 0444); |
63 | MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400" | 63 | MODULE_PARM_DESC(gbufsize, "size of the capture buffers, default is 614400 (will be rounded up to a page multiple)"); |
64 | " (will be rounded up to a page multiple)"); | ||
65 | 64 | ||
66 | /* /dev/videoX registration number */ | 65 | /* /dev/videoX registration number */ |
67 | static int video_nr = -1; | 66 | static int video_nr = -1; |
@@ -1261,8 +1260,7 @@ static int vidioc_reqbufs(struct file *file, void *fh, | |||
1261 | meye.grab_fbuffer = rvmalloc(gbuffers * gbufsize); | 1260 | meye.grab_fbuffer = rvmalloc(gbuffers * gbufsize); |
1262 | 1261 | ||
1263 | if (!meye.grab_fbuffer) { | 1262 | if (!meye.grab_fbuffer) { |
1264 | printk(KERN_ERR "meye: v4l framebuffer allocation" | 1263 | printk(KERN_ERR "meye: v4l framebuffer allocation failed\n"); |
1265 | " failed\n"); | ||
1266 | mutex_unlock(&meye.lock); | 1264 | mutex_unlock(&meye.lock); |
1267 | return -ENOMEM; | 1265 | return -ENOMEM; |
1268 | } | 1266 | } |
@@ -1659,8 +1657,7 @@ static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) | |||
1659 | ret = -EIO; | 1657 | ret = -EIO; |
1660 | if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) { | 1658 | if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) { |
1661 | v4l2_err(v4l2_dev, "meye: unable to power on the camera\n"); | 1659 | v4l2_err(v4l2_dev, "meye: unable to power on the camera\n"); |
1662 | v4l2_err(v4l2_dev, "meye: did you enable the camera in " | 1660 | v4l2_err(v4l2_dev, "meye: did you enable the camera in sonypi using the module options ?\n"); |
1663 | "sonypi using the module options ?\n"); | ||
1664 | goto outsonypienable; | 1661 | goto outsonypienable; |
1665 | } | 1662 | } |
1666 | 1663 | ||
@@ -1834,8 +1831,7 @@ static int __init meye_init(void) | |||
1834 | if (gbufsize > MEYE_MAX_BUFSIZE) | 1831 | if (gbufsize > MEYE_MAX_BUFSIZE) |
1835 | gbufsize = MEYE_MAX_BUFSIZE; | 1832 | gbufsize = MEYE_MAX_BUFSIZE; |
1836 | gbufsize = PAGE_ALIGN(gbufsize); | 1833 | gbufsize = PAGE_ALIGN(gbufsize); |
1837 | printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) " | 1834 | printk(KERN_INFO "meye: using %d buffers with %dk (%dk total) for capture\n", |
1838 | "for capture\n", | ||
1839 | gbuffers, | 1835 | gbuffers, |
1840 | gbufsize / 1024, gbuffers * gbufsize / 1024); | 1836 | gbufsize / 1024, gbuffers * gbufsize / 1024); |
1841 | return pci_register_driver(&meye_driver); | 1837 | return pci_register_driver(&meye_driver); |