From 395eff951a9dc6d6d08d9afe27f2aa975bc23c39 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 18 Oct 2016 17:44:06 -0200 Subject: [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. 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 $_; } Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/saa7134/saa7134-dvb.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'drivers/media/pci/saa7134/saa7134-dvb.c') diff --git a/drivers/media/pci/saa7134/saa7134-dvb.c b/drivers/media/pci/saa7134/saa7134-dvb.c index 59a4b5f7724e..598b8bbfe726 100644 --- a/drivers/media/pci/saa7134/saa7134-dvb.c +++ b/drivers/media/pci/saa7134/saa7134-dvb.c @@ -1449,8 +1449,8 @@ static int dvb_init(struct saa7134_dev *dev) if (dvb_attach(tda826x_attach, fe0->dvb.frontend, 0x60, &dev->i2c_adap, 0) == NULL) { - pr_warn("%s: Medion Quadro, no tda826x " - "found !\n", __func__); + pr_warn("%s: Medion Quadro, no tda826x found !\n", + __func__); goto detach_frontend; } if (dev_id != 0x08) { @@ -1458,8 +1458,8 @@ static int dvb_init(struct saa7134_dev *dev) fe->ops.i2c_gate_ctrl(fe, 1); if (dvb_attach(isl6405_attach, fe, &dev->i2c_adap, 0x08, 0, 0) == NULL) { - pr_warn("%s: Medion Quadro, no ISL6405 " - "found !\n", __func__); + pr_warn("%s: Medion Quadro, no ISL6405 found !\n", + __func__); goto detach_frontend; } if (dev_id == 0x07) { @@ -1629,8 +1629,8 @@ static int dvb_init(struct saa7134_dev *dev) struct dvb_frontend *fe; if (dvb_attach(dvb_pll_attach, fe0->dvb.frontend, 0x60, &dev->i2c_adap, DVB_PLL_PHILIPS_SD1878_TDA8261) == NULL) { - pr_warn("%s: MD7134 DVB-S, no SD1878 " - "found !\n", __func__); + pr_warn("%s: MD7134 DVB-S, no SD1878 found !\n", + __func__); goto detach_frontend; } /* we need to open the i2c gate (we know it exists) */ @@ -1638,8 +1638,8 @@ static int dvb_init(struct saa7134_dev *dev) fe->ops.i2c_gate_ctrl(fe, 1); if (dvb_attach(isl6405_attach, fe, &dev->i2c_adap, 0x08, 0, 0) == NULL) { - pr_warn("%s: MD7134 DVB-S, no ISL6405 " - "found !\n", __func__); + pr_warn("%s: MD7134 DVB-S, no ISL6405 found !\n", + __func__); goto detach_frontend; } fe->ops.i2c_gate_ctrl(fe, 0); @@ -1670,14 +1670,14 @@ static int dvb_init(struct saa7134_dev *dev) if (dvb_attach(tda826x_attach, fe0->dvb.frontend, 0x60, &dev->i2c_adap, 0) == NULL) { - pr_warn("%s: Asus Tiger 3in1, no " - "tda826x found!\n", __func__); + pr_warn("%s: Asus Tiger 3in1, no tda826x found!\n", + __func__); goto detach_frontend; } if (dvb_attach(lnbp21_attach, fe0->dvb.frontend, &dev->i2c_adap, 0, 0) == NULL) { - pr_warn("%s: Asus Tiger 3in1, no lnbp21" - " found!\n", __func__); + pr_warn("%s: Asus Tiger 3in1, no lnbp21 found!\n", + __func__); goto detach_frontend; } } @@ -1695,14 +1695,14 @@ static int dvb_init(struct saa7134_dev *dev) if (dvb_attach(tda826x_attach, fe0->dvb.frontend, 0x60, &dev->i2c_adap, 0) == NULL) { - pr_warn("%s: Asus My Cinema PS3-100, no " - "tda826x found!\n", __func__); + pr_warn("%s: Asus My Cinema PS3-100, no tda826x found!\n", + __func__); goto detach_frontend; } if (dvb_attach(lnbp21_attach, fe0->dvb.frontend, &dev->i2c_adap, 0, 0) == NULL) { - pr_warn("%s: Asus My Cinema PS3-100, no lnbp21" - " found!\n", __func__); + pr_warn("%s: Asus My Cinema PS3-100, no lnbp21 found!\n", + __func__); goto detach_frontend; } } -- cgit v1.2.3