[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191119133416.GB30789@kadam>
Date: Tue, 19 Nov 2019 16:34:16 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: vishnu <vravulap@....com>
Cc: Ravulapati Vishnu vardhan rao
<Vishnuvardhanrao.Ravulapati@....com>, Alexander.Deucher@....com,
djkurtz@...gle.com, Akshu.Agrawal@....com,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Vijendar Mukunda <Vijendar.Mukunda@....com>,
YueHaibing <yuehaibing@...wei.com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..."
<alsa-devel@...a-project.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND PATCH v9 6/6] ASoC: amd: Added ACP3x system resume and
runtime pm
On Tue, Nov 19, 2019 at 06:26:17PM +0530, vishnu wrote:
>
>
> On 19/11/19 6:05 PM, Dan Carpenter wrote:
> > I can't apply this because I'm not CC'd on patches 2-5.
> >
> > On Tue, Nov 19, 2019 at 05:41:16PM +0530, Ravulapati Vishnu vardhan rao wrote:
> > > +static int acp3x_power_on(void __iomem *acp3x_base)
> > > +{
> > > + u32 val;
> > > + u32 timeout;
> > > +
> > > + timeout = 0;
> > > + val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
> > > +
> > > + if (val == 0)
> > > + return val;
> > > +
> > > + if (!((val & ACP_PGFSM_STATUS_MASK) ==
> > > + ACP_POWER_ON_IN_PROGRESS))
> > > + rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
> > > + acp3x_base + mmACP_PGFSM_CONTROL);
> > > + while (++timeout) {
> >
> > while (++timeout < 500)
> >
>
> If I check with timeout<500 and in next condition i have
> if(timeout >500) this never happens.
I was maybe not clear enough. Please don't write:
while (++timeout) {
That doesn't make sense as a loop. It looks like you are trying to
loop UINT_MAX times. Put the ++ and the limit on the same line.
There is only one real bug in my review but there is just a lot of clean
up left. Can you have a co-worker review your patch before resending?
The patch 1/6 looks pretty good now but I haven't seen patches 2-5 so
I'm worried there is a lot of cleanup left to do.
regards,
dan carpenter
Powered by blists - more mailing lists