Commit 1ddc9f75 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] gspca: 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 c558d13c
...@@ -201,8 +201,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev, ...@@ -201,8 +201,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev,
buffer_len = le16_to_cpu(ep->wMaxPacketSize); buffer_len = le16_to_cpu(ep->wMaxPacketSize);
interval = ep->bInterval; interval = ep->bInterval;
PDEBUG(D_CONF, "found int in endpoint: 0x%x, " PDEBUG(D_CONF, "found int in endpoint: 0x%x, buffer_len=%u, interval=%u",
"buffer_len=%u, interval=%u",
ep->bEndpointAddress, buffer_len, interval); ep->bEndpointAddress, buffer_len, interval);
dev = gspca_dev->dev; dev = gspca_dev->dev;
......
...@@ -154,8 +154,8 @@ int m5602_read_sensor(struct sd *sd, const u8 address, ...@@ -154,8 +154,8 @@ int m5602_read_sensor(struct sd *sd, const u8 address,
err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i]));
PDEBUG(D_CONF, "Reading sensor register " PDEBUG(D_CONF, "Reading sensor register 0x%x containing 0x%x ",
"0x%x containing 0x%x ", address, *i2c_data); address, *i2c_data);
} }
return err; return err;
} }
...@@ -441,13 +441,10 @@ MODULE_DESCRIPTION(DRIVER_DESC); ...@@ -441,13 +441,10 @@ MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_param(force_sensor, int, S_IRUGO | S_IWUSR); module_param(force_sensor, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(force_sensor, MODULE_PARM_DESC(force_sensor,
"forces detection of a sensor, " "forces detection of a sensor, 1 = OV9650, 2 = S5K83A, 3 = S5K4AA, 4 = MT9M111, 5 = PO1030, 6 = OV7660");
"1 = OV9650, 2 = S5K83A, 3 = S5K4AA, "
"4 = MT9M111, 5 = PO1030, 6 = OV7660");
module_param(dump_bridge, bool, S_IRUGO | S_IWUSR); module_param(dump_bridge, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(dump_bridge, "Dumps all usb bridge registers at startup"); MODULE_PARM_DESC(dump_bridge, "Dumps all usb bridge registers at startup");
module_param(dump_sensor, bool, S_IRUGO | S_IWUSR); module_param(dump_sensor, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(dump_sensor, "Dumps all usb sensor registers " MODULE_PARM_DESC(dump_sensor, "Dumps all usb sensor registers at startup providing a sensor is found");
"at startup providing a sensor is found");
...@@ -72,8 +72,7 @@ ...@@ -72,8 +72,7 @@
#define MR97310A_MIN_CLOCKDIV_MAX 8 #define MR97310A_MIN_CLOCKDIV_MAX 8
#define MR97310A_MIN_CLOCKDIV_DEFAULT 3 #define MR97310A_MIN_CLOCKDIV_DEFAULT 3
MODULE_AUTHOR("Kyle Guinn <elyk03@gmail.com>," MODULE_AUTHOR("Kyle Guinn <elyk03@gmail.com>,Theodore Kilgore <kilgota@auburn.edu>");
"Theodore Kilgore <kilgota@auburn.edu>");
MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver"); MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -4326,8 +4326,7 @@ static void ov511_pkt_scan(struct gspca_dev *gspca_dev, ...@@ -4326,8 +4326,7 @@ static void ov511_pkt_scan(struct gspca_dev *gspca_dev,
/* Frame end */ /* Frame end */
if ((in[9] + 1) * 8 != gspca_dev->pixfmt.width || if ((in[9] + 1) * 8 != gspca_dev->pixfmt.width ||
(in[10] + 1) * 8 != gspca_dev->pixfmt.height) { (in[10] + 1) * 8 != gspca_dev->pixfmt.height) {
PERR("Invalid frame size, got: %dx%d," PERR("Invalid frame size, got: %dx%d, requested: %dx%d\n",
" requested: %dx%d\n",
(in[9] + 1) * 8, (in[10] + 1) * 8, (in[9] + 1) * 8, (in[10] + 1) * 8,
gspca_dev->pixfmt.width, gspca_dev->pixfmt.width,
gspca_dev->pixfmt.height); gspca_dev->pixfmt.height);
......
...@@ -179,8 +179,8 @@ static int sd_config(struct gspca_dev *gspca_dev, ...@@ -179,8 +179,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
} }
PDEBUG(D_PROBE, PDEBUG(D_PROBE,
"Pixart PAC207BCA Image Processor and Control Chip detected" "Pixart PAC207BCA Image Processor and Control Chip detected (vid/pid 0x%04X:0x%04X)",
" (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct); id->idVendor, id->idProduct);
cam = &gspca_dev->cam; cam = &gspca_dev->cam;
cam->cam_mode = sif_mode; cam->cam_mode = sif_mode;
......
...@@ -105,8 +105,7 @@ ...@@ -105,8 +105,7 @@
#define PAC7302_EXPOSURE_DEFAULT 66 /* 33 ms / 30 fps */ #define PAC7302_EXPOSURE_DEFAULT 66 /* 33 ms / 30 fps */
#define PAC7302_EXPOSURE_KNEE 133 /* 66 ms / 15 fps */ #define PAC7302_EXPOSURE_KNEE 133 /* 66 ms / 15 fps */
MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, " MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, Thomas Kaiser thomas@kaiser-linux.li");
"Thomas Kaiser thomas@kaiser-linux.li");
MODULE_DESCRIPTION("Pixart PAC7302"); MODULE_DESCRIPTION("Pixart PAC7302");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include <linux/dmi.h> #include <linux/dmi.h>
MODULE_AUTHOR("Brian Johnson <brijohn@gmail.com>, " MODULE_AUTHOR("Brian Johnson <brijohn@gmail.com>, microdia project <microdia@googlegroups.com>");
"microdia project <microdia@googlegroups.com>");
MODULE_DESCRIPTION("GSPCA/SN9C20X USB Camera Driver"); MODULE_DESCRIPTION("GSPCA/SN9C20X USB Camera Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -1948,8 +1947,7 @@ static int sd_isoc_init(struct gspca_dev *gspca_dev) ...@@ -1948,8 +1947,7 @@ static int sd_isoc_init(struct gspca_dev *gspca_dev)
intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface);
if (intf->num_altsetting != 9) { if (intf->num_altsetting != 9) {
pr_warn("sn9c20x camera with unknown number of alt " pr_warn("sn9c20x camera with unknown number of alt settings (%d), please report!\n",
"settings (%d), please report!\n",
intf->num_altsetting); intf->num_altsetting);
gspca_dev->alt = intf->num_altsetting; gspca_dev->alt = intf->num_altsetting;
return 0; return 0;
......
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include "gspca.h" #include "gspca.h"
MODULE_AUTHOR("Adam Baker <linux@baker-net.org.uk>, " MODULE_AUTHOR("Adam Baker <linux@baker-net.org.uk>, Theodore Kilgore <kilgota@auburn.edu>");
"Theodore Kilgore <kilgota@auburn.edu>");
MODULE_DESCRIPTION("GSPCA/SQ905 USB Camera Driver"); MODULE_DESCRIPTION("GSPCA/SQ905 USB Camera Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -210,8 +210,8 @@ static int sd_config(struct gspca_dev *gspca_dev, ...@@ -210,8 +210,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
int ret; int ret;
PDEBUG(D_PROBE, PDEBUG(D_PROBE,
"SQ9050 camera detected" "SQ9050 camera detected (vid/pid 0x%04X:0x%04X)",
" (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct); id->idVendor, id->idProduct);
ret = sq905c_command(gspca_dev, SQ905C_GET_ID, 0); ret = sq905c_command(gspca_dev, SQ905C_GET_ID, 0);
if (ret < 0) { if (ret < 0) {
......
...@@ -412,8 +412,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev, ...@@ -412,8 +412,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev,
len -= 4; len -= 4;
if (len < chunk_len) { if (len < chunk_len) {
PERR("URB packet length is smaller" PERR("URB packet length is smaller than the specified chunk length");
" than the specified chunk length");
gspca_dev->last_packet_type = DISCARD_PACKET; gspca_dev->last_packet_type = DISCARD_PACKET;
return; return;
} }
...@@ -455,8 +454,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev, ...@@ -455,8 +454,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev,
sd->to_skip = gspca_dev->pixfmt.width * 4; sd->to_skip = gspca_dev->pixfmt.width * 4;
if (chunk_len) if (chunk_len)
PERR("Chunk length is " PERR("Chunk length is non-zero on a SOF");
"non-zero on a SOF");
break; break;
case 0x8002: case 0x8002:
...@@ -469,8 +467,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev, ...@@ -469,8 +467,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev,
NULL, 0); NULL, 0);
if (chunk_len) if (chunk_len)
PERR("Chunk length is " PERR("Chunk length is non-zero on a EOF");
"non-zero on a EOF");
break; break;
case 0x0005: case 0x0005:
......
...@@ -368,8 +368,7 @@ static void spca504_read_info(struct gspca_dev *gspca_dev) ...@@ -368,8 +368,7 @@ static void spca504_read_info(struct gspca_dev *gspca_dev)
info[i] = gspca_dev->usb_buf[0]; info[i] = gspca_dev->usb_buf[0];
} }
PDEBUG(D_STREAM, PDEBUG(D_STREAM,
"Read info: %d %d %d %d %d %d." "Read info: %d %d %d %d %d %d. Should be 1,0,2,2,0,0",
" Should be 1,0,2,2,0,0",
info[0], info[1], info[2], info[0], info[1], info[2],
info[3], info[4], info[5]); info[3], info[4], info[5]);
} }
......
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include "gspca.h" #include "gspca.h"
MODULE_DESCRIPTION("Topro TP6800/6810 gspca webcam driver"); MODULE_DESCRIPTION("Topro TP6800/6810 gspca webcam driver");
MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, " MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, Anders Blomdell <anders.blomdell@control.lth.se>");
"Anders Blomdell <anders.blomdell@control.lth.se>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int force_sensor = -1; static int force_sensor = -1;
......
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include "gspca.h" #include "gspca.h"
#include "jpeg.h" #include "jpeg.h"
MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, " MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, Serge A. Suchkov <Serge.A.S@tochka.ru>");
"Serge A. Suchkov <Serge.A.S@tochka.ru>");
MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver"); MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
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