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

[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
...@@ -262,8 +262,7 @@ static int fc0011_set_params(struct dvb_frontend *fe) ...@@ -262,8 +262,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M; regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M;
break; break;
default: default:
dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. " dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. Using 6000 kHz.\n",
"Using 6000 kHz.\n",
bandwidth); bandwidth);
bandwidth = 6000; bandwidth = 6000;
/* fallthrough */ /* fallthrough */
...@@ -435,9 +434,7 @@ static int fc0011_set_params(struct dvb_frontend *fe) ...@@ -435,9 +434,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
if (err) if (err)
return err; return err;
dev_dbg(&priv->i2c->dev, "Tuned to " dev_dbg(&priv->i2c->dev, "Tuned to fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X vcocal=%02X(%u) bw=%u\n",
"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_FA],
(unsigned int)regs[FC11_REG_FP], (unsigned int)regs[FC11_REG_FP],
(unsigned int)regs[FC11_REG_XINHI], (unsigned int)regs[FC11_REG_XINHI],
......
...@@ -349,8 +349,8 @@ struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe, ...@@ -349,8 +349,8 @@ struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe,
id = MC44S803_REG_MS(reg, MC44S803_ID); id = MC44S803_REG_MS(reg, MC44S803_ID);
if (id != 0x14) { if (id != 0x14) {
mc_printk(KERN_ERR, "unsupported ID " mc_printk(KERN_ERR, "unsupported ID (%x should be 0x14)\n",
"(%x should be 0x14)\n", id); id);
goto error; goto error;
} }
......
...@@ -251,8 +251,8 @@ static int __tda18271_write_regs(struct dvb_frontend *fe, int idx, int len, ...@@ -251,8 +251,8 @@ static int __tda18271_write_regs(struct dvb_frontend *fe, int idx, int len,
} }
if (ret != 1) if (ret != 1)
tda_err("ERROR: idx = 0x%x, len = %d, " tda_err("ERROR: idx = 0x%x, len = %d, i2c_transfer returned: %d\n",
"i2c_transfer returned: %d\n", idx, max, ret); idx, max, ret);
return (ret == 1 ? 0 : ret); return (ret == 1 ? 0 : ret);
} }
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
int tda18271_debug; int tda18271_debug;
module_param_named(debug, tda18271_debug, int, 0644); module_param_named(debug, tda18271_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debug level " MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4, adv=8, cal=16 (or-able))");
"(info=1, map=2, reg=4, adv=8, cal=16 (or-able))");
static int tda18271_cal_on_startup = -1; static int tda18271_cal_on_startup = -1;
module_param_named(cal, tda18271_cal_on_startup, int, 0644); module_param_named(cal, tda18271_cal_on_startup, int, 0644);
......
...@@ -1024,11 +1024,7 @@ int tda18271_lookup_rf_band(struct dvb_frontend *fe, u32 *freq, u8 *rf_band) ...@@ -1024,11 +1024,7 @@ int tda18271_lookup_rf_band(struct dvb_frontend *fe, u32 *freq, u8 *rf_band)
while ((map[i].rfmax * 1000) < *freq) { while ((map[i].rfmax * 1000) < *freq) {
if (tda18271_debug & DBG_ADV) if (tda18271_debug & DBG_ADV)
tda_map("(%d) rfmax = %d < freq = %d, " 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",
"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, i, map[i].rfmax * 1000, *freq,
map[i].rf1_def, map[i].rf2_def, map[i].rf3_def, map[i].rf1_def, map[i].rf2_def, map[i].rf3_def,
map[i].rf1, map[i].rf2, map[i].rf3, map[i].rf1, map[i].rf2, map[i].rf3,
......
...@@ -617,8 +617,8 @@ static int tda829x_find_tuner(struct dvb_frontend *fe) ...@@ -617,8 +617,8 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
if (tuner_addrs == 0) { if (tuner_addrs == 0) {
tuner_addrs = 0x60; tuner_addrs = 0x60;
tuner_info("could not clearly identify tuner address, " tuner_info("could not clearly identify tuner address, defaulting to %x\n",
"defaulting to %x\n", tuner_addrs); tuner_addrs);
} else { } else {
tuner_addrs = tuner_addrs & 0xff; tuner_addrs = tuner_addrs & 0xff;
tuner_info("setting tuner address to %x\n", tuner_addrs); tuner_info("setting tuner address to %x\n", tuner_addrs);
......
...@@ -274,13 +274,11 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) ...@@ -274,13 +274,11 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr)
} }
if ((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061)) { if ((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061)) {
printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x." printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x. It is not a TEA5761\n",
" It is not a TEA5761\n",
buffer[13], buffer[14], buffer[15]); buffer[13], buffer[14], buffer[15]);
return -EINVAL; return -EINVAL;
} }
printk(KERN_WARNING "tea5761: TEA%02x%02x detected. " printk(KERN_WARNING "tea5761: TEA%02x%02x detected. Manufacturer ID= 0x%02x\n",
"Manufacturer ID= 0x%02x\n",
buffer[14], buffer[15], buffer[13]); buffer[14], buffer[15], buffer[13]);
return 0; return 0;
......
...@@ -275,8 +275,7 @@ static int simple_config_lookup(struct dvb_frontend *fe, ...@@ -275,8 +275,7 @@ static int simple_config_lookup(struct dvb_frontend *fe,
*config = t_params->ranges[i].config; *config = t_params->ranges[i].config;
*cb = t_params->ranges[i].cb; *cb = t_params->ranges[i].cb;
tuner_dbg("freq = %d.%02d (%d), range = %d, " tuner_dbg("freq = %d.%02d (%d), range = %d, config = 0x%02x, cb = 0x%02x\n",
"config = 0x%02x, cb = 0x%02x\n",
*frequency / 16, *frequency % 16 * 100 / 16, *frequency, *frequency / 16, *frequency % 16 * 100 / 16, *frequency,
i, *config, *cb); i, *config, *cb);
...@@ -404,12 +403,12 @@ static int simple_std_setup(struct dvb_frontend *fe, ...@@ -404,12 +403,12 @@ static int simple_std_setup(struct dvb_frontend *fe,
i2c.addr = 0x0a; i2c.addr = 0x0a;
rc = tuner_i2c_xfer_send(&i2c, &buffer[0], 2); rc = tuner_i2c_xfer_send(&i2c, &buffer[0], 2);
if (2 != rc) if (2 != rc)
tuner_warn("i2c i/o error: rc == %d " tuner_warn("i2c i/o error: rc == %d (should be 2)\n",
"(should be 2)\n", rc); rc);
rc = tuner_i2c_xfer_send(&i2c, &buffer[2], 2); rc = tuner_i2c_xfer_send(&i2c, &buffer[2], 2);
if (2 != rc) if (2 != rc)
tuner_warn("i2c i/o error: rc == %d " tuner_warn("i2c i/o error: rc == %d (should be 2)\n",
"(should be 2)\n", rc); rc);
break; break;
} }
} }
...@@ -463,8 +462,8 @@ static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, ...@@ -463,8 +462,8 @@ static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer,
rc = tuner_i2c_xfer_recv(&priv->i2c_props, rc = tuner_i2c_xfer_recv(&priv->i2c_props,
&status_byte, 1); &status_byte, 1);
if (1 != rc) { if (1 != rc) {
tuner_warn("i2c i/o read error: rc == %d " tuner_warn("i2c i/o read error: rc == %d (should be 1)\n",
"(should be 1)\n", rc); rc);
break; break;
} }
if (status_byte & TUNER_PLL_LOCKED) if (status_byte & TUNER_PLL_LOCKED)
...@@ -483,8 +482,8 @@ static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, ...@@ -483,8 +482,8 @@ static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer,
rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4);
if (4 != rc) if (4 != rc)
tuner_warn("i2c i/o error: rc == %d " tuner_warn("i2c i/o error: rc == %d (should be 4)\n",
"(should be 4)\n", rc); rc);
break; break;
} }
} }
...@@ -499,8 +498,7 @@ static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer) ...@@ -499,8 +498,7 @@ static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer)
switch (priv->type) { switch (priv->type) {
case TUNER_TENA_9533_DI: case TUNER_TENA_9533_DI:
case TUNER_YMEC_TVF_5533MF: case TUNER_YMEC_TVF_5533MF:
tuner_dbg("This tuner doesn't have FM. " tuner_dbg("This tuner doesn't have FM. Most cards have a TEA5767 for FM\n");
"Most cards have a TEA5767 for FM\n");
return 0; return 0;
case TUNER_PHILIPS_FM1216ME_MK3: case TUNER_PHILIPS_FM1216ME_MK3:
case TUNER_PHILIPS_FM1236_MK3: case TUNER_PHILIPS_FM1236_MK3:
...@@ -586,8 +584,7 @@ static int simple_set_tv_freq(struct dvb_frontend *fe, ...@@ -586,8 +584,7 @@ static int simple_set_tv_freq(struct dvb_frontend *fe,
div = params->frequency + IFPCoff + offset; div = params->frequency + IFPCoff + offset;
tuner_dbg("Freq= %d.%02d MHz, V_IF=%d.%02d MHz, " tuner_dbg("Freq= %d.%02d MHz, V_IF=%d.%02d MHz, Offset=%d.%02d MHz, div=%0d\n",
"Offset=%d.%02d MHz, div=%0d\n",
params->frequency / 16, params->frequency % 16 * 100 / 16, params->frequency / 16, params->frequency % 16 * 100 / 16,
IFPCoff / 16, IFPCoff % 16 * 100 / 16, IFPCoff / 16, IFPCoff % 16 * 100 / 16,
offset / 16, offset % 16 * 100 / 16, div); offset / 16, offset % 16 * 100 / 16, div);
...@@ -858,8 +855,7 @@ static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf, ...@@ -858,8 +855,7 @@ static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
if (!tun->stepsize) { if (!tun->stepsize) {
/* tuner-core was loaded before the digital tuner was /* tuner-core was loaded before the digital tuner was
* configured and somehow picked the wrong tuner type */ * configured and somehow picked the wrong tuner type */
tuner_err("attempt to treat tuner %d (%s) as digital tuner " tuner_err("attempt to treat tuner %d (%s) as digital tuner without stepsize defined.\n",
"without stepsize defined.\n",
priv->type, priv->tun->name); priv->type, priv->tun->name);
return 0; /* failure */ return 0; /* failure */
} }
...@@ -1077,8 +1073,7 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, ...@@ -1077,8 +1073,7 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.i2c_gate_ctrl(fe, 1);
if (1 != i2c_transfer(i2c_adap, &msg, 1)) if (1 != i2c_transfer(i2c_adap, &msg, 1))
printk(KERN_WARNING "tuner-simple %d-%04x: " printk(KERN_WARNING "tuner-simple %d-%04x: unable to probe %s, proceeding anyway.",
"unable to probe %s, proceeding anyway.",
i2c_adapter_id(i2c_adap), i2c_addr, i2c_adapter_id(i2c_adap), i2c_addr,
tuners[type].name); tuners[type].name);
...@@ -1123,18 +1118,16 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, ...@@ -1123,18 +1118,16 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
if ((debug) || ((atv_input[priv->nr] > 0) || if ((debug) || ((atv_input[priv->nr] > 0) ||
(dtv_input[priv->nr] > 0))) { (dtv_input[priv->nr] > 0))) {
if (0 == atv_input[priv->nr]) if (0 == atv_input[priv->nr])
tuner_info("tuner %d atv rf input will be " tuner_info("tuner %d atv rf input will be autoselected\n",
"autoselected\n", priv->nr); priv->nr);
else else
tuner_info("tuner %d atv rf input will be " tuner_info("tuner %d atv rf input will be set to input %d (insmod option)\n",
"set to input %d (insmod option)\n",
priv->nr, atv_input[priv->nr]); priv->nr, atv_input[priv->nr]);
if (0 == dtv_input[priv->nr]) if (0 == dtv_input[priv->nr])
tuner_info("tuner %d dtv rf input will be " tuner_info("tuner %d dtv rf input will be autoselected\n",
"autoselected\n", priv->nr); priv->nr);
else else
tuner_info("tuner %d dtv rf input will be " tuner_info("tuner %d dtv rf input will be set to input %d (insmod option)\n",
"set to input %d (insmod option)\n",
priv->nr, dtv_input[priv->nr]); priv->nr, dtv_input[priv->nr]);
} }
......
...@@ -43,14 +43,11 @@ MODULE_PARM_DESC(debug, "Debugging level (0 to 2, default: 0 (off))."); ...@@ -43,14 +43,11 @@ MODULE_PARM_DESC(debug, "Debugging level (0 to 2, default: 0 (off)).");
static int no_poweroff; static int no_poweroff;
module_param(no_poweroff, int, 0644); module_param(no_poweroff, int, 0644);
MODULE_PARM_DESC(no_poweroff, "Power management (1: disabled, 2: enabled, " MODULE_PARM_DESC(no_poweroff, "Power management (1: disabled, 2: enabled, 0 (default): use device-specific default mode).");
"0 (default): use device-specific default mode).");
static int audio_std; static int audio_std;
module_param(audio_std, int, 0644); module_param(audio_std, int, 0644);
MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly " MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly needs to know what audio standard is needed for some video standards with audio A2 or NICAM. The valid settings are a sum of:\n"
"needs to know what audio standard is needed for some video standards "
"with audio A2 or NICAM. The valid settings are a sum of:\n"
" 1: use NICAM/B or A2/B instead of NICAM/A or A2/A\n" " 1: use NICAM/B or A2/B instead of NICAM/A or A2/A\n"
" 2: use A2 instead of NICAM or BTSC\n" " 2: use A2 instead of NICAM or BTSC\n"
" 4: use SECAM/K3 instead of K1\n" " 4: use SECAM/K3 instead of K1\n"
...@@ -60,8 +57,7 @@ MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly " ...@@ -60,8 +57,7 @@ MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly "
static char firmware_name[30]; static char firmware_name[30];
module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0); module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0);
MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the " MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the default firmware name.");
"default firmware name.");
static DEFINE_MUTEX(xc4000_list_mutex); static DEFINE_MUTEX(xc4000_list_mutex);
static LIST_HEAD(hybrid_tuner_instance_list); static LIST_HEAD(hybrid_tuner_instance_list);
...@@ -290,8 +286,7 @@ static int xc4000_tuner_reset(struct dvb_frontend *fe) ...@@ -290,8 +286,7 @@ static int xc4000_tuner_reset(struct dvb_frontend *fe)
return -EREMOTEIO; return -EREMOTEIO;
} }
} else { } else {
printk(KERN_ERR "xc4000: no tuner reset callback function, " printk(KERN_ERR "xc4000: no tuner reset callback function, fatal\n");
"fatal\n");
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
...@@ -679,8 +674,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type, ...@@ -679,8 +674,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
if (best_nr_diffs > 0U) { if (best_nr_diffs > 0U) {
printk(KERN_WARNING printk(KERN_WARNING
"Selecting best matching firmware (%u bits differ) for " "Selecting best matching firmware (%u bits differ) for type=(%x), id %016llx:\n",
"type=(%x), id %016llx:\n",
best_nr_diffs, type, (unsigned long long)*id); best_nr_diffs, type, (unsigned long long)*id);
i = best_i; i = best_i;
} }
...@@ -800,8 +794,7 @@ static int xc4000_fwupload(struct dvb_frontend *fe) ...@@ -800,8 +794,7 @@ static int xc4000_fwupload(struct dvb_frontend *fe)
n++; n++;
if (n >= n_array) { if (n >= n_array) {
printk(KERN_ERR "More firmware images in file than " printk(KERN_ERR "More firmware images in file than were expected!\n");
"were expected!\n");
goto corrupt; goto corrupt;
} }
...@@ -1055,8 +1048,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type, ...@@ -1055,8 +1048,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
goto fail; goto fail;
} }
dprintk(1, "Device is Xceive %d version %d.%d, " dprintk(1, "Device is Xceive %d version %d.%d, firmware version %d.%d\n",
"firmware version %d.%d\n",
hwmodel, hw_major, hw_minor, fw_major, fw_minor); hwmodel, hw_major, hw_minor, fw_major, fw_minor);
/* Check firmware version against what we downloaded. */ /* Check firmware version against what we downloaded. */
...@@ -1076,8 +1068,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type, ...@@ -1076,8 +1068,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
} else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel || } else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel ||
priv->hwvers != ((hw_major << 8) | hw_minor)) { priv->hwvers != ((hw_major << 8) | hw_minor)) {
printk(KERN_WARNING printk(KERN_WARNING
"Read invalid device hardware information - tuner " "Read invalid device hardware information - tuner hung?\n");
"hung?\n");
goto fail; goto fail;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment