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

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

+40 -68
+1 -2
drivers/media/rc/ati_remote.c
··· 527 527 remote_num = (data[3] >> 4) & 0x0f; 528 528 if (channel_mask & (1 << (remote_num + 1))) { 529 529 dbginfo(&ati_remote->interface->dev, 530 - "Masked input from channel 0x%02x: data %02x, " 531 - "mask= 0x%02lx\n", 530 + "Masked input from channel 0x%02x: data %02x, mask= 0x%02lx\n", 532 531 remote_num, data[2], channel_mask); 533 532 return; 534 533 }
+1 -2
drivers/media/rc/ene_ir.c
··· 1210 1210 1211 1211 MODULE_DEVICE_TABLE(pnp, ene_ids); 1212 1212 MODULE_DESCRIPTION 1213 - ("Infrared input driver for KB3926B/C/D/E/F " 1214 - "(aka ENE0100/ENE0200/ENE0201/ENE0202) CIR port"); 1213 + ("Infrared input driver for KB3926B/C/D/E/F (aka ENE0100/ENE0200/ENE0201/ENE0202) CIR port"); 1215 1214 1216 1215 MODULE_AUTHOR("Maxim Levitsky"); 1217 1216 MODULE_LICENSE("GPL");
+19 -29
drivers/media/rc/imon.c
··· 441 441 /* lcd, vfd, vga or none? should be auto-detected, but can be overridden... */ 442 442 static int display_type; 443 443 module_param(display_type, int, S_IRUGO); 444 - MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, " 445 - "1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect)"); 444 + MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, 1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect)"); 446 445 447 446 static int pad_stabilize = 1; 448 447 module_param(pad_stabilize, int, S_IRUGO | S_IWUSR); 449 - MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD " 450 - "presses in arrow key mode. 0=disable, 1=enable (default)."); 448 + MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD presses in arrow key mode. 0=disable, 1=enable (default)."); 451 449 452 450 /* 453 451 * In certain use cases, mouse mode isn't really helpful, and could actually ··· 453 455 */ 454 456 static bool nomouse; 455 457 module_param(nomouse, bool, S_IRUGO | S_IWUSR); 456 - MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is " 457 - "open. 0=don't disable, 1=disable. (default: don't disable)"); 458 + MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is open. 0=don't disable, 1=disable. (default: don't disable)"); 458 459 459 460 /* threshold at which a pad push registers as an arrow key in kbd mode */ 460 461 static int pad_thresh; 461 462 module_param(pad_thresh, int, S_IRUGO | S_IWUSR); 462 - MODULE_PARM_DESC(pad_thresh, "Threshold at which a pad push registers as an " 463 - "arrow key in kbd mode (default: 28)"); 463 + MODULE_PARM_DESC(pad_thresh, "Threshold at which a pad push registers as an arrow key in kbd mode (default: 28)"); 464 464 465 465 466 466 static void free_imon_context(struct imon_context *ictx) ··· 781 785 else 782 786 strcpy(buf, "closed\n"); 783 787 784 - dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for " 785 - "instructions on how to associate your iMON 2.4G DT/LT " 786 - "remote\n"); 788 + dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for instructions on how to associate your iMON 2.4G DT/LT remote\n"); 787 789 mutex_unlock(&ictx->lock); 788 790 return strlen(buf); 789 791 } ··· 1109 1115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; 1110 1116 1111 1117 if (*rc_type && !(*rc_type & rc->allowed_protocols)) 1112 - dev_warn(dev, "Looks like you're trying to use an IR protocol " 1113 - "this device does not support\n"); 1118 + dev_warn(dev, "Looks like you're trying to use an IR protocol this device does not support\n"); 1114 1119 1115 1120 if (*rc_type & RC_BIT_RC6_MCE) { 1116 1121 dev_dbg(dev, "Configuring IR receiver for MCE protocol\n"); ··· 1122 1129 /* ir_proto_packet[0] = 0x00; // already the default */ 1123 1130 *rc_type = RC_BIT_OTHER; 1124 1131 } else { 1125 - dev_warn(dev, "Unsupported IR protocol specified, overriding " 1126 - "to iMON IR protocol\n"); 1132 + dev_warn(dev, "Unsupported IR protocol specified, overriding to iMON IR protocol\n"); 1127 1133 if (!pad_stabilize) 1128 1134 dev_dbg(dev, "PAD stabilize functionality disabled\n"); 1129 1135 /* ir_proto_packet[0] = 0x00; // already the default */ ··· 1711 1719 1712 1720 not_input_data: 1713 1721 if (len != 8) { 1714 - dev_warn(dev, "imon %s: invalid incoming packet " 1715 - "size (len = %d, intf%d)\n", __func__, len, intf); 1722 + dev_warn(dev, "imon %s: invalid incoming packet size (len = %d, intf%d)\n", 1723 + __func__, len, intf); 1716 1724 return; 1717 1725 } 1718 1726 ··· 1868 1876 allowed_protos = RC_BIT_RC6_MCE; 1869 1877 break; 1870 1878 default: 1871 - dev_info(ictx->dev, "Unknown 0xffdc device, " 1872 - "defaulting to VFD and iMON IR"); 1879 + dev_info(ictx->dev, "Unknown 0xffdc device, defaulting to VFD and iMON IR"); 1873 1880 detected_display_type = IMON_DISPLAY_TYPE_VFD; 1874 1881 /* We don't know which one it is, allow user to set the 1875 1882 * RC6 one from userspace if OTHER wasn't correct. */ ··· 1925 1934 ictx->display_supported = false; 1926 1935 else 1927 1936 ictx->display_supported = true; 1928 - dev_info(ictx->dev, "%s: overriding display type to %d via " 1929 - "modparam\n", __func__, display_type); 1937 + dev_info(ictx->dev, "%s: overriding display type to %d via modparam\n", 1938 + __func__, display_type); 1930 1939 } 1931 1940 1932 1941 ictx->display_type = configured_display_type; ··· 2147 2156 if (!display_ep_found) { 2148 2157 tx_control = true; 2149 2158 display_ep_found = true; 2150 - dev_dbg(ictx->dev, "%s: device uses control endpoint, not " 2151 - "interface OUT endpoint\n", __func__); 2159 + dev_dbg(ictx->dev, "%s: device uses control endpoint, not interface OUT endpoint\n", 2160 + __func__); 2152 2161 } 2153 2162 2154 2163 /* ··· 2357 2366 /* set up sysfs entry for built-in clock */ 2358 2367 ret = sysfs_create_group(&intf->dev.kobj, &imon_display_attr_group); 2359 2368 if (ret) 2360 - dev_err(ictx->dev, "Could not create display sysfs " 2361 - "entries(%d)", ret); 2369 + dev_err(ictx->dev, "Could not create display sysfs entries(%d)", 2370 + ret); 2362 2371 2363 2372 if (ictx->display_type == IMON_DISPLAY_TYPE_LCD) 2364 2373 ret = usb_register_dev(intf, &imon_lcd_class); ··· 2366 2375 ret = usb_register_dev(intf, &imon_vfd_class); 2367 2376 if (ret) 2368 2377 /* Not a fatal error, so ignore */ 2369 - dev_info(ictx->dev, "could not get a minor number for " 2370 - "display\n"); 2378 + dev_info(ictx->dev, "could not get a minor number for display\n"); 2371 2379 2372 2380 } 2373 2381 ··· 2446 2456 mutex_unlock(&ictx->lock); 2447 2457 } 2448 2458 2449 - dev_info(dev, "iMON device (%04x:%04x, intf%d) on " 2450 - "usb<%d:%d> initialized\n", vendor, product, ifnum, 2459 + dev_info(dev, "iMON device (%04x:%04x, intf%d) on usb<%d:%d> initialized\n", 2460 + vendor, product, ifnum, 2451 2461 usbdev->bus->busnum, usbdev->devnum); 2452 2462 2453 2463 mutex_unlock(&driver_lock);
+3 -6
drivers/media/rc/ite-cir.c
··· 55 55 /* low limit for RX carrier freq, Hz, 0 for no RX demodulation */ 56 56 static int rx_low_carrier_freq; 57 57 module_param(rx_low_carrier_freq, int, S_IRUGO | S_IWUSR); 58 - MODULE_PARM_DESC(rx_low_carrier_freq, "Override low RX carrier frequency, Hz, " 59 - "0 for no RX demodulation"); 58 + MODULE_PARM_DESC(rx_low_carrier_freq, "Override low RX carrier frequency, Hz, 0 for no RX demodulation"); 60 59 61 60 /* high limit for RX carrier freq, Hz, 0 for no RX demodulation */ 62 61 static int rx_high_carrier_freq; 63 62 module_param(rx_high_carrier_freq, int, S_IRUGO | S_IWUSR); 64 - MODULE_PARM_DESC(rx_high_carrier_freq, "Override high RX carrier frequency, " 65 - "Hz, 0 for no RX demodulation"); 63 + MODULE_PARM_DESC(rx_high_carrier_freq, "Override high RX carrier frequency, Hz, 0 for no RX demodulation"); 66 64 67 65 /* override tx carrier frequency */ 68 66 static int tx_carrier_freq; ··· 1482 1484 1483 1485 if (model_number >= 0 && model_number < ARRAY_SIZE(ite_dev_descs)) { 1484 1486 model_no = model_number; 1485 - ite_pr(KERN_NOTICE, "The model has been fixed by a module " 1486 - "parameter."); 1487 + ite_pr(KERN_NOTICE, "The model has been fixed by a module parameter."); 1487 1488 } 1488 1489 1489 1490 ite_pr(KERN_NOTICE, "Using model: %s\n", ite_dev_descs[model_no].model);
+1 -3
drivers/media/rc/mceusb.c
··· 604 604 break; 605 605 case MCE_RSP_EQWAKEVERSION: 606 606 if (!out) 607 - dev_dbg(dev, "Wake version, proto: 0x%02x, " 608 - "payload: 0x%02x, address: 0x%02x, " 609 - "version: 0x%02x", 607 + dev_dbg(dev, "Wake version, proto: 0x%02x, payload: 0x%02x, address: 0x%02x, version: 0x%02x", 610 608 data1, data2, data3, data4); 611 609 break; 612 610 case MCE_RSP_GETPORTSTATUS:
+1 -2
drivers/media/rc/rc-main.c
··· 660 660 dev->last_toggle = toggle; 661 661 dev->last_keycode = keycode; 662 662 663 - IR_dprintk(1, "%s: key down event, " 664 - "key 0x%04x, protocol 0x%04x, scancode 0x%08x\n", 663 + IR_dprintk(1, "%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n", 665 664 dev->input_name, keycode, protocol, scancode); 666 665 input_report_key(dev->input_dev, keycode, 1); 667 666
+6 -12
drivers/media/rc/redrat3.c
··· 265 265 266 266 /* Codes 0x20 through 0x2f are IR Firmware Errors */ 267 267 case 0x20: 268 - pr_cont("Initial signal pulse not long enough " 269 - "to measure carrier frequency\n"); 268 + pr_cont("Initial signal pulse not long enough to measure carrier frequency\n"); 270 269 break; 271 270 case 0x21: 272 271 pr_cont("Not enough length values allocated for signal\n"); ··· 277 278 pr_cont("Too many signal repeats\n"); 278 279 break; 279 280 case 0x28: 280 - pr_cont("Insufficient memory available for IR signal " 281 - "data memory allocation\n"); 281 + pr_cont("Insufficient memory available for IR signal data memory allocation\n"); 282 282 break; 283 283 case 0x29: 284 - pr_cont("Insufficient memory available " 285 - "for IrDa signal data memory allocation\n"); 284 + pr_cont("Insufficient memory available for IrDa signal data memory allocation\n"); 286 285 break; 287 286 288 287 /* Codes 0x30 through 0x3f are USB Firmware Errors */ 289 288 case 0x30: 290 - pr_cont("Insufficient memory available for bulk " 291 - "transfer structure\n"); 289 + pr_cont("Insufficient memory available for bulk transfer structure\n"); 292 290 break; 293 291 294 292 /* ··· 297 301 pr_cont("Signal capture has been terminated\n"); 298 302 break; 299 303 case 0x41: 300 - pr_cont("Attempt to set/get and unknown signal I/O " 301 - "algorithm parameter\n"); 304 + pr_cont("Attempt to set/get and unknown signal I/O algorithm parameter\n"); 302 305 break; 303 306 case 0x42: 304 307 pr_cont("Signal capture already started\n"); ··· 912 917 goto out; 913 918 } 914 919 915 - snprintf(rr3->name, sizeof(rr3->name), "RedRat3%s " 916 - "Infrared Remote Transceiver (%04x:%04x)", 920 + snprintf(rr3->name, sizeof(rr3->name), "RedRat3%s Infrared Remote Transceiver (%04x:%04x)", 917 921 prod == USB_RR3IIUSB_PRODUCT_ID ? "-II" : "", 918 922 le16_to_cpu(rr3->udev->descriptor.idVendor), prod); 919 923
+5 -6
drivers/media/rc/streamzap.c
··· 297 297 goto out; 298 298 } 299 299 300 - snprintf(sz->name, sizeof(sz->name), "Streamzap PC Remote Infrared " 301 - "Receiver (%04x:%04x)", 300 + snprintf(sz->name, sizeof(sz->name), "Streamzap PC Remote Infrared Receiver (%04x:%04x)", 302 301 le16_to_cpu(sz->usbdev->descriptor.idVendor), 303 302 le16_to_cpu(sz->usbdev->descriptor.idProduct)); 304 303 usb_make_path(sz->usbdev, sz->phys, sizeof(sz->phys)); ··· 363 364 364 365 sz->endpoint = &(iface_host->endpoint[0].desc); 365 366 if (!usb_endpoint_dir_in(sz->endpoint)) { 366 - dev_err(&intf->dev, "%s: endpoint doesn't match input device " 367 - "02%02x\n", __func__, sz->endpoint->bEndpointAddress); 367 + dev_err(&intf->dev, "%s: endpoint doesn't match input device 02%02x\n", 368 + __func__, sz->endpoint->bEndpointAddress); 368 369 retval = -ENODEV; 369 370 goto free_sz; 370 371 } 371 372 372 373 if (!usb_endpoint_xfer_int(sz->endpoint)) { 373 - dev_err(&intf->dev, "%s: endpoint attributes don't match xfer " 374 - "02%02x\n", __func__, sz->endpoint->bmAttributes); 374 + dev_err(&intf->dev, "%s: endpoint attributes don't match xfer 02%02x\n", 375 + __func__, sz->endpoint->bmAttributes); 375 376 retval = -ENODEV; 376 377 goto free_sz; 377 378 }
+3 -6
drivers/media/rc/winbond-cir.c
··· 227 227 228 228 static enum wbcir_protocol protocol = IR_PROTOCOL_RC6; 229 229 module_param(protocol, uint, 0444); 230 - MODULE_PARM_DESC(protocol, "IR protocol to use for the power-on command " 231 - "(0 = RC5, 1 = NEC, 2 = RC6A, default)"); 230 + MODULE_PARM_DESC(protocol, "IR protocol to use for the power-on command (0 = RC5, 1 = NEC, 2 = RC6A, default)"); 232 231 233 232 static bool invert; /* default = 0 */ 234 233 module_param(invert, bool, 0444); ··· 243 244 244 245 static unsigned int wake_rc6mode = 6; 245 246 module_param(wake_rc6mode, uint, 0644); 246 - MODULE_PARM_DESC(wake_rc6mode, "RC6 mode for the power-on command " 247 - "(0 = 0, 6 = 6A, default)"); 247 + MODULE_PARM_DESC(wake_rc6mode, "RC6 mode for the power-on command (0 = 0, 6 = 6A, default)"); 248 248 249 249 250 250 ··· 1048 1050 goto exit_free_data; 1049 1051 } 1050 1052 1051 - dev_dbg(&device->dev, "Found device " 1052 - "(w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n", 1053 + dev_dbg(&device->dev, "Found device (w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n", 1053 1054 data->wbase, data->ebase, data->sbase, data->irq); 1054 1055 1055 1056 data->led.name = "cir::activity";