Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ca2e927 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] tuners: 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: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 25ec587c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -262,8 +262,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
		regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M;
		break;
	default:
		dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. "
			 "Using 6000 kHz.\n",
		dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. Using 6000 kHz.\n",
			 bandwidth);
		bandwidth = 6000;
		/* fallthrough */
@@ -435,9 +434,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
	if (err)
		return err;

	dev_dbg(&priv->i2c->dev, "Tuned to "
		"fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X "
		"vcocal=%02X(%u) bw=%u\n",
	dev_dbg(&priv->i2c->dev, "Tuned to fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X vcocal=%02X(%u) bw=%u\n",
		(unsigned int)regs[FC11_REG_FA],
		(unsigned int)regs[FC11_REG_FP],
		(unsigned int)regs[FC11_REG_XINHI],
+2 −2
Original line number Diff line number Diff line
@@ -349,8 +349,8 @@ struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe,
	id = MC44S803_REG_MS(reg, MC44S803_ID);

	if (id != 0x14) {
		mc_printk(KERN_ERR, "unsupported ID "
		       "(%x should be 0x14)\n", id);
		mc_printk(KERN_ERR, "unsupported ID (%x should be 0x14)\n",
			  id);
		goto error;
	}

+2 −2
Original line number Diff line number Diff line
@@ -251,8 +251,8 @@ static int __tda18271_write_regs(struct dvb_frontend *fe, int idx, int len,
	}

	if (ret != 1)
		tda_err("ERROR: idx = 0x%x, len = %d, "
			"i2c_transfer returned: %d\n", idx, max, ret);
		tda_err("ERROR: idx = 0x%x, len = %d, i2c_transfer returned: %d\n",
			idx, max, ret);

	return (ret == 1 ? 0 : ret);
}
+1 −2
Original line number Diff line number Diff line
@@ -26,8 +26,7 @@

int tda18271_debug;
module_param_named(debug, tda18271_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debug level "
		 "(info=1, map=2, reg=4, adv=8, cal=16 (or-able))");
MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4, adv=8, cal=16 (or-able))");

static int tda18271_cal_on_startup = -1;
module_param_named(cal, tda18271_cal_on_startup, int, 0644);
+1 −5
Original line number Diff line number Diff line
@@ -1024,11 +1024,7 @@ int tda18271_lookup_rf_band(struct dvb_frontend *fe, u32 *freq, u8 *rf_band)

	while ((map[i].rfmax * 1000) < *freq) {
		if (tda18271_debug & DBG_ADV)
			tda_map("(%d) rfmax = %d < freq = %d, "
				"rf1_def = %d, rf2_def = %d, rf3_def = %d, "
				"rf1 = %d, rf2 = %d, rf3 = %d, "
				"rf_a1 = %d, rf_a2 = %d, "
				"rf_b1 = %d, rf_b2 = %d\n",
			tda_map("(%d) rfmax = %d < freq = %d, rf1_def = %d, rf2_def = %d, rf3_def = %d, rf1 = %d, rf2 = %d, rf3 = %d, rf_a1 = %d, rf_a2 = %d, rf_b1 = %d, rf_b2 = %d\n",
				i, map[i].rfmax * 1000, *freq,
				map[i].rf1_def, map[i].rf2_def, map[i].rf3_def,
				map[i].rf1, map[i].rf2, map[i].rf3,
Loading