[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+V-a8svCAMm_zsujMEzyZ2gdWu4y_DumRsQNK6sL9re_rGurw@mail.gmail.com>
Date: Mon, 10 Jan 2022 16:14:19 +0000
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Biju Das <biju.das.jz@...renesas.com>,
Pavel Machek <pavel@...x.de>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
alsa-devel <alsa-devel@...a-project.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/5] ASoC: sh: rz-ssi: Add functions to get/set substream pointer
Hi Mark,
Thank you for the review.
On Mon, Jan 10, 2022 at 3:10 PM Mark Brown <broonie@...nel.org> wrote:
>
> On Mon, Jan 10, 2022 at 09:47:11AM +0000, Lad Prabhakar wrote:
>
> > +static struct snd_pcm_substream *rz_ssi_get_substream(struct rz_ssi_stream *strm)
> > +{
> > + struct rz_ssi_priv *ssi = strm->priv;
> > + struct snd_pcm_substream *substream;
> > + unsigned long flags;
> > +
> > + spin_lock_irqsave(&ssi->lock, flags);
> > + substream = strm->substream;
> > + spin_unlock_irqrestore(&ssi->lock, flags);
>
> This locking doesn't seem useful, we just take a copy of the lock and
> then immediately return so the lock isn't protecting anything in
> particular - the caller can happily continue using the substream after
> the variable has been updated.
>
Ok will drop the locking from get function.
Cheers,
Prabhakar
Powered by blists - more mailing lists