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

[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>

+32 -43
+6 -9
drivers/media/pci/cx88/cx88-alsa.c
··· 120 120 MODULE_LICENSE("GPL"); 121 121 MODULE_VERSION(CX88_VERSION); 122 122 123 - MODULE_SUPPORTED_DEVICE("{{Conexant,23881}," 124 - "{{Conexant,23882}," 125 - "{{Conexant,23883}"); 123 + MODULE_SUPPORTED_DEVICE("{{Conexant,23881},{{Conexant,23882},{{Conexant,23883}"); 126 124 static unsigned int debug; 127 125 module_param(debug,int,0644); 128 126 MODULE_PARM_DESC(debug,"enable debug messages"); ··· 152 154 cx_write(MO_AUDD_GPCNTRL, GP_COUNT_CONTROL_RESET); 153 155 atomic_set(&chip->count, 0); 154 156 155 - dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d " 156 - "byte buffer\n", buf->bpl, cx_read(audio_ch->cmds_start + 8)>>1, 157 + dprintk(1, "Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d byte buffer\n", 158 + buf->bpl, cx_read(audio_ch->cmds_start + 8)>>1, 157 159 chip->num_periods, buf->bpl * chip->num_periods); 158 160 159 161 /* Enables corresponding bits at AUD_INT_STAT */ ··· 423 425 int err; 424 426 425 427 if (!chip) { 426 - printk(KERN_ERR "BUG: cx88 can't find device struct." 427 - " Can't proceed with open\n"); 428 + printk(KERN_ERR "BUG: cx88 can't find device struct. Can't proceed with open\n"); 428 429 return -ENODEV; 429 430 } 430 431 ··· 911 914 /* print pci info */ 912 915 pci_read_config_byte(pci, PCI_LATENCY_TIMER, &pci_lat); 913 916 914 - dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, " 915 - "latency: %d, mmio: 0x%llx\n", core->name, devno, 917 + dprintk(1, "ALSA %s/%i: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n", 918 + core->name, devno, 916 919 pci_name(pci), pci->revision, pci->irq, 917 920 pci_lat, (unsigned long long)pci_resource_start(pci,0)); 918 921
+6 -8
drivers/media/pci/cx88/cx88-cards.c
··· 2847 2847 break; 2848 2848 } 2849 2849 2850 - info_printk(core, "Leadtek Winfast 2000XP Expert config: " 2851 - "tuner=%d, eeprom[0]=0x%02x\n", 2850 + info_printk(core, "Leadtek Winfast 2000XP Expert config: tuner=%d, eeprom[0]=0x%02x\n", 2852 2851 core->board.tuner_type, eeprom_data[0]); 2853 2852 } 2854 2853 ··· 3106 3107 msg.len = (i != 12 ? 5 : 2); 3107 3108 err = i2c_transfer(&core->i2c_adap, &msg, 1); 3108 3109 if (err != 1) { 3109 - warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d " 3110 - "failed (err = %d)!\n", i, err); 3110 + warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", 3111 + i, err); 3111 3112 return; 3112 3113 } 3113 3114 } ··· 3283 3284 "%s: version might help as well.\n", 3284 3285 core->name,core->name,core->name,core->name); 3285 3286 } 3286 - err_printk(core, "Here is a list of valid choices for the card=<n> " 3287 - "insmod option:\n"); 3287 + err_printk(core, "Here is a list of valid choices for the card=<n> insmod option:\n"); 3288 3288 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++) 3289 3289 printk(KERN_ERR "%s: card=%d -> %s\n", 3290 3290 core->name, i, cx88_boards[i].name); ··· 3508 3510 for (i = 0; i < ARRAY_SIZE(buffer); i++) 3509 3511 if (2 != i2c_master_send(&core->i2c_client, 3510 3512 buffer[i],2)) 3511 - warn_printk(core, "Unable to enable " 3512 - "tuner(%i).\n", i); 3513 + warn_printk(core, "Unable to enable tuner(%i).\n", 3514 + i); 3513 3515 } 3514 3516 break; 3515 3517 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
+6 -6
drivers/media/pci/cx88/cx88-dsp.c
··· 186 186 dual = freq_magnitude(x, N, dual_freq); 187 187 noise = noise_magnitude(x, N, FREQ_NOISE_START, FREQ_NOISE_END); 188 188 189 - dprintk(1, "detect a2/a2m/eiaj: carrier=%d, stereo=%d, dual=%d, " 190 - "noise=%d\n", carrier, stereo, dual, noise); 189 + dprintk(1, "detect a2/a2m/eiaj: carrier=%d, stereo=%d, dual=%d, noise=%d\n", 190 + carrier, stereo, dual, noise); 191 191 192 192 if (stereo > dual) 193 193 ret = V4L2_TUNER_SUB_STEREO; ··· 222 222 s32 sap = freq_magnitude(x, N, FREQ_BTSC_SAP); 223 223 s32 dual_ref = freq_magnitude(x, N, FREQ_BTSC_DUAL_REF); 224 224 s32 dual = freq_magnitude(x, N, FREQ_BTSC_DUAL); 225 - dprintk(1, "detect btsc: dual_ref=%d, dual=%d, sap_ref=%d, sap=%d" 226 - "\n", dual_ref, dual, sap_ref, sap); 225 + dprintk(1, "detect btsc: dual_ref=%d, dual=%d, sap_ref=%d, sap=%d\n", 226 + dual_ref, dual, sap_ref, sap); 227 227 /* FIXME: Currently not supported */ 228 228 return UNSET; 229 229 } ··· 241 241 u32 current_address = cx_read(srch->ptr1_reg); 242 242 u32 offset = (current_address - srch->fifo_start + bpl); 243 243 244 - dprintk(1, "read RDS samples: current_address=%08x (offset=%08x), " 245 - "sample_count=%d, aud_intstat=%08x\n", current_address, 244 + dprintk(1, "read RDS samples: current_address=%08x (offset=%08x), sample_count=%d, aud_intstat=%08x\n", 245 + current_address, 246 246 current_address - srch->fifo_start, sample_count, 247 247 cx_read(MO_AUD_INTSTAT)); 248 248
+2 -4
drivers/media/pci/cx88/cx88-dvb.c
··· 625 625 return -EINVAL; 626 626 627 627 if (!fe0->dvb.frontend) { 628 - printk(KERN_ERR "%s/2: dvb frontend not attached. " 629 - "Can't attach xc3028\n", 628 + printk(KERN_ERR "%s/2: dvb frontend not attached. Can't attach xc3028\n", 630 629 dev->core->name); 631 630 return -EINVAL; 632 631 } ··· 664 665 return -EINVAL; 665 666 666 667 if (!fe0->dvb.frontend) { 667 - printk(KERN_ERR "%s/2: dvb frontend not attached. " 668 - "Can't attach xc4000\n", 668 + printk(KERN_ERR "%s/2: dvb frontend not attached. Can't attach xc4000\n", 669 669 dev->core->name); 670 670 return -EINVAL; 671 671 }
+1 -2
drivers/media/pci/cx88/cx88-i2c.c
··· 45 45 46 46 static unsigned int i2c_udelay = 5; 47 47 module_param(i2c_udelay, int, 0644); 48 - MODULE_PARM_DESC(i2c_udelay,"i2c delay at insmod time, in usecs " 49 - "(should be 5 or higher). Lower value means higher bus speed."); 48 + MODULE_PARM_DESC(i2c_udelay, "i2c delay at insmod time, in usecs (should be 5 or higher). Lower value means higher bus speed."); 50 49 51 50 #define dprintk(level,fmt, arg...) if (i2c_debug >= level) \ 52 51 printk(KERN_DEBUG "%s: " fmt, core->name , ## arg)
+7 -8
drivers/media/pci/cx88/cx88-mpeg.c
··· 401 401 402 402 dev->pci_rev = dev->pci->revision; 403 403 pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER, &dev->pci_lat); 404 - printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, " 405 - "latency: %d, mmio: 0x%llx\n", dev->core->name, 404 + printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n", 405 + dev->core->name, 406 406 pci_name(dev->pci), dev->pci_rev, dev->pci->irq, 407 407 dev->pci_lat,(unsigned long long)pci_resource_start(dev->pci,0)); 408 408 ··· 690 690 list_del(&d->drvlist); 691 691 kfree(d); 692 692 } else 693 - printk(KERN_ERR "%s/2: cx8802 driver remove " 694 - "failed (%d)\n", dev->core->name, err); 693 + printk(KERN_ERR "%s/2: cx8802 driver remove failed (%d)\n", 694 + dev->core->name, err); 695 695 } 696 696 697 697 mutex_unlock(&dev->core->lock); ··· 768 768 struct cx8802_driver *drv, *tmp; 769 769 int err; 770 770 771 - printk(KERN_WARNING "%s/2: Trying to remove cx8802 driver " 772 - "while cx8802 sub-drivers still loaded?!\n", 771 + printk(KERN_WARNING "%s/2: Trying to remove cx8802 driver while cx8802 sub-drivers still loaded?!\n", 773 772 dev->core->name); 774 773 775 774 list_for_each_entry_safe(drv, tmp, &dev->drvlist, drvlist) { ··· 776 777 if (err == 0) { 777 778 list_del(&drv->drvlist); 778 779 } else 779 - printk(KERN_ERR "%s/2: cx8802 driver remove " 780 - "failed (%d)\n", dev->core->name, err); 780 + printk(KERN_ERR "%s/2: cx8802 driver remove failed (%d)\n", 781 + dev->core->name, err); 781 782 kfree(drv); 782 783 } 783 784 }
+2 -4
drivers/media/pci/cx88/cx88-tvaudio.c
··· 62 62 63 63 static unsigned int radio_deemphasis; 64 64 module_param(radio_deemphasis,int,0644); 65 - MODULE_PARM_DESC(radio_deemphasis, "Radio deemphasis time constant, " 66 - "0=None, 1=50us (elsewhere), 2=75us (USA)"); 65 + MODULE_PARM_DESC(radio_deemphasis, "Radio deemphasis time constant, 0=None, 1=50us (elsewhere), 2=75us (USA)"); 67 66 68 67 #define dprintk(fmt, arg...) if (audio_debug) \ 69 68 printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg) ··· 975 976 } 976 977 977 978 if (UNSET != ctl) { 978 - dprintk("cx88_set_stereo: mask 0x%x, ctl 0x%x " 979 - "[status=0x%x,ctl=0x%x,vol=0x%x]\n", 979 + dprintk("cx88_set_stereo: mask 0x%x, ctl 0x%x [status=0x%x,ctl=0x%x,vol=0x%x]\n", 980 980 mask, ctl, cx_read(AUD_STATUS), 981 981 cx_read(AUD_CTL), cx_sread(SHADOW_AUD_VOL_CTL)); 982 982 cx_andor(AUD_CTL, mask, ctl);
+2 -2
drivers/media/pci/cx88/cx88-video.c
··· 1307 1307 /* print pci info */ 1308 1308 dev->pci_rev = pci_dev->revision; 1309 1309 pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat); 1310 - printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, " 1311 - "latency: %d, mmio: 0x%llx\n", core->name, 1310 + printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n", 1311 + core->name, 1312 1312 pci_name(pci_dev), dev->pci_rev, pci_dev->irq, 1313 1313 dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); 1314 1314