diff for duplicates of <51F97B4D.70305@gmail.com> diff --git a/a/1.txt b/N1/1.txt index e2f0bc2..74777ef 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -88,7 +88,7 @@ On 07/31/2013 05:52 PM, Laurent Pinchart wrote: > + int ret; > + > + vsp1 = devm_kzalloc(&pdev->dev, sizeof(*vsp1), GFP_KERNEL); -> + if (vsp1 = NULL) { +> + if (vsp1 == NULL) { > + dev_err(&pdev->dev, "failed to allocate private data\n"); k*alloc already log any errors, hence this line could be dropped. I've @@ -102,7 +102,7 @@ seen patches removing such logging. > + INIT_LIST_HEAD(&vsp1->entities); > + > + vsp1->pdata = vsp1_get_platform_data(pdev); -> + if (vsp1->pdata = NULL) +> + if (vsp1->pdata == NULL) > + return -ENODEV; > + > + /* I/O, IRQ and clock resources */ @@ -162,7 +162,7 @@ if the second argument is valid. > + int ret; > + > + lif = devm_kzalloc(vsp1->dev, sizeof(*lif), GFP_KERNEL); -> + if (lif = NULL) +> + if (lif == NULL) > + return ERR_PTR(-ENOMEM); > + > + lif->entity.type = VSP1_ENTITY_LIF; @@ -203,9 +203,9 @@ names. Not sure if it would have been really an issue though. > + pipe->state = VSP1_PIPELINE_STOPPING; > + spin_unlock_irqrestore(&pipe->irqlock, flags); > + -> + ret = wait_event_timeout(pipe->wq, pipe->state = VSP1_PIPELINE_STOPPED, +> + ret = wait_event_timeout(pipe->wq, pipe->state == VSP1_PIPELINE_STOPPED, > + msecs_to_jiffies(500)); -> + ret = ret = 0 ? -ETIMEDOUT : 0; +> + ret = ret == 0 ? -ETIMEDOUT : 0; Wouldn't be -ETIME more appropriate ? @@ -318,7 +318,7 @@ But it's likely better to add proper handling of 'fmt' right away. > +{ > + struct vsp1_entity *sink; > + -> + if (source->route = 0) +> + if (source->route == 0) > + return; > + > + sink = container_of(source->sink, struct vsp1_entity, subdev.entity); @@ -334,7 +334,7 @@ But it's likely better to add proper handling of 'fmt' right away. > + int ret; > + > + mutex_lock(&pipe->lock); -> + if (pipe->stream_count = pipe->num_video - 1) { +> + if (pipe->stream_count == pipe->num_video - 1) { > + list_for_each_entry(entity,&pipe->entities, list_pipe) { > + vsp1_entity_route_setup(entity); > + @@ -366,10 +366,10 @@ But it's likely better to add proper handling of 'fmt' right away. > + int ret; > + > + mutex_lock(&pipe->lock); -> + if (--pipe->stream_count = 0) { +> + if (--pipe->stream_count == 0) { > + /* Stop the pipeline. */ > + ret = vsp1_pipeline_stop(pipe); -> + if (ret = -ETIMEDOUT) +> + if (ret == -ETIMEDOUT) ETIME ? @@ -425,7 +425,7 @@ Nitpicking: Isn't proper multi-line comment style ? In fact the media subsystem code is pretty messy WRT that detail. > + info = vsp1_get_format_info(pix->pixelformat); -> + if (info = NULL) +> + if (info == NULL) > + info = vsp1_get_format_info(VSP1_VIDEO_DEF_FORMAT); > + > + pix->pixelformat = info->fourcc; @@ -461,7 +461,7 @@ Nitpicking: Isn't proper multi-line comment style > + * pix->height / vsub; > + } > + -> + if (info->planes = 3) { +> + if (info->planes == 3) { > + /* The second and third planes must have the same stride. */ > + pix->plane_fmt[2].bytesperline = pix->plane_fmt[1].bytesperline; > + pix->plane_fmt[2].sizeimage = pix->plane_fmt[1].sizeimage; diff --git a/a/content_digest b/N1/content_digest index 413061d..ff90b40 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,7 +2,7 @@ "ref\01375285954-32153-6-git-send-email-laurent.pinchart+renesas@ideasonboard.com\0" "From\0Sylwester Nawrocki <sylvester.nawrocki@gmail.com>\0" "Subject\0Re: [PATCH v4 5/7] v4l: Renesas R-Car VSP1 driver\0" - "Date\0Wed, 31 Jul 2013 21:02:05 +0000\0" + "Date\0Wed, 31 Jul 2013 23:02:05 +0200\0" "To\0Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>\0" "Cc\0linux-media@vger.kernel.org" linux-sh@vger.kernel.org @@ -101,7 +101,7 @@ "> +\tint ret;\n" "> +\n" "> +\tvsp1 = devm_kzalloc(&pdev->dev, sizeof(*vsp1), GFP_KERNEL);\n" - "> +\tif (vsp1 = NULL) {\n" + "> +\tif (vsp1 == NULL) {\n" "> +\t\tdev_err(&pdev->dev, \"failed to allocate private data\\n\");\n" "\n" "k*alloc already log any errors, hence this line could be dropped. I've\n" @@ -115,7 +115,7 @@ "> +\tINIT_LIST_HEAD(&vsp1->entities);\n" "> +\n" "> +\tvsp1->pdata = vsp1_get_platform_data(pdev);\n" - "> +\tif (vsp1->pdata = NULL)\n" + "> +\tif (vsp1->pdata == NULL)\n" "> +\t\treturn -ENODEV;\n" "> +\n" "> +\t/* I/O, IRQ and clock resources */\n" @@ -175,7 +175,7 @@ "> +\tint ret;\n" "> +\n" "> +\tlif = devm_kzalloc(vsp1->dev, sizeof(*lif), GFP_KERNEL);\n" - "> +\tif (lif = NULL)\n" + "> +\tif (lif == NULL)\n" "> +\t\treturn ERR_PTR(-ENOMEM);\n" "> +\n" "> +\tlif->entity.type = VSP1_ENTITY_LIF;\n" @@ -216,9 +216,9 @@ "> +\tpipe->state = VSP1_PIPELINE_STOPPING;\n" "> +\tspin_unlock_irqrestore(&pipe->irqlock, flags);\n" "> +\n" - "> +\tret = wait_event_timeout(pipe->wq, pipe->state = VSP1_PIPELINE_STOPPED,\n" + "> +\tret = wait_event_timeout(pipe->wq, pipe->state == VSP1_PIPELINE_STOPPED,\n" "> +\t\t\t\t msecs_to_jiffies(500));\n" - "> +\tret = ret = 0 ? -ETIMEDOUT : 0;\n" + "> +\tret = ret == 0 ? -ETIMEDOUT : 0;\n" "\n" "Wouldn't be -ETIME more appropriate ?\n" "\n" @@ -331,7 +331,7 @@ "> +{\n" "> +\tstruct vsp1_entity *sink;\n" "> +\n" - "> +\tif (source->route = 0)\n" + "> +\tif (source->route == 0)\n" "> +\t\treturn;\n" "> +\n" "> +\tsink = container_of(source->sink, struct vsp1_entity, subdev.entity);\n" @@ -347,7 +347,7 @@ "> +\tint ret;\n" "> +\n" "> +\tmutex_lock(&pipe->lock);\n" - "> +\tif (pipe->stream_count = pipe->num_video - 1) {\n" + "> +\tif (pipe->stream_count == pipe->num_video - 1) {\n" "> +\t\tlist_for_each_entry(entity,&pipe->entities, list_pipe) {\n" "> +\t\t\tvsp1_entity_route_setup(entity);\n" "> +\n" @@ -379,10 +379,10 @@ "> +\tint ret;\n" "> +\n" "> +\tmutex_lock(&pipe->lock);\n" - "> +\tif (--pipe->stream_count = 0) {\n" + "> +\tif (--pipe->stream_count == 0) {\n" "> +\t\t/* Stop the pipeline. */\n" "> +\t\tret = vsp1_pipeline_stop(pipe);\n" - "> +\t\tif (ret = -ETIMEDOUT)\n" + "> +\t\tif (ret == -ETIMEDOUT)\n" "\n" "ETIME ?\n" "\n" @@ -438,7 +438,7 @@ "? In fact the media subsystem code is pretty messy WRT that detail.\n" "\n" "> +\tinfo = vsp1_get_format_info(pix->pixelformat);\n" - "> +\tif (info = NULL)\n" + "> +\tif (info == NULL)\n" "> +\t\tinfo = vsp1_get_format_info(VSP1_VIDEO_DEF_FORMAT);\n" "> +\n" "> +\tpix->pixelformat = info->fourcc;\n" @@ -474,7 +474,7 @@ "> +\t\t\t\t\t * pix->height / vsub;\n" "> +\t}\n" "> +\n" - "> +\tif (info->planes = 3) {\n" + "> +\tif (info->planes == 3) {\n" "> +\t\t/* The second and third planes must have the same stride. */\n" "> +\t\tpix->plane_fmt[2].bytesperline = pix->plane_fmt[1].bytesperline;\n" "> +\t\tpix->plane_fmt[2].sizeimage = pix->plane_fmt[1].sizeimage;\n" @@ -492,4 +492,4 @@ "Regards,\n" Sylwester -bd793ee7abc5d37712bb492b34fd8b3e012c21f20896d118aabcc8fd2a398f71 +b4a5ccd61a5267fa9db9c1a11eb28869b72d1bb03471fbae5a161b215ef1a12a
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.