From: Helen Koike <helen.koike@collabora.com> To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>, linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, ezequiel@collabora.com, hverkuil@xs4all.nl, kernel@collabora.com, dafna3@gmail.com, sakari.ailus@linux.intel.com, linux-rockchip@lists.infradead.org, mchehab@kernel.org, tfiga@chromium.org Subject: Re: [PATCH 2/6] media: staging: rkisp1: params: in stop_streaming, use list_splice_init to move the buffers Date: Wed, 14 Oct 2020 17:27:43 -0300 [thread overview] Message-ID: <e32bfefb-7b0c-669c-32da-8b407216d936@collabora.com> (raw) In-Reply-To: <20201002184222.7094-3-dafna.hirschfeld@collabora.com> On 10/2/20 3:42 PM, Dafna Hirschfeld wrote: > Currently the code uses 'list_cut_position' to move the > buffers to a temporary list. Replace it with > 'list_splice_init'. This is nicer since we don't need > to access params.prev. Also, replace INIT_LIST_HEAD > with the simpler LIST_HEAD. > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> Thanks Helen > --- > drivers/staging/media/rkisp1/rkisp1-params.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-params.c b/drivers/staging/media/rkisp1/rkisp1-params.c > index 986d293201e6..cb9f3332a9a0 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-params.c > +++ b/drivers/staging/media/rkisp1/rkisp1-params.c > @@ -1462,9 +1462,7 @@ static void rkisp1_params_vb2_stop_streaming(struct vb2_queue *vq) > { > struct rkisp1_params *params = vq->drv_priv; > struct rkisp1_buffer *buf; > - struct list_head tmp_list; > - > - INIT_LIST_HEAD(&tmp_list); > + LIST_HEAD(tmp_list); > > /* > * we first move the buffers into a local list 'tmp_list' > @@ -1473,7 +1471,7 @@ static void rkisp1_params_vb2_stop_streaming(struct vb2_queue *vq) > */ > spin_lock_irq(¶ms->config_lock); > params->is_streaming = false; > - list_cut_position(&tmp_list, ¶ms->params, params->params.prev); > + list_splice_init(¶ms->params, &tmp_list); > spin_unlock_irq(¶ms->config_lock); > > list_for_each_entry(buf, &tmp_list, queue) >
WARNING: multiple messages have this Message-ID (diff)
From: Helen Koike <helen.koike@collabora.com> To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>, linux-media@vger.kernel.org Cc: mchehab@kernel.org, dafna3@gmail.com, tfiga@chromium.org, hverkuil@xs4all.nl, linux-rockchip@lists.infradead.org, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, kernel@collabora.com, ezequiel@collabora.com Subject: Re: [PATCH 2/6] media: staging: rkisp1: params: in stop_streaming, use list_splice_init to move the buffers Date: Wed, 14 Oct 2020 17:27:43 -0300 [thread overview] Message-ID: <e32bfefb-7b0c-669c-32da-8b407216d936@collabora.com> (raw) In-Reply-To: <20201002184222.7094-3-dafna.hirschfeld@collabora.com> On 10/2/20 3:42 PM, Dafna Hirschfeld wrote: > Currently the code uses 'list_cut_position' to move the > buffers to a temporary list. Replace it with > 'list_splice_init'. This is nicer since we don't need > to access params.prev. Also, replace INIT_LIST_HEAD > with the simpler LIST_HEAD. > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> Thanks Helen > --- > drivers/staging/media/rkisp1/rkisp1-params.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-params.c b/drivers/staging/media/rkisp1/rkisp1-params.c > index 986d293201e6..cb9f3332a9a0 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-params.c > +++ b/drivers/staging/media/rkisp1/rkisp1-params.c > @@ -1462,9 +1462,7 @@ static void rkisp1_params_vb2_stop_streaming(struct vb2_queue *vq) > { > struct rkisp1_params *params = vq->drv_priv; > struct rkisp1_buffer *buf; > - struct list_head tmp_list; > - > - INIT_LIST_HEAD(&tmp_list); > + LIST_HEAD(tmp_list); > > /* > * we first move the buffers into a local list 'tmp_list' > @@ -1473,7 +1471,7 @@ static void rkisp1_params_vb2_stop_streaming(struct vb2_queue *vq) > */ > spin_lock_irq(¶ms->config_lock); > params->is_streaming = false; > - list_cut_position(&tmp_list, ¶ms->params, params->params.prev); > + list_splice_init(¶ms->params, &tmp_list); > spin_unlock_irq(¶ms->config_lock); > > list_for_each_entry(buf, &tmp_list, queue) > _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2020-10-14 20:27 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-02 18:42 [PATCH 0/6] media: staging: rkisp1: improvements Dafna Hirschfeld 2020-10-02 18:42 ` Dafna Hirschfeld 2020-10-02 18:42 ` [PATCH 1/6] media: staging: rkisp1: validate links before powering and streaming Dafna Hirschfeld 2020-10-02 18:42 ` Dafna Hirschfeld 2020-10-02 18:42 ` [PATCH 2/6] media: staging: rkisp1: params: in stop_streaming, use list_splice_init to move the buffers Dafna Hirschfeld 2020-10-02 18:42 ` Dafna Hirschfeld 2020-10-14 20:27 ` Helen Koike [this message] 2020-10-14 20:27 ` Helen Koike 2020-10-02 18:42 ` [PATCH 3/6] media: staging: rkisp1: initialize buffer lists only on probe Dafna Hirschfeld 2020-10-02 18:42 ` Dafna Hirschfeld 2020-10-14 20:27 ` Helen Koike 2020-10-14 20:27 ` Helen Koike 2020-10-02 18:42 ` [PATCH 4/6] media: staging: rkisp1: remove the 'is_streaming' field from stats and params Dafna Hirschfeld 2020-10-02 18:42 ` Dafna Hirschfeld 2020-10-14 20:27 ` Helen Koike 2020-10-14 20:27 ` Helen Koike 2020-10-02 18:42 ` [PATCH 5/6] media: staging: rkisp1: params: add '__must_hold' to rkisp1_params_apply_params_cfg Dafna Hirschfeld 2020-10-02 18:42 ` Dafna Hirschfeld 2020-10-14 20:27 ` Helen Koike 2020-10-14 20:27 ` Helen Koike 2020-10-02 18:42 ` [PATCH 6/6] media: staging: rkisp1: cap: add warning when link validation fails Dafna Hirschfeld 2020-10-02 18:42 ` Dafna Hirschfeld 2020-10-02 19:26 ` Laurent Pinchart 2020-10-02 19:26 ` Laurent Pinchart
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e32bfefb-7b0c-669c-32da-8b407216d936@collabora.com \ --to=helen.koike@collabora.com \ --cc=dafna.hirschfeld@collabora.com \ --cc=dafna3@gmail.com \ --cc=ezequiel@collabora.com \ --cc=hverkuil@xs4all.nl \ --cc=kernel@collabora.com \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-media@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=mchehab@kernel.org \ --cc=sakari.ailus@linux.intel.com \ --cc=tfiga@chromium.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.