Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4285c643 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "v4l2-core: Remove unhelpful warnings"

parents db005c45 fba92685
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -133,23 +133,6 @@ static int __set_timestamp(struct vb2_buffer *vb, const void *pb)
	return 0;
};

static void vb2_warn_zero_bytesused(struct vb2_buffer *vb)
{
	static bool check_once;

	if (check_once)
		return;

	check_once = true;
	WARN_ON(1);

	pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
	if (vb->vb2_queue->allow_zero_bytesused)
		pr_warn("use VIDIOC_DECODER_CMD(V4L2_DEC_CMD_STOP) instead.\n");
	else
		pr_warn("use the actual size instead.\n");
}

static int vb2_queue_or_prepare_buf(struct vb2_queue *q, struct v4l2_buffer *b,
				    const char *opname)
{
@@ -357,9 +340,6 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
				struct vb2_plane *pdst = &planes[plane];
				struct v4l2_plane *psrc = &b->m.planes[plane];

				if (psrc->bytesused == 0)
					vb2_warn_zero_bytesused(vb);

				if (vb->vb2_queue->allow_zero_bytesused)
					pdst->bytesused = psrc->bytesused;
				else
@@ -394,9 +374,6 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
		}

		if (V4L2_TYPE_IS_OUTPUT(b->type)) {
			if (b->bytesused == 0)
				vb2_warn_zero_bytesused(vb);

			if (vb->vb2_queue->allow_zero_bytesused)
				planes[0].bytesused = b->bytesused;
			else