All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <53F3531C.4080105@xs4all.nl>

diff --git a/a/1.txt b/N1/1.txt
index 01fe173..c3ce5fc 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -525,9 +525,9 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +}
 > +
 > +/*
-> + * ======================================
+> + * ============================================================================
 > + * video ioctl operations
-> + * ======================================
+> + * ============================================================================
 > + */
 > +static void put_byte(unsigned long *p, u8 v)
 > +{
@@ -600,7 +600,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	put_byte(&p, 0x03);
 > +	put_byte(&p, 0x01);
 > +
-> +	if (q->fmt->fourcc =  V4L2_PIX_FMT_NV16)
+> +	if (q->fmt->fourcc ==  V4L2_PIX_FMT_NV16)
 > +		put_byte(&p, 0x21);
 > +	else
 > +		put_byte(&p, 0x22);
@@ -620,7 +620,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	struct jpu_ctx *ctx = fh_to_ctx(priv);
 > +
-> +	if (ctx->mode = JPU_ENCODE) {
+> +	if (ctx->mode == JPU_ENCODE) {
 > +		strlcpy(cap->driver, JPU_M2M_NAME " encoder",
 > +			sizeof(cap->driver));
 > +		strlcpy(cap->card, JPU_M2M_NAME " encoder",
@@ -642,17 +642,17 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	unsigned int k, fmt_flag;
 > +
-> +	if (mode = JPU_ENCODE)
-> +		fmt_flag = (fmt_type = JPU_FMT_TYPE_OUTPUT) ? JPU_ENC_OUTPUT :
+> +	if (mode == JPU_ENCODE)
+> +		fmt_flag = (fmt_type == JPU_FMT_TYPE_OUTPUT) ? JPU_ENC_OUTPUT :
 > +							       JPU_ENC_CAPTURE;
 > +	else
-> +		fmt_flag = (fmt_type = JPU_FMT_TYPE_OUTPUT) ? JPU_DEC_OUTPUT :
+> +		fmt_flag = (fmt_type == JPU_FMT_TYPE_OUTPUT) ? JPU_DEC_OUTPUT :
 > +							       JPU_DEC_CAPTURE;
 > +
 > +	for (k = 0; k < ARRAY_SIZE(jpu_formats); k++) {
 > +		struct jpu_fmt *fmt = &jpu_formats[k];
 > +
-> +		if (fmt->fourcc = pixelformat &&
+> +		if (fmt->fourcc == pixelformat &&
 > +			fmt->types & fmt_flag) {
 > +			return fmt;
 > +		}
@@ -668,7 +668,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	for (i = 0; i < ARRAY_SIZE(jpu_formats); ++i) {
 > +		if (jpu_formats[i].types & type) {
 > +			/* index-th format of type type found ? */
-> +			if (num = f->index)
+> +			if (num == f->index)
 > +				break;
 > +			/*
 > +			 * Correct type but haven't reached our index yet,
@@ -693,7 +693,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	struct jpu_ctx *ctx = fh_to_ctx(priv);
 > +
-> +	if (ctx->mode = JPU_ENCODE)
+> +	if (ctx->mode == JPU_ENCODE)
 > +		return jpu_enum_fmt(f, JPU_ENC_CAPTURE);
 > +
 > +	return jpu_enum_fmt(f, JPU_DEC_CAPTURE);
@@ -704,7 +704,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	struct jpu_ctx *ctx = fh_to_ctx(priv);
 > +
-> +	if (ctx->mode = JPU_ENCODE)
+> +	if (ctx->mode == JPU_ENCODE)
 > +		return jpu_enum_fmt(f, JPU_ENC_OUTPUT);
 > +
 > +	return jpu_enum_fmt(f, JPU_DEC_OUTPUT);
@@ -734,8 +734,8 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	if (!vq)
 > +		return -EINVAL;
 > +
-> +	if (f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE &&
-> +		ctx->mode = JPU_DECODE && !ctx->hdr_parsed)
+> +	if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE &&
+> +		ctx->mode == JPU_DECODE && !ctx->hdr_parsed)
 > +		return -EINVAL;
 > +
 > +	q_data = jpu_get_q_data(ctx, f->type);
@@ -778,7 +778,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	struct v4l2_pix_format *pix = &f->fmt.pix;
 > +
-> +	if (pix->field = V4L2_FIELD_ANY)
+> +	if (pix->field == V4L2_FIELD_ANY)
 > +		pix->field = V4L2_FIELD_NONE;
 > +	else if (pix->field != V4L2_FIELD_NONE)
 > +		return -EINVAL;
@@ -791,7 +791,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +			      fmt->h_align, &pix->height, JPU_HEIGHT_MIN,
 > +			      JPU_HEIGHT_MAX, fmt->v_align);
 > +
-> +	if (fmt->fourcc = V4L2_PIX_FMT_JPEG) {
+> +	if (fmt->fourcc == V4L2_PIX_FMT_JPEG) {
 > +		if (pix->sizeimage <= 0)
 > +			pix->sizeimage = PAGE_SIZE;
 > +		pix->bytesperline = 0;
@@ -910,7 +910,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +		s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
 > +		return -EINVAL;
 > +
-> +	/* For JPEG blob active = default = bounds */
+> +	/* For JPEG blob active == default == bounds */
 > +	switch (s->target) {
 > +	case V4L2_SEL_TGT_CROP:
 > +	case V4L2_SEL_TGT_CROP_BOUNDS:
@@ -943,7 +943,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +
 > +	spin_lock_irqsave(&ctx->jpu->slock, flags);
 > +
-> +	if (ctrl->id = V4L2_CID_JPEG_COMPRESSION_QUALITY)
+> +	if (ctrl->id == V4L2_CID_JPEG_COMPRESSION_QUALITY)
 > +		ctx->compr_quality = ctrl->val;
 > +
 > +	spin_unlock_irqrestore(&ctx->jpu->slock, flags);
@@ -986,7 +986,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +
 > +	v4l2_ctrl_handler_init(&ctx->ctrl_handler, 3);
 > +
-> +	if (ctx->mode = JPU_ENCODE) {
+> +	if (ctx->mode == JPU_ENCODE) {
 > +		v4l2_ctrl_new_std(&ctx->ctrl_handler, &jpu_ctrl_ops,
 > +				  V4L2_CID_JPEG_COMPRESSION_QUALITY,
 > +				  0, 1, 1, 1);
@@ -995,7 +995,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	if (ctx->ctrl_handler.error)
 > +		return ctx->ctrl_handler.error;
 > +
-> +	if (ctx->mode = JPU_DECODE)
+> +	if (ctx->mode == JPU_DECODE)
 > +		ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE |
 > +			       V4L2_CTRL_FLAG_READ_ONLY;
 > +
@@ -1003,9 +1003,9 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +}
 > +
 > +/*
-> + * ======================================
+> + * ============================================================================
 > + * Queue operations
-> + * ======================================
+> + * ============================================================================
 > + */
 > +static int jpu_queue_setup(struct vb2_queue *vq,
 > +			   const struct v4l2_format *fmt,
@@ -1024,7 +1024,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	 * Header is parsed during decoding and parsed information stored
 > +	 * in the context so we do not allow another buffer to overwrite it
 > +	 */
-> +	if (ctx->mode = JPU_DECODE)
+> +	if (ctx->mode == JPU_DECODE)
 > +		count = 1;
 > +
 > +	*nbuffers = count;
@@ -1057,8 +1057,8 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	struct jpu_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
 > +
-> +	if (ctx->mode = JPU_DECODE &&
-> +		vb->vb2_queue->type = V4L2_BUF_TYPE_VIDEO_OUTPUT) {
+> +	if (ctx->mode == JPU_DECODE &&
+> +		vb->vb2_queue->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
 > +		struct jpu_q_data *q_data;
 > +		struct jpu *jpu = ctx->jpu;
 > +		unsigned int subsampling, w_out, h_out, w_cap, h_cap;
@@ -1083,7 +1083,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +		if (wait_event_interruptible_timeout(jpu->wq,
 > +						     jpu->status != JPU_BUSY,
 > +						     msecs_to_jiffies(100)) > 0
-> +						     && jpu->status = JPU_OK)
+> +						     && jpu->status == JPU_OK)
 > +			ctx->hdr_parsed = true;
 > +
 > +		w_out = ioread32(jpu->regs + JCHSZU) << 8 |
@@ -1125,7 +1125,8 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +		q_data->fmt = jpu_find_format(JPU_DECODE, subsampling,
 > +					      JPU_FMT_TYPE_CAPTURE);
 > +
-> +		q_data->size > +			(q_data->w * q_data->h * q_data->fmt->depth) >> 3;
+> +		q_data->size =
+> +			(q_data->w * q_data->h * q_data->fmt->depth) >> 3;
 > +	}
 > +
 > +	if (ctx->fh.m2m_ctx)
@@ -1183,9 +1184,9 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +}
 > +
 > +/*
-> + * ======================================
+> + * ============================================================================
 > + * Device file operations
-> + * ======================================
+> + * ============================================================================
 > + */
 > +static int jpu_open(struct file *file)
 > +{
@@ -1210,7 +1211,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	v4l2_fh_add(&ctx->fh);
 > +
 > +	ctx->jpu = jpu;
-> +	if (vfd = jpu->vfd_encoder) {
+> +	if (vfd == jpu->vfd_encoder) {
 > +		ctx->mode = JPU_ENCODE;
 > +		out_fmt = jpu_find_format(ctx->mode, V4L2_PIX_FMT_NV16,
 > +					  JPU_FMT_TYPE_OUTPUT);
@@ -1238,7 +1239,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	if (ret < 0)
 > +		goto error;
 > +
-> +	if (jpu->ref_count = 0) {
+> +	if (jpu->ref_count == 0) {
 > +		ret = clk_prepare_enable(jpu->clk);
 > +		if (ret < 0)
 > +			goto error;
@@ -1264,7 +1265,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	struct jpu_ctx *ctx = fh_to_ctx(file->private_data);
 > +
 > +	mutex_lock(&jpu->mutex);
-> +	if (--jpu->ref_count = 0)
+> +	if (--jpu->ref_count == 0)
 > +		clk_disable_unprepare(jpu->clk);
 > +	v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
 > +	v4l2_ctrl_handler_free(&ctx->ctrl_handler);
@@ -1286,9 +1287,9 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +};
 > +
 > +/*
-> + * ======================================
+> + * ============================================================================
 > + * mem2mem callbacks
-> + * ======================================
+> + * ============================================================================
 > + */
 > +static void jpu_device_run(void *priv)
 > +{
@@ -1309,7 +1310,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +
 > +	jpu_reset(jpu->regs);
 > +
-> +	if (ctx->mode = JPU_ENCODE) {
+> +	if (ctx->mode == JPU_ENCODE) {
 > +		unsigned int redu, inft;
 > +
 > +		w = ctx->out_q.w;
@@ -1317,7 +1318,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +
 > +		jpu_generate_hdr(&ctx->out_q, ctx->compr_quality, dst_vaddr);
 > +
-> +		if (ctx->out_q.fmt->fourcc = V4L2_PIX_FMT_NV12) {
+> +		if (ctx->out_q.fmt->fourcc == V4L2_PIX_FMT_NV12) {
 > +			redu = JCMOD_REDU_420;
 > +			inft = JIFECNT_INFT_420;
 > +		} else {
@@ -1384,7 +1385,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	struct jpu_ctx *ctx = priv;
 > +
-> +	if (ctx->mode = JPU_DECODE)
+> +	if (ctx->mode == JPU_DECODE)
 > +		return ctx->hdr_parsed;
 > +	return 1;
 > +}
@@ -1400,9 +1401,9 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +};
 > +
 > +/*
-> + * ======================================
+> + * ============================================================================
 > + * IRQ handler
-> + * ======================================
+> + * ============================================================================
 > + */
 > +static irqreturn_t jpu_irq_handler(int irq, void *dev_id)
 > +{
@@ -1428,7 +1429,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +		return IRQ_NONE;
 > +	}
 > +
-> +	if (jpu->status = JPU_BUSY) {
+> +	if (jpu->status == JPU_BUSY) {
 > +		if (int_status & INT(3))
 > +			jpu->status = JPU_OK;
 > +		if (int_status & INT(5))
@@ -1446,7 +1447,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +	dst_buf = v4l2_m2m_dst_buf_remove(curr_ctx->fh.m2m_ctx);
 > +
 > +	if (int_status & INT(10)) {
-> +		if (curr_ctx->mode = JPU_ENCODE) {
+> +		if (curr_ctx->mode == JPU_ENCODE) {
 > +			payload_size = ioread32(jpu->regs + JCDTCU) << 16 |
 > +				       ioread32(jpu->regs + JCDTCM) << 8  |
 > +				       ioread32(jpu->regs + JCDTCD);
@@ -1470,9 +1471,9 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +}
 > +
 > +/*
-> + * ======================================
+> + * ============================================================================
 > + * Driver basic infrastructure
-> + * ======================================
+> + * ============================================================================
 > + */
 > +static const struct of_device_id jpu_dt_ids[] = {
 > +	{ .compatible = "renesas,jpu-r8a7790" },
@@ -1654,7 +1655,7 @@ On 08/19/2014 12:50 PM, Mikhail Ulyanov wrote:
 > +{
 > +	struct jpu *jpu = dev_get_drvdata(dev);
 > +
-> +	if (jpu->ref_count = 0)
+> +	if (jpu->ref_count == 0)
 > +		return 0;
 > +
 > +	clk_disable_unprepare(jpu->clk);
diff --git a/a/content_digest b/N1/content_digest
index 61257ee..9ebb0e0 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -543,9 +543,9 @@
  "> +}\n"
  "> +\n"
  "> +/*\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + * video ioctl operations\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + */\n"
  "> +static void put_byte(unsigned long *p, u8 v)\n"
  "> +{\n"
@@ -618,7 +618,7 @@
  "> +\tput_byte(&p, 0x03);\n"
  "> +\tput_byte(&p, 0x01);\n"
  "> +\n"
- "> +\tif (q->fmt->fourcc =  V4L2_PIX_FMT_NV16)\n"
+ "> +\tif (q->fmt->fourcc ==  V4L2_PIX_FMT_NV16)\n"
  "> +\t\tput_byte(&p, 0x21);\n"
  "> +\telse\n"
  "> +\t\tput_byte(&p, 0x22);\n"
@@ -638,7 +638,7 @@
  "> +{\n"
  "> +\tstruct jpu_ctx *ctx = fh_to_ctx(priv);\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_ENCODE) {\n"
+ "> +\tif (ctx->mode == JPU_ENCODE) {\n"
  "> +\t\tstrlcpy(cap->driver, JPU_M2M_NAME \" encoder\",\n"
  "> +\t\t\tsizeof(cap->driver));\n"
  "> +\t\tstrlcpy(cap->card, JPU_M2M_NAME \" encoder\",\n"
@@ -660,17 +660,17 @@
  "> +{\n"
  "> +\tunsigned int k, fmt_flag;\n"
  "> +\n"
- "> +\tif (mode = JPU_ENCODE)\n"
- "> +\t\tfmt_flag = (fmt_type = JPU_FMT_TYPE_OUTPUT) ? JPU_ENC_OUTPUT :\n"
+ "> +\tif (mode == JPU_ENCODE)\n"
+ "> +\t\tfmt_flag = (fmt_type == JPU_FMT_TYPE_OUTPUT) ? JPU_ENC_OUTPUT :\n"
  "> +\t\t\t\t\t\t\t       JPU_ENC_CAPTURE;\n"
  "> +\telse\n"
- "> +\t\tfmt_flag = (fmt_type = JPU_FMT_TYPE_OUTPUT) ? JPU_DEC_OUTPUT :\n"
+ "> +\t\tfmt_flag = (fmt_type == JPU_FMT_TYPE_OUTPUT) ? JPU_DEC_OUTPUT :\n"
  "> +\t\t\t\t\t\t\t       JPU_DEC_CAPTURE;\n"
  "> +\n"
  "> +\tfor (k = 0; k < ARRAY_SIZE(jpu_formats); k++) {\n"
  "> +\t\tstruct jpu_fmt *fmt = &jpu_formats[k];\n"
  "> +\n"
- "> +\t\tif (fmt->fourcc = pixelformat &&\n"
+ "> +\t\tif (fmt->fourcc == pixelformat &&\n"
  "> +\t\t\tfmt->types & fmt_flag) {\n"
  "> +\t\t\treturn fmt;\n"
  "> +\t\t}\n"
@@ -686,7 +686,7 @@
  "> +\tfor (i = 0; i < ARRAY_SIZE(jpu_formats); ++i) {\n"
  "> +\t\tif (jpu_formats[i].types & type) {\n"
  "> +\t\t\t/* index-th format of type type found ? */\n"
- "> +\t\t\tif (num = f->index)\n"
+ "> +\t\t\tif (num == f->index)\n"
  "> +\t\t\t\tbreak;\n"
  "> +\t\t\t/*\n"
  "> +\t\t\t * Correct type but haven't reached our index yet,\n"
@@ -711,7 +711,7 @@
  "> +{\n"
  "> +\tstruct jpu_ctx *ctx = fh_to_ctx(priv);\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_ENCODE)\n"
+ "> +\tif (ctx->mode == JPU_ENCODE)\n"
  "> +\t\treturn jpu_enum_fmt(f, JPU_ENC_CAPTURE);\n"
  "> +\n"
  "> +\treturn jpu_enum_fmt(f, JPU_DEC_CAPTURE);\n"
@@ -722,7 +722,7 @@
  "> +{\n"
  "> +\tstruct jpu_ctx *ctx = fh_to_ctx(priv);\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_ENCODE)\n"
+ "> +\tif (ctx->mode == JPU_ENCODE)\n"
  "> +\t\treturn jpu_enum_fmt(f, JPU_ENC_OUTPUT);\n"
  "> +\n"
  "> +\treturn jpu_enum_fmt(f, JPU_DEC_OUTPUT);\n"
@@ -752,8 +752,8 @@
  "> +\tif (!vq)\n"
  "> +\t\treturn -EINVAL;\n"
  "> +\n"
- "> +\tif (f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE &&\n"
- "> +\t\tctx->mode = JPU_DECODE && !ctx->hdr_parsed)\n"
+ "> +\tif (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE &&\n"
+ "> +\t\tctx->mode == JPU_DECODE && !ctx->hdr_parsed)\n"
  "> +\t\treturn -EINVAL;\n"
  "> +\n"
  "> +\tq_data = jpu_get_q_data(ctx, f->type);\n"
@@ -796,7 +796,7 @@
  "> +{\n"
  "> +\tstruct v4l2_pix_format *pix = &f->fmt.pix;\n"
  "> +\n"
- "> +\tif (pix->field = V4L2_FIELD_ANY)\n"
+ "> +\tif (pix->field == V4L2_FIELD_ANY)\n"
  "> +\t\tpix->field = V4L2_FIELD_NONE;\n"
  "> +\telse if (pix->field != V4L2_FIELD_NONE)\n"
  "> +\t\treturn -EINVAL;\n"
@@ -809,7 +809,7 @@
  "> +\t\t\t      fmt->h_align, &pix->height, JPU_HEIGHT_MIN,\n"
  "> +\t\t\t      JPU_HEIGHT_MAX, fmt->v_align);\n"
  "> +\n"
- "> +\tif (fmt->fourcc = V4L2_PIX_FMT_JPEG) {\n"
+ "> +\tif (fmt->fourcc == V4L2_PIX_FMT_JPEG) {\n"
  "> +\t\tif (pix->sizeimage <= 0)\n"
  "> +\t\t\tpix->sizeimage = PAGE_SIZE;\n"
  "> +\t\tpix->bytesperline = 0;\n"
@@ -928,7 +928,7 @@
  "> +\t\ts->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)\n"
  "> +\t\treturn -EINVAL;\n"
  "> +\n"
- "> +\t/* For JPEG blob active = default = bounds */\n"
+ "> +\t/* For JPEG blob active == default == bounds */\n"
  "> +\tswitch (s->target) {\n"
  "> +\tcase V4L2_SEL_TGT_CROP:\n"
  "> +\tcase V4L2_SEL_TGT_CROP_BOUNDS:\n"
@@ -961,7 +961,7 @@
  "> +\n"
  "> +\tspin_lock_irqsave(&ctx->jpu->slock, flags);\n"
  "> +\n"
- "> +\tif (ctrl->id = V4L2_CID_JPEG_COMPRESSION_QUALITY)\n"
+ "> +\tif (ctrl->id == V4L2_CID_JPEG_COMPRESSION_QUALITY)\n"
  "> +\t\tctx->compr_quality = ctrl->val;\n"
  "> +\n"
  "> +\tspin_unlock_irqrestore(&ctx->jpu->slock, flags);\n"
@@ -1004,7 +1004,7 @@
  "> +\n"
  "> +\tv4l2_ctrl_handler_init(&ctx->ctrl_handler, 3);\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_ENCODE) {\n"
+ "> +\tif (ctx->mode == JPU_ENCODE) {\n"
  "> +\t\tv4l2_ctrl_new_std(&ctx->ctrl_handler, &jpu_ctrl_ops,\n"
  "> +\t\t\t\t  V4L2_CID_JPEG_COMPRESSION_QUALITY,\n"
  "> +\t\t\t\t  0, 1, 1, 1);\n"
@@ -1013,7 +1013,7 @@
  "> +\tif (ctx->ctrl_handler.error)\n"
  "> +\t\treturn ctx->ctrl_handler.error;\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_DECODE)\n"
+ "> +\tif (ctx->mode == JPU_DECODE)\n"
  "> +\t\tctrl->flags |= V4L2_CTRL_FLAG_VOLATILE |\n"
  "> +\t\t\t       V4L2_CTRL_FLAG_READ_ONLY;\n"
  "> +\n"
@@ -1021,9 +1021,9 @@
  "> +}\n"
  "> +\n"
  "> +/*\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + * Queue operations\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + */\n"
  "> +static int jpu_queue_setup(struct vb2_queue *vq,\n"
  "> +\t\t\t   const struct v4l2_format *fmt,\n"
@@ -1042,7 +1042,7 @@
  "> +\t * Header is parsed during decoding and parsed information stored\n"
  "> +\t * in the context so we do not allow another buffer to overwrite it\n"
  "> +\t */\n"
- "> +\tif (ctx->mode = JPU_DECODE)\n"
+ "> +\tif (ctx->mode == JPU_DECODE)\n"
  "> +\t\tcount = 1;\n"
  "> +\n"
  "> +\t*nbuffers = count;\n"
@@ -1075,8 +1075,8 @@
  "> +{\n"
  "> +\tstruct jpu_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_DECODE &&\n"
- "> +\t\tvb->vb2_queue->type = V4L2_BUF_TYPE_VIDEO_OUTPUT) {\n"
+ "> +\tif (ctx->mode == JPU_DECODE &&\n"
+ "> +\t\tvb->vb2_queue->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {\n"
  "> +\t\tstruct jpu_q_data *q_data;\n"
  "> +\t\tstruct jpu *jpu = ctx->jpu;\n"
  "> +\t\tunsigned int subsampling, w_out, h_out, w_cap, h_cap;\n"
@@ -1101,7 +1101,7 @@
  "> +\t\tif (wait_event_interruptible_timeout(jpu->wq,\n"
  "> +\t\t\t\t\t\t     jpu->status != JPU_BUSY,\n"
  "> +\t\t\t\t\t\t     msecs_to_jiffies(100)) > 0\n"
- "> +\t\t\t\t\t\t     && jpu->status = JPU_OK)\n"
+ "> +\t\t\t\t\t\t     && jpu->status == JPU_OK)\n"
  "> +\t\t\tctx->hdr_parsed = true;\n"
  "> +\n"
  "> +\t\tw_out = ioread32(jpu->regs + JCHSZU) << 8 |\n"
@@ -1143,7 +1143,8 @@
  "> +\t\tq_data->fmt = jpu_find_format(JPU_DECODE, subsampling,\n"
  "> +\t\t\t\t\t      JPU_FMT_TYPE_CAPTURE);\n"
  "> +\n"
- "> +\t\tq_data->size > +\t\t\t(q_data->w * q_data->h * q_data->fmt->depth) >> 3;\n"
+ "> +\t\tq_data->size =\n"
+ "> +\t\t\t(q_data->w * q_data->h * q_data->fmt->depth) >> 3;\n"
  "> +\t}\n"
  "> +\n"
  "> +\tif (ctx->fh.m2m_ctx)\n"
@@ -1201,9 +1202,9 @@
  "> +}\n"
  "> +\n"
  "> +/*\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + * Device file operations\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + */\n"
  "> +static int jpu_open(struct file *file)\n"
  "> +{\n"
@@ -1228,7 +1229,7 @@
  "> +\tv4l2_fh_add(&ctx->fh);\n"
  "> +\n"
  "> +\tctx->jpu = jpu;\n"
- "> +\tif (vfd = jpu->vfd_encoder) {\n"
+ "> +\tif (vfd == jpu->vfd_encoder) {\n"
  "> +\t\tctx->mode = JPU_ENCODE;\n"
  "> +\t\tout_fmt = jpu_find_format(ctx->mode, V4L2_PIX_FMT_NV16,\n"
  "> +\t\t\t\t\t  JPU_FMT_TYPE_OUTPUT);\n"
@@ -1256,7 +1257,7 @@
  "> +\tif (ret < 0)\n"
  "> +\t\tgoto error;\n"
  "> +\n"
- "> +\tif (jpu->ref_count = 0) {\n"
+ "> +\tif (jpu->ref_count == 0) {\n"
  "> +\t\tret = clk_prepare_enable(jpu->clk);\n"
  "> +\t\tif (ret < 0)\n"
  "> +\t\t\tgoto error;\n"
@@ -1282,7 +1283,7 @@
  "> +\tstruct jpu_ctx *ctx = fh_to_ctx(file->private_data);\n"
  "> +\n"
  "> +\tmutex_lock(&jpu->mutex);\n"
- "> +\tif (--jpu->ref_count = 0)\n"
+ "> +\tif (--jpu->ref_count == 0)\n"
  "> +\t\tclk_disable_unprepare(jpu->clk);\n"
  "> +\tv4l2_m2m_ctx_release(ctx->fh.m2m_ctx);\n"
  "> +\tv4l2_ctrl_handler_free(&ctx->ctrl_handler);\n"
@@ -1304,9 +1305,9 @@
  "> +};\n"
  "> +\n"
  "> +/*\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + * mem2mem callbacks\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + */\n"
  "> +static void jpu_device_run(void *priv)\n"
  "> +{\n"
@@ -1327,7 +1328,7 @@
  "> +\n"
  "> +\tjpu_reset(jpu->regs);\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_ENCODE) {\n"
+ "> +\tif (ctx->mode == JPU_ENCODE) {\n"
  "> +\t\tunsigned int redu, inft;\n"
  "> +\n"
  "> +\t\tw = ctx->out_q.w;\n"
@@ -1335,7 +1336,7 @@
  "> +\n"
  "> +\t\tjpu_generate_hdr(&ctx->out_q, ctx->compr_quality, dst_vaddr);\n"
  "> +\n"
- "> +\t\tif (ctx->out_q.fmt->fourcc = V4L2_PIX_FMT_NV12) {\n"
+ "> +\t\tif (ctx->out_q.fmt->fourcc == V4L2_PIX_FMT_NV12) {\n"
  "> +\t\t\tredu = JCMOD_REDU_420;\n"
  "> +\t\t\tinft = JIFECNT_INFT_420;\n"
  "> +\t\t} else {\n"
@@ -1402,7 +1403,7 @@
  "> +{\n"
  "> +\tstruct jpu_ctx *ctx = priv;\n"
  "> +\n"
- "> +\tif (ctx->mode = JPU_DECODE)\n"
+ "> +\tif (ctx->mode == JPU_DECODE)\n"
  "> +\t\treturn ctx->hdr_parsed;\n"
  "> +\treturn 1;\n"
  "> +}\n"
@@ -1418,9 +1419,9 @@
  "> +};\n"
  "> +\n"
  "> +/*\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + * IRQ handler\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + */\n"
  "> +static irqreturn_t jpu_irq_handler(int irq, void *dev_id)\n"
  "> +{\n"
@@ -1446,7 +1447,7 @@
  "> +\t\treturn IRQ_NONE;\n"
  "> +\t}\n"
  "> +\n"
- "> +\tif (jpu->status = JPU_BUSY) {\n"
+ "> +\tif (jpu->status == JPU_BUSY) {\n"
  "> +\t\tif (int_status & INT(3))\n"
  "> +\t\t\tjpu->status = JPU_OK;\n"
  "> +\t\tif (int_status & INT(5))\n"
@@ -1464,7 +1465,7 @@
  "> +\tdst_buf = v4l2_m2m_dst_buf_remove(curr_ctx->fh.m2m_ctx);\n"
  "> +\n"
  "> +\tif (int_status & INT(10)) {\n"
- "> +\t\tif (curr_ctx->mode = JPU_ENCODE) {\n"
+ "> +\t\tif (curr_ctx->mode == JPU_ENCODE) {\n"
  "> +\t\t\tpayload_size = ioread32(jpu->regs + JCDTCU) << 16 |\n"
  "> +\t\t\t\t       ioread32(jpu->regs + JCDTCM) << 8  |\n"
  "> +\t\t\t\t       ioread32(jpu->regs + JCDTCD);\n"
@@ -1488,9 +1489,9 @@
  "> +}\n"
  "> +\n"
  "> +/*\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + * Driver basic infrastructure\n"
- "> + * ======================================\n"
+ "> + * ============================================================================\n"
  "> + */\n"
  "> +static const struct of_device_id jpu_dt_ids[] = {\n"
  "> +\t{ .compatible = \"renesas,jpu-r8a7790\" },\n"
@@ -1672,7 +1673,7 @@
  "> +{\n"
  "> +\tstruct jpu *jpu = dev_get_drvdata(dev);\n"
  "> +\n"
- "> +\tif (jpu->ref_count = 0)\n"
+ "> +\tif (jpu->ref_count == 0)\n"
  "> +\t\treturn 0;\n"
  "> +\n"
  "> +\tclk_disable_unprepare(jpu->clk);\n"
@@ -1716,4 +1717,4 @@
  "> +MODULE_LICENSE(\"GPL v2\");\n"
  >
 
-d3a7c92ea2ebf2ebe2aa4065640aa7af04adfc1fa326d7bf1254d5a2e7b18f95
+06587840ea86ec9403a538427c15081faf0c6040f97d67fecd6d2519de257c03

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.