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

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

Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

+18 -36
+2 -2
drivers/media/platform/davinci/dm355_ccdc.c
··· 334 334 335 335 x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params)); 336 336 if (x) { 337 - dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying ccdc" 338 - "params, %d\n", x); 337 + dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying ccdcparams, %d\n", 338 + x); 339 339 return -EFAULT; 340 340 } 341 341
+2 -2
drivers/media/platform/davinci/dm644x_ccdc.c
··· 354 354 355 355 x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params)); 356 356 if (x) { 357 - dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying" 358 - "ccdc params, %d\n", x); 357 + dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copyingccdc params, %d\n", 358 + x); 359 359 return -EFAULT; 360 360 } 361 361
+5 -10
drivers/media/platform/davinci/vpbe.c
··· 705 705 "v4l2 sub device %s registered\n", 706 706 enc_info->module_name); 707 707 else { 708 - v4l2_err(&vpbe_dev->v4l2_dev, "encoder %s" 709 - " failed to register", 708 + v4l2_err(&vpbe_dev->v4l2_dev, "encoder %s failed to register", 710 709 enc_info->module_name); 711 710 ret = -ENODEV; 712 711 goto fail_kfree_encoders; 713 712 } 714 713 } else 715 - v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c encoders" 716 - " currently not supported"); 714 + v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c encoders currently not supported"); 717 715 } 718 716 /* Add amplifier subdevice for dm365 */ 719 717 if ((strcmp(vpbe_dev->cfg->module_name, "dm365-vpbe-display") == 0) && ··· 733 735 amp_info->module_name); 734 736 } else { 735 737 vpbe_dev->amp = NULL; 736 - v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c amplifiers" 737 - " currently not supported"); 738 + v4l2_warn(&vpbe_dev->v4l2_dev, "non-i2c amplifiers currently not supported"); 738 739 } 739 740 } else { 740 741 vpbe_dev->amp = NULL; ··· 832 835 if (!cfg->module_name[0] || 833 836 !cfg->osd.module_name[0] || 834 837 !cfg->venc.module_name[0]) { 835 - v4l2_err(pdev->dev.driver, "vpbe display module names not" 836 - " defined\n"); 838 + v4l2_err(pdev->dev.driver, "vpbe display module names not defined\n"); 837 839 return ret; 838 840 } 839 841 840 842 vpbe_dev = kzalloc(sizeof(*vpbe_dev), GFP_KERNEL); 841 843 if (vpbe_dev == NULL) { 842 - v4l2_err(pdev->dev.driver, "Unable to allocate memory" 843 - " for vpbe_device\n"); 844 + v4l2_err(pdev->dev.driver, "Unable to allocate memory for vpbe_device\n"); 844 845 return -ENOMEM; 845 846 } 846 847 vpbe_dev->cfg = cfg;
+2 -4
drivers/media/platform/davinci/vpfe_capture.c
··· 919 919 else 920 920 pixfmt->sizeimage = pixfmt->bytesperline * pixfmt->height; 921 921 922 - v4l2_info(&vpfe_dev->v4l2_dev, "adjusted width = %d, height =" 923 - " %d, bpp = %d, bytesperline = %d, sizeimage = %d\n", 922 + v4l2_info(&vpfe_dev->v4l2_dev, "adjusted width = %d, height = %d, bpp = %d, bytesperline = %d, sizeimage = %d\n", 924 923 pixfmt->width, pixfmt->height, vpfe_pix_fmt->bpp, 925 924 pixfmt->bytesperline, pixfmt->sizeimage); 926 925 return vpfe_pix_fmt; ··· 1087 1088 &subdev, 1088 1089 &index, 1089 1090 inp->index) < 0) { 1090 - v4l2_err(&vpfe_dev->v4l2_dev, "input information not found" 1091 - " for the subdev\n"); 1091 + v4l2_err(&vpfe_dev->v4l2_dev, "input information not found for the subdev\n"); 1092 1092 return -EINVAL; 1093 1093 } 1094 1094 sdinfo = &vpfe_dev->cfg->sub_devs[subdev];
+2 -7
drivers/media/platform/davinci/vpif_capture.c
··· 1152 1152 timings->bt.vfrontporch && 1153 1153 (timings->bt.vbackporch || 1154 1154 timings->bt.vsync))) { 1155 - vpif_dbg(2, debug, "Timings for width, height, " 1156 - "horizontal back porch, horizontal sync, " 1157 - "horizontal front porch, vertical back porch, " 1158 - "vertical sync and vertical back porch " 1159 - "must be defined\n"); 1155 + vpif_dbg(2, debug, "Timings for width, height, horizontal back porch, horizontal sync, horizontal front porch, vertical back porch, vertical sync and vertical back porch must be defined\n"); 1160 1156 return -EINVAL; 1161 1157 } 1162 1158 ··· 1177 1181 std_info->l11 = std_info->vsize - 1178 1182 (bt->il_vfrontporch - 1); 1179 1183 } else { 1180 - vpif_dbg(2, debug, "Required timing values for " 1181 - "interlaced BT format missing\n"); 1184 + vpif_dbg(2, debug, "Required timing values for interlaced BT format missing\n"); 1182 1185 return -EINVAL; 1183 1186 } 1184 1187 } else {
+2 -7
drivers/media/platform/davinci/vpif_display.c
··· 954 954 timings->bt.vfrontporch && 955 955 (timings->bt.vbackporch || 956 956 timings->bt.vsync))) { 957 - vpif_dbg(2, debug, "Timings for width, height, " 958 - "horizontal back porch, horizontal sync, " 959 - "horizontal front porch, vertical back porch, " 960 - "vertical sync and vertical back porch " 961 - "must be defined\n"); 957 + vpif_dbg(2, debug, "Timings for width, height, horizontal back porch, horizontal sync, horizontal front porch, vertical back porch, vertical sync and vertical back porch must be defined\n"); 962 958 return -EINVAL; 963 959 } 964 960 ··· 979 983 std_info->l11 = std_info->vsize - 980 984 (bt->il_vfrontporch - 1); 981 985 } else { 982 - vpif_dbg(2, debug, "Required timing values for " 983 - "interlaced BT format missing\n"); 986 + vpif_dbg(2, debug, "Required timing values for interlaced BT format missing\n"); 984 987 return -EINVAL; 985 988 } 986 989 } else {
+3 -4
drivers/media/platform/davinci/vpss.c
··· 261 261 shift = 6; 262 262 break; 263 263 default: 264 - printk(KERN_ERR "dm355_enable_clock:" 265 - " Invalid selector: %d\n", clock_sel); 264 + printk(KERN_ERR "dm355_enable_clock: Invalid selector: %d\n", 265 + clock_sel); 266 266 return -EINVAL; 267 267 } 268 268 ··· 421 421 else if (!strcmp(platform_name, "dm644x_vpss")) 422 422 oper_cfg.platform = DM644X; 423 423 else { 424 - dev_err(&pdev->dev, "vpss driver not supported on" 425 - " this platform\n"); 424 + dev_err(&pdev->dev, "vpss driver not supported on this platform\n"); 426 425 return -ENODEV; 427 426 } 428 427