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

[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: Mauro Carvalho Chehab <mchehab@s-opensource.com>

+39 -65
+2 -5
drivers/media/tuners/fc0011.c
··· 262 262 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M; 263 263 break; 264 264 default: 265 - dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. " 266 - "Using 6000 kHz.\n", 265 + dev_warn(&priv->i2c->dev, "Unsupported bandwidth %u kHz. Using 6000 kHz.\n", 267 266 bandwidth); 268 267 bandwidth = 6000; 269 268 /* fallthrough */ ··· 434 435 if (err) 435 436 return err; 436 437 437 - dev_dbg(&priv->i2c->dev, "Tuned to " 438 - "fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X " 439 - "vcocal=%02X(%u) bw=%u\n", 438 + dev_dbg(&priv->i2c->dev, "Tuned to fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X vcocal=%02X(%u) bw=%u\n", 440 439 (unsigned int)regs[FC11_REG_FA], 441 440 (unsigned int)regs[FC11_REG_FP], 442 441 (unsigned int)regs[FC11_REG_XINHI],
+2 -2
drivers/media/tuners/mc44s803.c
··· 349 349 id = MC44S803_REG_MS(reg, MC44S803_ID); 350 350 351 351 if (id != 0x14) { 352 - mc_printk(KERN_ERR, "unsupported ID " 353 - "(%x should be 0x14)\n", id); 352 + mc_printk(KERN_ERR, "unsupported ID (%x should be 0x14)\n", 353 + id); 354 354 goto error; 355 355 } 356 356
+2 -2
drivers/media/tuners/tda18271-common.c
··· 251 251 } 252 252 253 253 if (ret != 1) 254 - tda_err("ERROR: idx = 0x%x, len = %d, " 255 - "i2c_transfer returned: %d\n", idx, max, ret); 254 + tda_err("ERROR: idx = 0x%x, len = %d, i2c_transfer returned: %d\n", 255 + idx, max, ret); 256 256 257 257 return (ret == 1 ? 0 : ret); 258 258 }
+1 -2
drivers/media/tuners/tda18271-fe.c
··· 26 26 27 27 int tda18271_debug; 28 28 module_param_named(debug, tda18271_debug, int, 0644); 29 - MODULE_PARM_DESC(debug, "set debug level " 30 - "(info=1, map=2, reg=4, adv=8, cal=16 (or-able))"); 29 + MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4, adv=8, cal=16 (or-able))"); 31 30 32 31 static int tda18271_cal_on_startup = -1; 33 32 module_param_named(cal, tda18271_cal_on_startup, int, 0644);
+1 -5
drivers/media/tuners/tda18271-maps.c
··· 1024 1024 1025 1025 while ((map[i].rfmax * 1000) < *freq) { 1026 1026 if (tda18271_debug & DBG_ADV) 1027 - tda_map("(%d) rfmax = %d < freq = %d, " 1028 - "rf1_def = %d, rf2_def = %d, rf3_def = %d, " 1029 - "rf1 = %d, rf2 = %d, rf3 = %d, " 1030 - "rf_a1 = %d, rf_a2 = %d, " 1031 - "rf_b1 = %d, rf_b2 = %d\n", 1027 + 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", 1032 1028 i, map[i].rfmax * 1000, *freq, 1033 1029 map[i].rf1_def, map[i].rf2_def, map[i].rf3_def, 1034 1030 map[i].rf1, map[i].rf2, map[i].rf3,
+2 -2
drivers/media/tuners/tda8290.c
··· 617 617 618 618 if (tuner_addrs == 0) { 619 619 tuner_addrs = 0x60; 620 - tuner_info("could not clearly identify tuner address, " 621 - "defaulting to %x\n", tuner_addrs); 620 + tuner_info("could not clearly identify tuner address, defaulting to %x\n", 621 + tuner_addrs); 622 622 } else { 623 623 tuner_addrs = tuner_addrs & 0xff; 624 624 tuner_info("setting tuner address to %x\n", tuner_addrs);
+2 -4
drivers/media/tuners/tea5761.c
··· 274 274 } 275 275 276 276 if ((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061)) { 277 - printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x." 278 - " It is not a TEA5761\n", 277 + printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x. It is not a TEA5761\n", 279 278 buffer[13], buffer[14], buffer[15]); 280 279 return -EINVAL; 281 280 } 282 - printk(KERN_WARNING "tea5761: TEA%02x%02x detected. " 283 - "Manufacturer ID= 0x%02x\n", 281 + printk(KERN_WARNING "tea5761: TEA%02x%02x detected. Manufacturer ID= 0x%02x\n", 284 282 buffer[14], buffer[15], buffer[13]); 285 283 286 284 return 0;
+19 -26
drivers/media/tuners/tuner-simple.c
··· 275 275 *config = t_params->ranges[i].config; 276 276 *cb = t_params->ranges[i].cb; 277 277 278 - tuner_dbg("freq = %d.%02d (%d), range = %d, " 279 - "config = 0x%02x, cb = 0x%02x\n", 278 + tuner_dbg("freq = %d.%02d (%d), range = %d, config = 0x%02x, cb = 0x%02x\n", 280 279 *frequency / 16, *frequency % 16 * 100 / 16, *frequency, 281 280 i, *config, *cb); 282 281 ··· 403 404 i2c.addr = 0x0a; 404 405 rc = tuner_i2c_xfer_send(&i2c, &buffer[0], 2); 405 406 if (2 != rc) 406 - tuner_warn("i2c i/o error: rc == %d " 407 - "(should be 2)\n", rc); 407 + tuner_warn("i2c i/o error: rc == %d (should be 2)\n", 408 + rc); 408 409 rc = tuner_i2c_xfer_send(&i2c, &buffer[2], 2); 409 410 if (2 != rc) 410 - tuner_warn("i2c i/o error: rc == %d " 411 - "(should be 2)\n", rc); 411 + tuner_warn("i2c i/o error: rc == %d (should be 2)\n", 412 + rc); 412 413 break; 413 414 } 414 415 } ··· 462 463 rc = tuner_i2c_xfer_recv(&priv->i2c_props, 463 464 &status_byte, 1); 464 465 if (1 != rc) { 465 - tuner_warn("i2c i/o read error: rc == %d " 466 - "(should be 1)\n", rc); 466 + tuner_warn("i2c i/o read error: rc == %d (should be 1)\n", 467 + rc); 467 468 break; 468 469 } 469 470 if (status_byte & TUNER_PLL_LOCKED) ··· 482 483 483 484 rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); 484 485 if (4 != rc) 485 - tuner_warn("i2c i/o error: rc == %d " 486 - "(should be 4)\n", rc); 486 + tuner_warn("i2c i/o error: rc == %d (should be 4)\n", 487 + rc); 487 488 break; 488 489 } 489 490 } ··· 498 499 switch (priv->type) { 499 500 case TUNER_TENA_9533_DI: 500 501 case TUNER_YMEC_TVF_5533MF: 501 - tuner_dbg("This tuner doesn't have FM. " 502 - "Most cards have a TEA5767 for FM\n"); 502 + tuner_dbg("This tuner doesn't have FM. Most cards have a TEA5767 for FM\n"); 503 503 return 0; 504 504 case TUNER_PHILIPS_FM1216ME_MK3: 505 505 case TUNER_PHILIPS_FM1236_MK3: ··· 584 586 585 587 div = params->frequency + IFPCoff + offset; 586 588 587 - tuner_dbg("Freq= %d.%02d MHz, V_IF=%d.%02d MHz, " 588 - "Offset=%d.%02d MHz, div=%0d\n", 589 + tuner_dbg("Freq= %d.%02d MHz, V_IF=%d.%02d MHz, Offset=%d.%02d MHz, div=%0d\n", 589 590 params->frequency / 16, params->frequency % 16 * 100 / 16, 590 591 IFPCoff / 16, IFPCoff % 16 * 100 / 16, 591 592 offset / 16, offset % 16 * 100 / 16, div); ··· 855 858 if (!tun->stepsize) { 856 859 /* tuner-core was loaded before the digital tuner was 857 860 * configured and somehow picked the wrong tuner type */ 858 - tuner_err("attempt to treat tuner %d (%s) as digital tuner " 859 - "without stepsize defined.\n", 861 + tuner_err("attempt to treat tuner %d (%s) as digital tuner without stepsize defined.\n", 860 862 priv->type, priv->tun->name); 861 863 return 0; /* failure */ 862 864 } ··· 1073 1077 fe->ops.i2c_gate_ctrl(fe, 1); 1074 1078 1075 1079 if (1 != i2c_transfer(i2c_adap, &msg, 1)) 1076 - printk(KERN_WARNING "tuner-simple %d-%04x: " 1077 - "unable to probe %s, proceeding anyway.", 1080 + printk(KERN_WARNING "tuner-simple %d-%04x: unable to probe %s, proceeding anyway.", 1078 1081 i2c_adapter_id(i2c_adap), i2c_addr, 1079 1082 tuners[type].name); 1080 1083 ··· 1118 1123 if ((debug) || ((atv_input[priv->nr] > 0) || 1119 1124 (dtv_input[priv->nr] > 0))) { 1120 1125 if (0 == atv_input[priv->nr]) 1121 - tuner_info("tuner %d atv rf input will be " 1122 - "autoselected\n", priv->nr); 1126 + tuner_info("tuner %d atv rf input will be autoselected\n", 1127 + priv->nr); 1123 1128 else 1124 - tuner_info("tuner %d atv rf input will be " 1125 - "set to input %d (insmod option)\n", 1129 + tuner_info("tuner %d atv rf input will be set to input %d (insmod option)\n", 1126 1130 priv->nr, atv_input[priv->nr]); 1127 1131 if (0 == dtv_input[priv->nr]) 1128 - tuner_info("tuner %d dtv rf input will be " 1129 - "autoselected\n", priv->nr); 1132 + tuner_info("tuner %d dtv rf input will be autoselected\n", 1133 + priv->nr); 1130 1134 else 1131 - tuner_info("tuner %d dtv rf input will be " 1132 - "set to input %d (insmod option)\n", 1135 + tuner_info("tuner %d dtv rf input will be set to input %d (insmod option)\n", 1133 1136 priv->nr, dtv_input[priv->nr]); 1134 1137 } 1135 1138
+8 -17
drivers/media/tuners/xc4000.c
··· 43 43 44 44 static int no_poweroff; 45 45 module_param(no_poweroff, int, 0644); 46 - MODULE_PARM_DESC(no_poweroff, "Power management (1: disabled, 2: enabled, " 47 - "0 (default): use device-specific default mode)."); 46 + MODULE_PARM_DESC(no_poweroff, "Power management (1: disabled, 2: enabled, 0 (default): use device-specific default mode)."); 48 47 49 48 static int audio_std; 50 49 module_param(audio_std, int, 0644); 51 - MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly " 52 - "needs to know what audio standard is needed for some video standards " 53 - "with audio A2 or NICAM. The valid settings are a sum of:\n" 50 + 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" 54 51 " 1: use NICAM/B or A2/B instead of NICAM/A or A2/A\n" 55 52 " 2: use A2 instead of NICAM or BTSC\n" 56 53 " 4: use SECAM/K3 instead of K1\n" ··· 57 60 58 61 static char firmware_name[30]; 59 62 module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0); 60 - MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the " 61 - "default firmware name."); 63 + MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the default firmware name."); 62 64 63 65 static DEFINE_MUTEX(xc4000_list_mutex); 64 66 static LIST_HEAD(hybrid_tuner_instance_list); ··· 286 290 return -EREMOTEIO; 287 291 } 288 292 } else { 289 - printk(KERN_ERR "xc4000: no tuner reset callback function, " 290 - "fatal\n"); 293 + printk(KERN_ERR "xc4000: no tuner reset callback function, fatal\n"); 291 294 return -EINVAL; 292 295 } 293 296 return 0; ··· 674 679 675 680 if (best_nr_diffs > 0U) { 676 681 printk(KERN_WARNING 677 - "Selecting best matching firmware (%u bits differ) for " 678 - "type=(%x), id %016llx:\n", 682 + "Selecting best matching firmware (%u bits differ) for type=(%x), id %016llx:\n", 679 683 best_nr_diffs, type, (unsigned long long)*id); 680 684 i = best_i; 681 685 } ··· 794 800 795 801 n++; 796 802 if (n >= n_array) { 797 - printk(KERN_ERR "More firmware images in file than " 798 - "were expected!\n"); 803 + printk(KERN_ERR "More firmware images in file than were expected!\n"); 799 804 goto corrupt; 800 805 } 801 806 ··· 1048 1055 goto fail; 1049 1056 } 1050 1057 1051 - dprintk(1, "Device is Xceive %d version %d.%d, " 1052 - "firmware version %d.%d\n", 1058 + dprintk(1, "Device is Xceive %d version %d.%d, firmware version %d.%d\n", 1053 1059 hwmodel, hw_major, hw_minor, fw_major, fw_minor); 1054 1060 1055 1061 /* Check firmware version against what we downloaded. */ ··· 1068 1076 } else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel || 1069 1077 priv->hwvers != ((hw_major << 8) | hw_minor)) { 1070 1078 printk(KERN_WARNING 1071 - "Read invalid device hardware information - tuner " 1072 - "hung?\n"); 1079 + "Read invalid device hardware information - tuner hung?\n"); 1073 1080 goto fail; 1074 1081 } 1075 1082