diff for duplicates of <1823698.5Nvuu0NHzD@avalon> diff --git a/a/1.txt b/N1/1.txt index 0331e03..c2ba716 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -55,7 +55,7 @@ There's no need to initialize i to 0 here, the for loop takes care of it. > > WARN_ON(mutex_is_locked(&vsp1->lock)); > -> if (vsp1->ref_count = 0) +> if (vsp1->ref_count == 0) > return 0; > > + /* Suspend pipeline */ @@ -63,7 +63,7 @@ There's no need to initialize i to 0 here, the for loop takes care of it. > + struct vsp1_rwpf *wpf = vsp1->wpf[i]; > + struct vsp1_pipeline *pipe; > + -> + if (wpf = NULL) +> + if (wpf == NULL) > + continue; > + > + pipe = to_vsp1_pipeline(&wpf->entity.subdev.entity); @@ -86,15 +86,15 @@ like struct vsp1_rwpf *wpf = vsp1->wpf[i]; struct vsp1_pipeline *pipe; - if (wpf = NULL) + if (wpf == NULL) continue; pipe = to_vsp1_pipeline(&wpf->entity.subdev.entity); - if (pipe = NULL) + if (pipe == NULL) continue; spin_lock_irqsave(&pipe->irqlock, flags); - if (pipe->state = VSP1_PIPELINE_RUNNING) + if (pipe->state == VSP1_PIPELINE_RUNNING) pipe->state = VSP1_PIPELINE_STOPPING; spin_unlock_irqrestore(&pipe->irqlock, flags); } @@ -103,17 +103,17 @@ like struct vsp1_rwpf *wpf = vsp1->wpf[i]; struct vsp1_pipeline *pipe; - if (wpf = NULL) + if (wpf == NULL) continue; pipe = to_vsp1_pipeline(&wpf->entity.subdev.entity); - if (pipe = NULL) + if (pipe == NULL) continue; ret = wait_event_timeout(pipe->wq, - pipe->state = VSP1_PIPELINE_STOPPED, + pipe->state == VSP1_PIPELINE_STOPPED, msecs_to_jiffies(500)); - if (ret = 0) + if (ret == 0) dev_warn(vsp1->dev, "pipeline stop timeout\n"); } @@ -140,7 +140,7 @@ There's no need to initialize i to 0 here either. > WARN_ON(mutex_is_locked(&vsp1->lock)); > > - if (vsp1->ref_count) -> + if (vsp1->ref_count = 0) +> + if (vsp1->ref_count == 0) > return 0; > > - return clk_prepare_enable(vsp1->clock); @@ -151,7 +151,7 @@ There's no need to initialize i to 0 here either. > + struct vsp1_rwpf *wpf = vsp1->wpf[i]; > + struct vsp1_pipeline *pipe; > + -> + if (wpf = NULL) +> + if (wpf == NULL) > + continue; > + > + pipe = to_vsp1_pipeline(&wpf->entity.subdev.entity); @@ -193,24 +193,24 @@ also perform the modifications myself if you prefer. > + unsigned long flags; > + int ret; > + -> + if (pipe = NULL) +> + if (pipe == NULL) > + return 0; > + > + spin_lock_irqsave(&pipe->irqlock, flags); -> + if (pipe->state = VSP1_PIPELINE_RUNNING) +> + if (pipe->state == VSP1_PIPELINE_RUNNING) > + 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; > + > + return ret; > +} > + > +void vsp1_pipeline_resume(struct vsp1_pipeline *pipe) > +{ -> + if (pipe = NULL) +> + if (pipe == NULL) > + return; > + > + if (vsp1_pipeline_ready(pipe)) diff --git a/a/content_digest b/N1/content_digest index 75ad3ed..76b4d2b 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\01426429987-3134-1-git-send-email-ykaneko0929@gmail.com\0" "From\0Laurent Pinchart <laurent.pinchart@ideasonboard.com>\0" "Subject\0Re: [PATCH/RFC] v4l: vsp1: Fix Suspend-to-RAM\0" - "Date\0Wed, 29 Apr 2015 19:10:38 +0000\0" + "Date\0Wed, 29 Apr 2015 22:10:38 +0300\0" "To\0Yoshihiro Kaneko <ykaneko0929@gmail.com>" " Simon Horman <horms@verge.net.au>\0" "Cc\0linux-media@vger.kernel.org" @@ -67,7 +67,7 @@ "> \n" "> \tWARN_ON(mutex_is_locked(&vsp1->lock));\n" "> \n" - "> \tif (vsp1->ref_count = 0)\n" + "> \tif (vsp1->ref_count == 0)\n" "> \t\treturn 0;\n" "> \n" "> +\t/* Suspend pipeline */\n" @@ -75,7 +75,7 @@ "> +\t\tstruct vsp1_rwpf *wpf = vsp1->wpf[i];\n" "> +\t\tstruct vsp1_pipeline *pipe;\n" "> +\n" - "> +\t\tif (wpf = NULL)\n" + "> +\t\tif (wpf == NULL)\n" "> +\t\t\tcontinue;\n" "> +\n" "> +\t\tpipe = to_vsp1_pipeline(&wpf->entity.subdev.entity);\n" @@ -98,15 +98,15 @@ "\t\tstruct vsp1_rwpf *wpf = vsp1->wpf[i];\n" "\t\tstruct vsp1_pipeline *pipe;\n" "\n" - "\t\tif (wpf = NULL)\n" + "\t\tif (wpf == NULL)\n" "\t\t\tcontinue;\n" "\n" "\t\tpipe = to_vsp1_pipeline(&wpf->entity.subdev.entity);\n" - "\t\tif (pipe = NULL)\n" + "\t\tif (pipe == NULL)\n" "\t\t\tcontinue;\n" "\n" "\t\tspin_lock_irqsave(&pipe->irqlock, flags);\n" - "\t\tif (pipe->state = VSP1_PIPELINE_RUNNING)\n" + "\t\tif (pipe->state == VSP1_PIPELINE_RUNNING)\n" "\t\t\tpipe->state = VSP1_PIPELINE_STOPPING;\n" "\t\tspin_unlock_irqrestore(&pipe->irqlock, flags);\n" "\t}\n" @@ -115,17 +115,17 @@ "\t\tstruct vsp1_rwpf *wpf = vsp1->wpf[i];\n" "\t\tstruct vsp1_pipeline *pipe;\n" "\n" - "\t\tif (wpf = NULL)\n" + "\t\tif (wpf == NULL)\n" "\t\t\tcontinue;\n" "\n" "\t\tpipe = to_vsp1_pipeline(&wpf->entity.subdev.entity);\n" - "\t\tif (pipe = NULL)\n" + "\t\tif (pipe == NULL)\n" "\t\t\tcontinue;\n" "\n" "\t\tret = wait_event_timeout(pipe->wq,\n" - "\t\t\t\tpipe->state = VSP1_PIPELINE_STOPPED,\n" + "\t\t\t\tpipe->state == VSP1_PIPELINE_STOPPED,\n" " msecs_to_jiffies(500));\n" - "\t\tif (ret = 0)\n" + "\t\tif (ret == 0)\n" "\t\t\tdev_warn(vsp1->dev, \"pipeline stop timeout\\n\");\n" "\t}\n" "\n" @@ -152,7 +152,7 @@ "> \tWARN_ON(mutex_is_locked(&vsp1->lock));\n" "> \n" "> -\tif (vsp1->ref_count)\n" - "> +\tif (vsp1->ref_count = 0)\n" + "> +\tif (vsp1->ref_count == 0)\n" "> \t\treturn 0;\n" "> \n" "> -\treturn clk_prepare_enable(vsp1->clock);\n" @@ -163,7 +163,7 @@ "> +\t\tstruct vsp1_rwpf *wpf = vsp1->wpf[i];\n" "> +\t\tstruct vsp1_pipeline *pipe;\n" "> +\n" - "> +\t\tif (wpf = NULL)\n" + "> +\t\tif (wpf == NULL)\n" "> +\t\t\tcontinue;\n" "> +\n" "> +\t\tpipe = to_vsp1_pipeline(&wpf->entity.subdev.entity);\n" @@ -205,24 +205,24 @@ "> +\tunsigned long flags;\n" "> +\tint ret;\n" "> +\n" - "> +\tif (pipe = NULL)\n" + "> +\tif (pipe == NULL)\n" "> +\t\treturn 0;\n" "> +\n" "> +\tspin_lock_irqsave(&pipe->irqlock, flags);\n" - "> +\tif (pipe->state = VSP1_PIPELINE_RUNNING)\n" + "> +\tif (pipe->state == VSP1_PIPELINE_RUNNING)\n" "> +\t\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" "> +\treturn ret;\n" "> +}\n" "> +\n" "> +void vsp1_pipeline_resume(struct vsp1_pipeline *pipe)\n" "> +{\n" - "> +\tif (pipe = NULL)\n" + "> +\tif (pipe == NULL)\n" "> +\t\treturn;\n" "> +\n" "> +\tif (vsp1_pipeline_ready(pipe))\n" @@ -259,4 +259,4 @@ "\n" Laurent Pinchart -cb4c5b99c86cbd43190da82c91eafce2ab492850d0c8f8e9ba3316a821293d28 +a1cbeb991360f36e3ccccabae530a16ceab5d5659bc00e6c7a993d6c06b6c983
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.