Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] omap: 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>

+16 -13
+13 -11
drivers/media/platform/omap/omap_vout.c
··· 408 408 v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, 409 409 "%s enable=%d addr=%pad width=%d\n height=%d color_mode=%d\n" 410 410 "rotation=%d mirror=%d posx=%d posy=%d out_width = %d \n" 411 - "out_height=%d rotation_type=%d screen_width=%d\n", 412 - __func__, ovl->is_enabled(ovl), &info.paddr, info.width, info.height, 411 + "out_height=%d rotation_type=%d screen_width=%d\n", __func__, 412 + ovl->is_enabled(ovl), &info.paddr, info.width, info.height, 413 413 info.color_mode, info.rotation, info.mirror, info.pos_x, 414 414 info.pos_y, info.out_width, info.out_height, info.rotation_type, 415 415 info.screen_width); ··· 791 791 dma_addr = dma_map_single(vout->vid_dev->v4l2_dev.dev, (void *) addr, 792 792 size, DMA_TO_DEVICE); 793 793 if (dma_mapping_error(vout->vid_dev->v4l2_dev.dev, dma_addr)) 794 - v4l2_err(&vout->vid_dev->v4l2_dev, "dma_map_single failed\n"); 794 + v4l2_err(&vout->vid_dev->v4l2_dev, 795 + "dma_map_single failed\n"); 795 796 796 797 vout->queued_buf_addr[vb->i] = (u8 *)vout->buf_phy_addr[vb->i]; 797 798 } ··· 1658 1657 /* Turn of the pipeline */ 1659 1658 ret = omapvid_apply_changes(vout); 1660 1659 if (ret) 1661 - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode in" 1662 - " streamoff\n"); 1660 + v4l2_err(&vout->vid_dev->v4l2_dev, 1661 + "failed to change mode in streamoff\n"); 1663 1662 1664 1663 INIT_LIST_HEAD(&vout->dma_queue); 1665 1664 ret = videobuf_streamoff(&vout->vbq); ··· 1859 1858 vfd = vout->vfd = video_device_alloc(); 1860 1859 1861 1860 if (!vfd) { 1862 - printk(KERN_ERR VOUT_NAME ": could not allocate" 1863 - " video device struct\n"); 1861 + printk(KERN_ERR VOUT_NAME 1862 + ": could not allocate video device struct\n"); 1864 1863 v4l2_ctrl_handler_free(hdl); 1865 1864 return -ENOMEM; 1866 1865 } ··· 1985 1984 */ 1986 1985 vfd = vout->vfd; 1987 1986 if (video_register_device(vfd, VFL_TYPE_GRABBER, -1) < 0) { 1988 - dev_err(&pdev->dev, ": Could not register " 1989 - "Video for Linux device\n"); 1987 + dev_err(&pdev->dev, 1988 + ": Could not register Video for Linux device\n"); 1990 1989 vfd->minor = -1; 1991 1990 ret = -ENODEV; 1992 1991 goto error2; 1993 1992 } 1994 1993 video_set_drvdata(vfd, vout); 1995 1994 1996 - dev_info(&pdev->dev, ": registered and initialized" 1997 - " video device %d\n", vfd->minor); 1995 + dev_info(&pdev->dev, 1996 + ": registered and initialized video device %d\n", 1997 + vfd->minor); 1998 1998 if (k == (pdev->num_resources - 1)) 1999 1999 return 0; 2000 2000
+3 -2
drivers/media/platform/omap/omap_vout_vrfb.c
··· 139 139 (void *) &vout->vrfb_dma_tx, &vout->vrfb_dma_tx.dma_ch); 140 140 if (ret < 0) { 141 141 vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED; 142 - dev_info(&pdev->dev, ": failed to allocate DMA Channel for" 143 - " video%d\n", vfd->minor); 142 + dev_info(&pdev->dev, 143 + ": failed to allocate DMA Channel for video%d\n", 144 + vfd->minor); 144 145 } 145 146 init_waitqueue_head(&vout->vrfb_dma_tx.wait); 146 147