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

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

+43 -52
+1 -2
drivers/media/pci/saa7134/saa7134-alsa.c
··· 813 813 int amux, err; 814 814 815 815 if (!saa7134) { 816 - pr_err("BUG: saa7134 can't find device struct." 817 - " Can't proceed with open\n"); 816 + pr_err("BUG: saa7134 can't find device struct. Can't proceed with open\n"); 818 817 return -ENODEV; 819 818 } 820 819 dev = saa7134->dev;
+4 -4
drivers/media/pci/saa7134/saa7134-cards.c
··· 7341 7341 case 67659: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA aud) */ 7342 7342 break; 7343 7343 default: 7344 - pr_warn("%s: warning: " 7345 - "unknown hauppauge model #%d\n", dev->name, tv.model); 7344 + pr_warn("%s: warning: unknown hauppauge model #%d\n", 7345 + dev->name, tv.model); 7346 7346 break; 7347 7347 } 7348 7348 ··· 7920 7920 msg.addr = 0x0b; 7921 7921 msg.len = 1; 7922 7922 if (1 != i2c_transfer(&dev->i2c_adap, &msg, 1)) { 7923 - pr_warn("%s: send wake up byte to pic16C505" 7924 - "(IR chip) failed\n", dev->name); 7923 + pr_warn("%s: send wake up byte to pic16C505(IR chip) failed\n", 7924 + dev->name); 7925 7925 } else { 7926 7926 msg.flags = I2C_M_RD; 7927 7927 rc = i2c_transfer(&dev->i2c_adap, &msg, 1);
+17 -22
drivers/media/pci/saa7134/saa7134-core.c
··· 66 66 67 67 int saa7134_no_overlay=-1; 68 68 module_param_named(no_overlay, saa7134_no_overlay, int, 0444); 69 - MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)" 70 - " [some VIA/SIS chipsets are known to have problem with overlay]"); 69 + MODULE_PARM_DESC(no_overlay, "allow override overlay default (0 disables, 1 enables) [some VIA/SIS chipsets are known to have problem with overlay]"); 71 70 72 71 bool saa7134_userptr; 73 72 module_param(saa7134_userptr, bool, 0644); ··· 618 619 print_irqstatus(dev,loop,report,status); 619 620 if (report & SAA7134_IRQ_REPORT_PE) { 620 621 /* disable all parity error */ 621 - pr_warn("%s/irq: looping -- " 622 - "clearing PE (parity error!) enable bit\n",dev->name); 622 + pr_warn("%s/irq: looping -- clearing PE (parity error!) enable bit\n", 623 + dev->name); 623 624 saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE); 624 625 } else if (report & SAA7134_IRQ_REPORT_GPIO16) { 625 626 /* disable gpio16 IRQ */ 626 - pr_warn("%s/irq: looping -- " 627 - "clearing GPIO16 enable bit\n",dev->name); 627 + pr_warn("%s/irq: looping -- clearing GPIO16 enable bit\n", 628 + dev->name); 628 629 saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_P); 629 630 saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO16_N); 630 631 } else if (report & SAA7134_IRQ_REPORT_GPIO18) { 631 632 /* disable gpio18 IRQs */ 632 - pr_warn("%s/irq: looping -- " 633 - "clearing GPIO18 enable bit\n",dev->name); 633 + pr_warn("%s/irq: looping -- clearing GPIO18 enable bit\n", 634 + dev->name); 634 635 saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_P); 635 636 saa_clearl(SAA7134_IRQ2, SAA7134_IRQ2_INTE_GPIO18_N); 636 637 } else { 637 638 /* disable all irqs */ 638 - pr_warn("%s/irq: looping -- " 639 - "clearing all enable bits\n",dev->name); 639 + pr_warn("%s/irq: looping -- clearing all enable bits\n", 640 + dev->name); 640 641 saa_writel(SAA7134_IRQ1,0); 641 642 saa_writel(SAA7134_IRQ2,0); 642 643 } ··· 1080 1081 } 1081 1082 #endif 1082 1083 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) { 1083 - pr_info("%s: quirk: this driver and your " 1084 - "chipset may not work together" 1085 - " in overlay mode.\n",dev->name); 1084 + pr_info("%s: quirk: this driver and your chipset may not work together in overlay mode.\n", 1085 + dev->name); 1086 1086 if (!saa7134_no_overlay) { 1087 - pr_info("%s: quirk: overlay " 1088 - "mode will be disabled.\n", 1087 + pr_info("%s: quirk: overlay mode will be disabled.\n", 1089 1088 dev->name); 1090 1089 saa7134_no_overlay = 1; 1091 1090 } else { 1092 - pr_info("%s: quirk: overlay " 1093 - "mode will be forced. Use this" 1094 - " option at your own risk.\n", 1091 + pr_info("%s: quirk: overlay mode will be forced. Use this option at your own risk.\n", 1095 1092 dev->name); 1096 1093 } 1097 1094 } ··· 1101 1106 /* print pci info */ 1102 1107 dev->pci_rev = pci_dev->revision; 1103 1108 pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat); 1104 - pr_info("%s: found at %s, rev: %d, irq: %d, " 1105 - "latency: %d, mmio: 0x%llx\n", dev->name, 1106 - pci_name(pci_dev), dev->pci_rev, pci_dev->irq, 1107 - dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); 1109 + pr_info("%s: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n", 1110 + dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq, 1111 + dev->pci_lat, 1112 + (unsigned long long)pci_resource_start(pci_dev, 0)); 1108 1113 pci_set_master(pci_dev); 1109 1114 err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)); 1110 1115 if (err) {
+16 -16
drivers/media/pci/saa7134/saa7134-dvb.c
··· 1449 1449 1450 1450 if (dvb_attach(tda826x_attach, fe0->dvb.frontend, 1451 1451 0x60, &dev->i2c_adap, 0) == NULL) { 1452 - pr_warn("%s: Medion Quadro, no tda826x " 1453 - "found !\n", __func__); 1452 + pr_warn("%s: Medion Quadro, no tda826x found !\n", 1453 + __func__); 1454 1454 goto detach_frontend; 1455 1455 } 1456 1456 if (dev_id != 0x08) { ··· 1458 1458 fe->ops.i2c_gate_ctrl(fe, 1); 1459 1459 if (dvb_attach(isl6405_attach, fe, 1460 1460 &dev->i2c_adap, 0x08, 0, 0) == NULL) { 1461 - pr_warn("%s: Medion Quadro, no ISL6405 " 1462 - "found !\n", __func__); 1461 + pr_warn("%s: Medion Quadro, no ISL6405 found !\n", 1462 + __func__); 1463 1463 goto detach_frontend; 1464 1464 } 1465 1465 if (dev_id == 0x07) { ··· 1629 1629 struct dvb_frontend *fe; 1630 1630 if (dvb_attach(dvb_pll_attach, fe0->dvb.frontend, 0x60, 1631 1631 &dev->i2c_adap, DVB_PLL_PHILIPS_SD1878_TDA8261) == NULL) { 1632 - pr_warn("%s: MD7134 DVB-S, no SD1878 " 1633 - "found !\n", __func__); 1632 + pr_warn("%s: MD7134 DVB-S, no SD1878 found !\n", 1633 + __func__); 1634 1634 goto detach_frontend; 1635 1635 } 1636 1636 /* we need to open the i2c gate (we know it exists) */ ··· 1638 1638 fe->ops.i2c_gate_ctrl(fe, 1); 1639 1639 if (dvb_attach(isl6405_attach, fe, 1640 1640 &dev->i2c_adap, 0x08, 0, 0) == NULL) { 1641 - pr_warn("%s: MD7134 DVB-S, no ISL6405 " 1642 - "found !\n", __func__); 1641 + pr_warn("%s: MD7134 DVB-S, no ISL6405 found !\n", 1642 + __func__); 1643 1643 goto detach_frontend; 1644 1644 } 1645 1645 fe->ops.i2c_gate_ctrl(fe, 0); ··· 1670 1670 if (dvb_attach(tda826x_attach, 1671 1671 fe0->dvb.frontend, 0x60, 1672 1672 &dev->i2c_adap, 0) == NULL) { 1673 - pr_warn("%s: Asus Tiger 3in1, no " 1674 - "tda826x found!\n", __func__); 1673 + pr_warn("%s: Asus Tiger 3in1, no tda826x found!\n", 1674 + __func__); 1675 1675 goto detach_frontend; 1676 1676 } 1677 1677 if (dvb_attach(lnbp21_attach, fe0->dvb.frontend, 1678 1678 &dev->i2c_adap, 0, 0) == NULL) { 1679 - pr_warn("%s: Asus Tiger 3in1, no lnbp21" 1680 - " found!\n", __func__); 1679 + pr_warn("%s: Asus Tiger 3in1, no lnbp21 found!\n", 1680 + __func__); 1681 1681 goto detach_frontend; 1682 1682 } 1683 1683 } ··· 1695 1695 if (dvb_attach(tda826x_attach, 1696 1696 fe0->dvb.frontend, 0x60, 1697 1697 &dev->i2c_adap, 0) == NULL) { 1698 - pr_warn("%s: Asus My Cinema PS3-100, no " 1699 - "tda826x found!\n", __func__); 1698 + pr_warn("%s: Asus My Cinema PS3-100, no tda826x found!\n", 1699 + __func__); 1700 1700 goto detach_frontend; 1701 1701 } 1702 1702 if (dvb_attach(lnbp21_attach, fe0->dvb.frontend, 1703 1703 &dev->i2c_adap, 0, 0) == NULL) { 1704 - pr_warn("%s: Asus My Cinema PS3-100, no lnbp21" 1705 - " found!\n", __func__); 1704 + pr_warn("%s: Asus My Cinema PS3-100, no lnbp21 found!\n", 1705 + __func__); 1706 1706 goto detach_frontend; 1707 1707 } 1708 1708 }
+5 -8
drivers/media/pci/saa7134/saa7134-input.c
··· 123 123 struct saa7134_dev *dev = ir->c->adapter->algo_data; 124 124 125 125 if (dev == NULL) { 126 - ir_dbg(ir, "get_key_flydvb_trio: " 127 - "ir->c->adapter->algo_data is NULL!\n"); 126 + ir_dbg(ir, "get_key_flydvb_trio: ir->c->adapter->algo_data is NULL!\n"); 128 127 return -EIO; 129 128 } 130 129 ··· 149 150 msleep(10); 150 151 continue; 151 152 } 152 - ir_dbg(ir, "send wake up byte to pic16C505 (IR chip)" 153 - "failed %dx\n", attempt); 153 + ir_dbg(ir, "send wake up byte to pic16C505 (IR chip)failed %dx\n", 154 + attempt); 154 155 return -EIO; 155 156 } 156 157 if (1 != i2c_master_recv(ir->c, &b, 1)) { ··· 173 174 /* <dev> is needed to access GPIO. Used by the saa_readl macro. */ 174 175 struct saa7134_dev *dev = ir->c->adapter->algo_data; 175 176 if (dev == NULL) { 176 - ir_dbg(ir, "get_key_msi_tvanywhere_plus: " 177 - "ir->c->adapter->algo_data is NULL!\n"); 177 + ir_dbg(ir, "get_key_msi_tvanywhere_plus: ir->c->adapter->algo_data is NULL!\n"); 178 178 return -EIO; 179 179 } 180 180 ··· 221 223 /* <dev> is needed to access GPIO. Used by the saa_readl macro. */ 222 224 struct saa7134_dev *dev = ir->c->adapter->algo_data; 223 225 if (dev == NULL) { 224 - ir_dbg(ir, "get_key_kworld_pc150u: " 225 - "ir->c->adapter->algo_data is NULL!\n"); 226 + ir_dbg(ir, "get_key_kworld_pc150u: ir->c->adapter->algo_data is NULL!\n"); 226 227 return -EIO; 227 228 } 228 229