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 5/6] media: staging: rkisp1: params: add '__must_hold' to rkisp1_params_apply_params_cfg
Date: Wed, 14 Oct 2020 17:27:52 -0300 [thread overview]
Message-ID: <2f1cf2ba-2557-db59-d8e9-5a2c02edd008@collabora.com> (raw)
In-Reply-To: <20201002184222.7094-6-dafna.hirschfeld@collabora.com>
Hi Dafna,
On 10/2/20 3:42 PM, Dafna Hirschfeld wrote:
> The function rkisp1_params_apply_params_cfg must be under the
> the lock of params->config_lock. Add the __must_hold annotation
> to indicate it.
>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> ---
> drivers/staging/media/rkisp1/rkisp1-params.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/rkisp1/rkisp1-params.c b/drivers/staging/media/rkisp1/rkisp1-params.c
> index 3afbc24ca05e..aa18a113245b 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-params.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-params.c
> @@ -1187,6 +1187,7 @@ static void rkisp1_isp_isr_meas_config(struct rkisp1_params *params,
>
> static void rkisp1_params_apply_params_cfg(struct rkisp1_params *params,
> unsigned int frame_sequence)
> + __must_hold(¶ms->config_lock)
> {
> struct rkisp1_params_cfg *new_params;
> struct rkisp1_buffer *cur_buf = NULL;
>
Instead of adding __must_hold, why no to lock inside this function?
It seems there are only two places that call it, and they don't do anything else
in the critical section.
Regards,
Helen
_______________________________________________
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:28 UTC|newest]
Thread overview: 12+ 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 ` [PATCH 1/6] media: staging: rkisp1: validate links before powering and streaming 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-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-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-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-14 20:27 ` Helen Koike [this message]
2020-10-02 18:42 ` [PATCH 6/6] media: staging: rkisp1: cap: add warning when link validation fails Dafna Hirschfeld
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=2f1cf2ba-2557-db59-d8e9-5a2c02edd008@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).