[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171023111910.GG936@localhost>
Date: Mon, 23 Oct 2017 16:49:11 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: Mark Brown <broonie@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>,
ALSA <alsa-devel@...a-project.org>, Takashi <tiwai@...e.de>,
Pierre <pierre-louis.bossart@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>,
Shreyas NC <shreyas.nc@...el.com>, patches.audio@...el.com,
alan@...ux.intel.com,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
Sagar Dharia <sdharia@...eaurora.org>,
srinivas.kandagatla@...aro.org, plai@...eaurora.org,
Sudheer Papothi <spapothi@...eaurora.org>
Subject: Re: [PATCH 03/14] soundwire: Add Master registration
On Mon, Oct 23, 2017 at 09:24:26AM +0100, Mark Brown wrote:
> On Sat, Oct 21, 2017 at 05:05:13PM +0530, Vinod Koul wrote:
> > On Sat, Oct 21, 2017 at 10:12:30AM +0100, Mark Brown wrote:
> > > On Thu, Oct 19, 2017 at 08:33:19AM +0530, Vinod Koul wrote:
>
> > > > + mutex_lock(&bus->bus_lock);
> > > > + if (!list_empty(&bus->slaves))
> > > > + list_del(&slave->node);
>
> > > Shouldn't that be a while? Or at least warn if there's anything extra
> > > there. The code just looks very wrong as is.
>
> > I think you missed that it is called from sdw_delete_bus_master() which does
> > the loop by invoking device_for_each_child(), so this ones is supposed to
> > ensure one Slave is removed cleaned.
>
> > Let me know if i misread your comment.
>
> My point is that this code just looks so obviously wrong it doesn't
> matter if it actually works, we should refactor so people don't look at
> the code and immediately think they've spotted a bug.
Okay will check and try to refactor this part.
--
~Vinod
Powered by blists - more mailing lists