Commit 8720427c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] v4l2-core: 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 3a611875
...@@ -174,8 +174,7 @@ static void v4l_print_querycap(const void *arg, bool write_only) ...@@ -174,8 +174,7 @@ static void v4l_print_querycap(const void *arg, bool write_only)
{ {
const struct v4l2_capability *p = arg; const struct v4l2_capability *p = arg;
pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, " pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, capabilities=0x%08x, device_caps=0x%08x\n",
"capabilities=0x%08x, device_caps=0x%08x\n",
(int)sizeof(p->driver), p->driver, (int)sizeof(p->driver), p->driver,
(int)sizeof(p->card), p->card, (int)sizeof(p->card), p->card,
(int)sizeof(p->bus_info), p->bus_info, (int)sizeof(p->bus_info), p->bus_info,
...@@ -186,8 +185,7 @@ static void v4l_print_enuminput(const void *arg, bool write_only) ...@@ -186,8 +185,7 @@ static void v4l_print_enuminput(const void *arg, bool write_only)
{ {
const struct v4l2_input *p = arg; const struct v4l2_input *p = arg;
pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, " pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, std=0x%08Lx, status=0x%x, capabilities=0x%x\n",
"std=0x%08Lx, status=0x%x, capabilities=0x%x\n",
p->index, (int)sizeof(p->name), p->name, p->type, p->audioset, p->index, (int)sizeof(p->name), p->name, p->type, p->audioset,
p->tuner, (unsigned long long)p->std, p->status, p->tuner, (unsigned long long)p->std, p->status,
p->capabilities); p->capabilities);
...@@ -197,8 +195,7 @@ static void v4l_print_enumoutput(const void *arg, bool write_only) ...@@ -197,8 +195,7 @@ static void v4l_print_enumoutput(const void *arg, bool write_only)
{ {
const struct v4l2_output *p = arg; const struct v4l2_output *p = arg;
pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, " pr_cont("index=%u, name=%.*s, type=%u, audioset=0x%x, modulator=%u, std=0x%08Lx, capabilities=0x%x\n",
"modulator=%u, std=0x%08Lx, capabilities=0x%x\n",
p->index, (int)sizeof(p->name), p->name, p->type, p->audioset, p->index, (int)sizeof(p->name), p->name, p->type, p->audioset,
p->modulator, (unsigned long long)p->std, p->capabilities); p->modulator, (unsigned long long)p->std, p->capabilities);
} }
...@@ -256,11 +253,7 @@ static void v4l_print_format(const void *arg, bool write_only) ...@@ -256,11 +253,7 @@ static void v4l_print_format(const void *arg, bool write_only)
case V4L2_BUF_TYPE_VIDEO_CAPTURE: case V4L2_BUF_TYPE_VIDEO_CAPTURE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT: case V4L2_BUF_TYPE_VIDEO_OUTPUT:
pix = &p->fmt.pix; pix = &p->fmt.pix;
pr_cont(", width=%u, height=%u, " pr_cont(", width=%u, height=%u, pixelformat=%c%c%c%c, field=%s, bytesperline=%u, sizeimage=%u, colorspace=%d, flags=0x%x, ycbcr_enc=%u, quantization=%u, xfer_func=%u\n",
"pixelformat=%c%c%c%c, field=%s, "
"bytesperline=%u, sizeimage=%u, colorspace=%d, "
"flags=0x%x, ycbcr_enc=%u, quantization=%u, "
"xfer_func=%u\n",
pix->width, pix->height, pix->width, pix->height,
(pix->pixelformat & 0xff), (pix->pixelformat & 0xff),
(pix->pixelformat >> 8) & 0xff, (pix->pixelformat >> 8) & 0xff,
...@@ -274,10 +267,7 @@ static void v4l_print_format(const void *arg, bool write_only) ...@@ -274,10 +267,7 @@ static void v4l_print_format(const void *arg, bool write_only)
case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
mp = &p->fmt.pix_mp; mp = &p->fmt.pix_mp;
pr_cont(", width=%u, height=%u, " pr_cont(", width=%u, height=%u, format=%c%c%c%c, field=%s, colorspace=%d, num_planes=%u, flags=0x%x, ycbcr_enc=%u, quantization=%u, xfer_func=%u\n",
"format=%c%c%c%c, field=%s, "
"colorspace=%d, num_planes=%u, flags=0x%x, "
"ycbcr_enc=%u, quantization=%u, xfer_func=%u\n",
mp->width, mp->height, mp->width, mp->height,
(mp->pixelformat & 0xff), (mp->pixelformat & 0xff),
(mp->pixelformat >> 8) & 0xff, (mp->pixelformat >> 8) & 0xff,
...@@ -306,8 +296,7 @@ static void v4l_print_format(const void *arg, bool write_only) ...@@ -306,8 +296,7 @@ static void v4l_print_format(const void *arg, bool write_only)
case V4L2_BUF_TYPE_VBI_CAPTURE: case V4L2_BUF_TYPE_VBI_CAPTURE:
case V4L2_BUF_TYPE_VBI_OUTPUT: case V4L2_BUF_TYPE_VBI_OUTPUT:
vbi = &p->fmt.vbi; vbi = &p->fmt.vbi;
pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, " pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n",
"sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n",
vbi->sampling_rate, vbi->offset, vbi->sampling_rate, vbi->offset,
vbi->samples_per_line, vbi->samples_per_line,
(vbi->sample_format & 0xff), (vbi->sample_format & 0xff),
...@@ -343,9 +332,7 @@ static void v4l_print_framebuffer(const void *arg, bool write_only) ...@@ -343,9 +332,7 @@ static void v4l_print_framebuffer(const void *arg, bool write_only)
{ {
const struct v4l2_framebuffer *p = arg; const struct v4l2_framebuffer *p = arg;
pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, " pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, height=%u, pixelformat=%c%c%c%c, bytesperline=%u, sizeimage=%u, colorspace=%d\n",
"height=%u, pixelformat=%c%c%c%c, "
"bytesperline=%u, sizeimage=%u, colorspace=%d\n",
p->capability, p->flags, p->base, p->capability, p->flags, p->base,
p->fmt.width, p->fmt.height, p->fmt.width, p->fmt.height,
(p->fmt.pixelformat & 0xff), (p->fmt.pixelformat & 0xff),
...@@ -368,8 +355,7 @@ static void v4l_print_modulator(const void *arg, bool write_only) ...@@ -368,8 +355,7 @@ static void v4l_print_modulator(const void *arg, bool write_only)
if (write_only) if (write_only)
pr_cont("index=%u, txsubchans=0x%x\n", p->index, p->txsubchans); pr_cont("index=%u, txsubchans=0x%x\n", p->index, p->txsubchans);
else else
pr_cont("index=%u, name=%.*s, capability=0x%x, " pr_cont("index=%u, name=%.*s, capability=0x%x, rangelow=%u, rangehigh=%u, txsubchans=0x%x\n",
"rangelow=%u, rangehigh=%u, txsubchans=0x%x\n",
p->index, (int)sizeof(p->name), p->name, p->capability, p->index, (int)sizeof(p->name), p->name, p->capability,
p->rangelow, p->rangehigh, p->txsubchans); p->rangelow, p->rangehigh, p->txsubchans);
} }
...@@ -381,9 +367,7 @@ static void v4l_print_tuner(const void *arg, bool write_only) ...@@ -381,9 +367,7 @@ static void v4l_print_tuner(const void *arg, bool write_only)
if (write_only) if (write_only)
pr_cont("index=%u, audmode=%u\n", p->index, p->audmode); pr_cont("index=%u, audmode=%u\n", p->index, p->audmode);
else else
pr_cont("index=%u, name=%.*s, type=%u, capability=0x%x, " pr_cont("index=%u, name=%.*s, type=%u, capability=0x%x, rangelow=%u, rangehigh=%u, signal=%u, afc=%d, rxsubchans=0x%x, audmode=%u\n",
"rangelow=%u, rangehigh=%u, signal=%u, afc=%d, "
"rxsubchans=0x%x, audmode=%u\n",
p->index, (int)sizeof(p->name), p->name, p->type, p->index, (int)sizeof(p->name), p->name, p->type,
p->capability, p->rangelow, p->capability, p->rangelow,
p->rangehigh, p->signal, p->afc, p->rangehigh, p->signal, p->afc,
...@@ -402,8 +386,8 @@ static void v4l_print_standard(const void *arg, bool write_only) ...@@ -402,8 +386,8 @@ static void v4l_print_standard(const void *arg, bool write_only)
{ {
const struct v4l2_standard *p = arg; const struct v4l2_standard *p = arg;
pr_cont("index=%u, id=0x%Lx, name=%.*s, fps=%u/%u, " pr_cont("index=%u, id=0x%Lx, name=%.*s, fps=%u/%u, framelines=%u\n",
"framelines=%u\n", p->index, p->index,
(unsigned long long)p->id, (int)sizeof(p->name), p->name, (unsigned long long)p->id, (int)sizeof(p->name), p->name,
p->frameperiod.numerator, p->frameperiod.numerator,
p->frameperiod.denominator, p->frameperiod.denominator,
...@@ -419,8 +403,7 @@ static void v4l_print_hw_freq_seek(const void *arg, bool write_only) ...@@ -419,8 +403,7 @@ static void v4l_print_hw_freq_seek(const void *arg, bool write_only)
{ {
const struct v4l2_hw_freq_seek *p = arg; const struct v4l2_hw_freq_seek *p = arg;
pr_cont("tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u, " pr_cont("tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u, rangelow=%u, rangehigh=%u\n",
"rangelow=%u, rangehigh=%u\n",
p->tuner, p->type, p->seek_upward, p->wrap_around, p->spacing, p->tuner, p->type, p->seek_upward, p->wrap_around, p->spacing,
p->rangelow, p->rangehigh); p->rangelow, p->rangehigh);
} }
...@@ -442,8 +425,7 @@ static void v4l_print_buffer(const void *arg, bool write_only) ...@@ -442,8 +425,7 @@ static void v4l_print_buffer(const void *arg, bool write_only)
const struct v4l2_plane *plane; const struct v4l2_plane *plane;
int i; int i;
pr_cont("%02ld:%02d:%02d.%08ld index=%d, type=%s, " pr_cont("%02ld:%02d:%02d.%08ld index=%d, type=%s, flags=0x%08x, field=%s, sequence=%d, memory=%s",
"flags=0x%08x, field=%s, sequence=%d, memory=%s",
p->timestamp.tv_sec / 3600, p->timestamp.tv_sec / 3600,
(int)(p->timestamp.tv_sec / 60) % 60, (int)(p->timestamp.tv_sec / 60) % 60,
(int)(p->timestamp.tv_sec % 60), (int)(p->timestamp.tv_sec % 60),
...@@ -458,8 +440,7 @@ static void v4l_print_buffer(const void *arg, bool write_only) ...@@ -458,8 +440,7 @@ static void v4l_print_buffer(const void *arg, bool write_only)
for (i = 0; i < p->length; ++i) { for (i = 0; i < p->length; ++i) {
plane = &p->m.planes[i]; plane = &p->m.planes[i];
printk(KERN_DEBUG printk(KERN_DEBUG
"plane %d: bytesused=%d, data_offset=0x%08x, " "plane %d: bytesused=%d, data_offset=0x%08x, offset/userptr=0x%lx, length=%d\n",
"offset/userptr=0x%lx, length=%d\n",
i, plane->bytesused, plane->data_offset, i, plane->bytesused, plane->data_offset,
plane->m.userptr, plane->length); plane->m.userptr, plane->length);
} }
...@@ -468,8 +449,7 @@ static void v4l_print_buffer(const void *arg, bool write_only) ...@@ -468,8 +449,7 @@ static void v4l_print_buffer(const void *arg, bool write_only)
p->bytesused, p->m.userptr, p->length); p->bytesused, p->m.userptr, p->length);
} }
printk(KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, " printk(KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, flags=0x%08x, frames=%d, userbits=0x%08x\n",
"flags=0x%08x, frames=%d, userbits=0x%08x\n",
tc->hours, tc->minutes, tc->seconds, tc->hours, tc->minutes, tc->seconds,
tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits); tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits);
} }
...@@ -503,8 +483,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only) ...@@ -503,8 +483,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only)
p->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { p->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
const struct v4l2_captureparm *c = &p->parm.capture; const struct v4l2_captureparm *c = &p->parm.capture;
pr_cont(", capability=0x%x, capturemode=0x%x, timeperframe=%d/%d, " pr_cont(", capability=0x%x, capturemode=0x%x, timeperframe=%d/%d, extendedmode=%d, readbuffers=%d\n",
"extendedmode=%d, readbuffers=%d\n",
c->capability, c->capturemode, c->capability, c->capturemode,
c->timeperframe.numerator, c->timeperframe.denominator, c->timeperframe.numerator, c->timeperframe.denominator,
c->extendedmode, c->readbuffers); c->extendedmode, c->readbuffers);
...@@ -512,8 +491,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only) ...@@ -512,8 +491,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only)
p->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { p->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
const struct v4l2_outputparm *c = &p->parm.output; const struct v4l2_outputparm *c = &p->parm.output;
pr_cont(", capability=0x%x, outputmode=0x%x, timeperframe=%d/%d, " pr_cont(", capability=0x%x, outputmode=0x%x, timeperframe=%d/%d, extendedmode=%d, writebuffers=%d\n",
"extendedmode=%d, writebuffers=%d\n",
c->capability, c->outputmode, c->capability, c->outputmode,
c->timeperframe.numerator, c->timeperframe.denominator, c->timeperframe.numerator, c->timeperframe.denominator,
c->extendedmode, c->writebuffers); c->extendedmode, c->writebuffers);
...@@ -526,8 +504,7 @@ static void v4l_print_queryctrl(const void *arg, bool write_only) ...@@ -526,8 +504,7 @@ static void v4l_print_queryctrl(const void *arg, bool write_only)
{ {
const struct v4l2_queryctrl *p = arg; const struct v4l2_queryctrl *p = arg;
pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%d/%d, " pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%d/%d, step=%d, default=%d, flags=0x%08x\n",
"step=%d, default=%d, flags=0x%08x\n",
p->id, p->type, (int)sizeof(p->name), p->name, p->id, p->type, (int)sizeof(p->name), p->name,
p->minimum, p->maximum, p->minimum, p->maximum,
p->step, p->default_value, p->flags); p->step, p->default_value, p->flags);
...@@ -537,9 +514,7 @@ static void v4l_print_query_ext_ctrl(const void *arg, bool write_only) ...@@ -537,9 +514,7 @@ static void v4l_print_query_ext_ctrl(const void *arg, bool write_only)
{ {
const struct v4l2_query_ext_ctrl *p = arg; const struct v4l2_query_ext_ctrl *p = arg;
pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%lld/%lld, " pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%lld/%lld, step=%lld, default=%lld, flags=0x%08x, elem_size=%u, elems=%u, nr_of_dims=%u, dims=%u,%u,%u,%u\n",
"step=%lld, default=%lld, flags=0x%08x, elem_size=%u, elems=%u, "
"nr_of_dims=%u, dims=%u,%u,%u,%u\n",
p->id, p->type, (int)sizeof(p->name), p->name, p->id, p->type, (int)sizeof(p->name), p->name,
p->minimum, p->maximum, p->minimum, p->maximum,
p->step, p->default_value, p->flags, p->step, p->default_value, p->flags,
...@@ -583,9 +558,7 @@ static void v4l_print_cropcap(const void *arg, bool write_only) ...@@ -583,9 +558,7 @@ static void v4l_print_cropcap(const void *arg, bool write_only)
{ {
const struct v4l2_cropcap *p = arg; const struct v4l2_cropcap *p = arg;
pr_cont("type=%s, bounds wxh=%dx%d, x,y=%d,%d, " pr_cont("type=%s, bounds wxh=%dx%d, x,y=%d,%d, defrect wxh=%dx%d, x,y=%d,%d, pixelaspect %d/%d\n",
"defrect wxh=%dx%d, x,y=%d,%d, "
"pixelaspect %d/%d\n",
prt_names(p->type, v4l2_type_names), prt_names(p->type, v4l2_type_names),
p->bounds.width, p->bounds.height, p->bounds.width, p->bounds.height,
p->bounds.left, p->bounds.top, p->bounds.left, p->bounds.top,
...@@ -618,8 +591,7 @@ static void v4l_print_jpegcompression(const void *arg, bool write_only) ...@@ -618,8 +591,7 @@ static void v4l_print_jpegcompression(const void *arg, bool write_only)
{ {
const struct v4l2_jpegcompression *p = arg; const struct v4l2_jpegcompression *p = arg;
pr_cont("quality=%d, APPn=%d, APP_len=%d, " pr_cont("quality=%d, APPn=%d, APP_len=%d, COM_len=%d, jpeg_markers=0x%x\n",
"COM_len=%d, jpeg_markers=0x%x\n",
p->quality, p->APPn, p->APP_len, p->quality, p->APPn, p->APP_len,
p->COM_len, p->jpeg_markers); p->COM_len, p->jpeg_markers);
} }
...@@ -686,14 +658,7 @@ static void v4l_print_dv_timings(const void *arg, bool write_only) ...@@ -686,14 +658,7 @@ static void v4l_print_dv_timings(const void *arg, bool write_only)
switch (p->type) { switch (p->type) {
case V4L2_DV_BT_656_1120: case V4L2_DV_BT_656_1120:
pr_cont("type=bt-656/1120, interlaced=%u, " pr_cont("type=bt-656/1120, interlaced=%u, pixelclock=%llu, width=%u, height=%u, polarities=0x%x, hfrontporch=%u, hsync=%u, hbackporch=%u, vfrontporch=%u, vsync=%u, vbackporch=%u, il_vfrontporch=%u, il_vsync=%u, il_vbackporch=%u, standards=0x%x, flags=0x%x\n",
"pixelclock=%llu, "
"width=%u, height=%u, polarities=0x%x, "
"hfrontporch=%u, hsync=%u, "
"hbackporch=%u, vfrontporch=%u, "
"vsync=%u, vbackporch=%u, "
"il_vfrontporch=%u, il_vsync=%u, "
"il_vbackporch=%u, standards=0x%x, flags=0x%x\n",
p->bt.interlaced, p->bt.pixelclock, p->bt.interlaced, p->bt.pixelclock,
p->bt.width, p->bt.height, p->bt.width, p->bt.height,
p->bt.polarities, p->bt.hfrontporch, p->bt.polarities, p->bt.hfrontporch,
...@@ -723,8 +688,7 @@ static void v4l_print_dv_timings_cap(const void *arg, bool write_only) ...@@ -723,8 +688,7 @@ static void v4l_print_dv_timings_cap(const void *arg, bool write_only)
switch (p->type) { switch (p->type) {
case V4L2_DV_BT_656_1120: case V4L2_DV_BT_656_1120:
pr_cont("type=bt-656/1120, width=%u-%u, height=%u-%u, " pr_cont("type=bt-656/1120, width=%u-%u, height=%u-%u, pixelclock=%llu-%llu, standards=0x%x, capabilities=0x%x\n",
"pixelclock=%llu-%llu, standards=0x%x, capabilities=0x%x\n",
p->bt.min_width, p->bt.max_width, p->bt.min_width, p->bt.max_width,
p->bt.min_height, p->bt.max_height, p->bt.min_height, p->bt.max_height,
p->bt.min_pixelclock, p->bt.max_pixelclock, p->bt.min_pixelclock, p->bt.max_pixelclock,
...@@ -805,8 +769,7 @@ static void v4l_print_event(const void *arg, bool write_only) ...@@ -805,8 +769,7 @@ static void v4l_print_event(const void *arg, bool write_only)
const struct v4l2_event *p = arg; const struct v4l2_event *p = arg;
const struct v4l2_event_ctrl *c; const struct v4l2_event_ctrl *c;
pr_cont("type=0x%x, pending=%u, sequence=%u, id=%u, " pr_cont("type=0x%x, pending=%u, sequence=%u, id=%u, timestamp=%lu.%9.9lu\n",
"timestamp=%lu.%9.9lu\n",
p->type, p->pending, p->sequence, p->id, p->type, p->pending, p->sequence, p->id,
p->timestamp.tv_sec, p->timestamp.tv_nsec); p->timestamp.tv_sec, p->timestamp.tv_nsec);
switch (p->type) { switch (p->type) {
...@@ -822,8 +785,7 @@ static void v4l_print_event(const void *arg, bool write_only) ...@@ -822,8 +785,7 @@ static void v4l_print_event(const void *arg, bool write_only)
pr_cont("value64=%lld, ", c->value64); pr_cont("value64=%lld, ", c->value64);
else else
pr_cont("value=%d, ", c->value); pr_cont("value=%d, ", c->value);
pr_cont("flags=0x%x, minimum=%d, maximum=%d, step=%d, " pr_cont("flags=0x%x, minimum=%d, maximum=%d, step=%d, default_value=%d\n",
"default_value=%d\n",
c->flags, c->minimum, c->maximum, c->flags, c->minimum, c->maximum,
c->step, c->default_value); c->step, c->default_value);
break; break;
...@@ -859,8 +821,7 @@ static void v4l_print_freq_band(const void *arg, bool write_only) ...@@ -859,8 +821,7 @@ static void v4l_print_freq_band(const void *arg, bool write_only)
{ {
const struct v4l2_frequency_band *p = arg; const struct v4l2_frequency_band *p = arg;
pr_cont("tuner=%u, type=%u, index=%u, capability=0x%x, " pr_cont("tuner=%u, type=%u, index=%u, capability=0x%x, rangelow=%u, rangehigh=%u, modulation=0x%x\n",
"rangelow=%u, rangehigh=%u, modulation=0x%x\n",
p->tuner, p->type, p->index, p->tuner, p->type, p->index,
p->capability, p->rangelow, p->capability, p->rangelow,
p->rangehigh, p->modulation); p->rangehigh, p->modulation);
......
...@@ -572,8 +572,7 @@ int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b) ...@@ -572,8 +572,7 @@ int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b)
switch (b->memory) { switch (b->memory) {
case V4L2_MEMORY_MMAP: case V4L2_MEMORY_MMAP:
if (0 == buf->baddr) { if (0 == buf->baddr) {
dprintk(1, "qbuf: mmap requested " dprintk(1, "qbuf: mmap requested but buffer addr is zero!\n");
"but buffer addr is zero!\n");
goto done; goto done;
} }
if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT
......
...@@ -358,8 +358,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory, ...@@ -358,8 +358,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,
if (memory == VB2_MEMORY_MMAP) { if (memory == VB2_MEMORY_MMAP) {
ret = __vb2_buf_mem_alloc(vb); ret = __vb2_buf_mem_alloc(vb);
if (ret) { if (ret) {
dprintk(1, "failed allocating memory for " dprintk(1, "failed allocating memory for buffer %d\n",
"buffer %d\n", buffer); buffer);
q->bufs[vb->index] = NULL; q->bufs[vb->index] = NULL;
kfree(vb); kfree(vb);
break; break;
...@@ -372,8 +372,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory, ...@@ -372,8 +372,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,
*/ */
ret = call_vb_qop(vb, buf_init, vb); ret = call_vb_qop(vb, buf_init, vb);
if (ret) { if (ret) {
dprintk(1, "buffer %d %p initialization" dprintk(1, "buffer %d %p initialization failed\n",
" failed\n", buffer, vb); buffer, vb);
__vb2_buf_mem_free(vb); __vb2_buf_mem_free(vb);
q->bufs[vb->index] = NULL; q->bufs[vb->index] = NULL;
kfree(vb); kfree(vb);
...@@ -997,13 +997,12 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb) ...@@ -997,13 +997,12 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb)
&& vb->planes[plane].length == planes[plane].length) && vb->planes[plane].length == planes[plane].length)
continue; continue;
dprintk(3, "userspace address for plane %d changed, " dprintk(3, "userspace address for plane %d changed, reacquiring memory\n",
"reacquiring memory\n", plane); plane);
/* Check if the provided plane buffer is large enough */ /* Check if the provided plane buffer is large enough */
if (planes[plane].length < vb->planes[plane].min_length) { if (planes[plane].length < vb->planes[plane].min_length) {
dprintk(1, "provided buffer size %u is less than " dprintk(1, "provided buffer size %u is less than setup size %u for plane %d\n",
"setup size %u for plane %d\n",
planes[plane].length, planes[plane].length,
vb->planes[plane].min_length, vb->planes[plane].min_length,
plane); plane);
...@@ -1032,8 +1031,8 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb) ...@@ -1032,8 +1031,8 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb)
planes[plane].m.userptr, planes[plane].m.userptr,
planes[plane].length, dma_dir); planes[plane].length, dma_dir);
if (IS_ERR(mem_priv)) { if (IS_ERR(mem_priv)) {
dprintk(1, "failed acquiring userspace " dprintk(1, "failed acquiring userspace memory for plane %d\n",
"memory for plane %d\n", plane); plane);
ret = PTR_ERR(mem_priv); ret = PTR_ERR(mem_priv);
goto err; goto err;
} }
...@@ -1123,8 +1122,7 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const void *pb) ...@@ -1123,8 +1122,7 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const void *pb)
planes[plane].length = dbuf->size; planes[plane].length = dbuf->size;
if (planes[plane].length < vb->planes[plane].min_length) { if (planes[plane].length < vb->planes[plane].min_length) {
dprintk(1, "invalid dmabuf length %u for plane %d, " dprintk(1, "invalid dmabuf length %u for plane %d, minimum length %u\n",
"minimum length %u\n",
planes[plane].length, plane, planes[plane].length, plane,
vb->planes[plane].min_length); vb->planes[plane].min_length);
dma_buf_put(dbuf); dma_buf_put(dbuf);
...@@ -1472,8 +1470,7 @@ static int __vb2_wait_for_done_vb(struct vb2_queue *q, int nonblocking) ...@@ -1472,8 +1470,7 @@ static int __vb2_wait_for_done_vb(struct vb2_queue *q, int nonblocking)
} }
if (nonblocking) { if (nonblocking) {
dprintk(1, "nonblocking and no buffers to dequeue, " dprintk(1, "nonblocking and no buffers to dequeue, will not wait\n");
"will not wait\n");
return -EAGAIN; return -EAGAIN;
} }
......
...@@ -60,14 +60,13 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer ...@@ -60,14 +60,13 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer
/* Is memory for copying plane information present? */ /* Is memory for copying plane information present? */
if (b->m.planes == NULL) { if (b->m.planes == NULL) {
dprintk(1, "multi-planar buffer passed but " dprintk(1, "multi-planar buffer passed but planes array not provided\n");
"planes array not provided\n");
return -EINVAL; return -EINVAL;
} }
if (b->length < vb->num_planes || b->length > VB2_MAX_PLANES) { if (b->length < vb->num_planes || b->length > VB2_MAX_PLANES) {
dprintk(1, "incorrect planes array length, " dprintk(1, "incorrect planes array length, expected %d, got %d\n",
"expected %d, got %d\n", vb->num_planes, b->length); vb->num_planes, b->length);
return -EINVAL; return -EINVAL;
} }
...@@ -316,8 +315,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb, ...@@ -316,8 +315,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
* that just says that it is either a top or a bottom field, * that just says that it is either a top or a bottom field,
* but not which of the two it is. * but not which of the two it is.
*/ */
dprintk(1, "the field is incorrectly set to ALTERNATE " dprintk(1, "the field is incorrectly set to ALTERNATE for an output buffer\n");
"for an output buffer\n");
return -EINVAL; return -EINVAL;
} }
vb->timestamp = 0; vb->timestamp = 0;
......
...@@ -151,8 +151,7 @@ static void *vb2_vmalloc_vaddr(void *buf_priv) ...@@ -151,8 +151,7 @@ static void *vb2_vmalloc_vaddr(void *buf_priv)
struct vb2_vmalloc_buf *buf = buf_priv; struct vb2_vmalloc_buf *buf = buf_priv;
if (!buf->vaddr) { if (!buf->vaddr) {
pr_err("Address of an unallocated plane requested " pr_err("Address of an unallocated plane requested or cannot map user pointer\n");
"or cannot map user pointer\n");
return NULL; return NULL;
} }
......
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