mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, vkoul@kernel.org
Cc: yung-chuan.liao@linux.intel.com, sanyog.r.kale@intel.com,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH] soundwire: bus: Fix device found flag correctly
Date: Mon, 8 Mar 2021 09:51:44 -0600	[thread overview]
Message-ID: <1e7cadc4-7da8-712a-7ebb-b977254d496f@linux.intel.com> (raw)
In-Reply-To: <20210308113752.19661-1-srinivas.kandagatla@linaro.org>



On 3/8/21 5:37 AM, Srinivas Kandagatla wrote:
> found flag that is used to indicate SoundWire device on the bus is
> not reset correctly after one iteration, this could miss adding devices
> that are enumerated on the bus but on in device list.

typo? did you mean "enumerated on the bus but not on device list"?

if yes, the first part is ambiguous in its wording, the enumeration 
completes by programming a device number. At this point the device is 
only 'attached'.

The fix is correct otherwise, please add my tag if you change the commit 
message in a v2.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>


> 
> Fixes: d52d7a1be02c ("soundwire: Add Slave status handling helpers")
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>   drivers/soundwire/bus.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
> index a9ab4a6264e0..188e391c5a83 100644
> --- a/drivers/soundwire/bus.c
> +++ b/drivers/soundwire/bus.c
> @@ -712,7 +712,7 @@ static int sdw_program_device_num(struct sdw_bus *bus)
>   	struct sdw_slave *slave, *_s;
>   	struct sdw_slave_id id;
>   	struct sdw_msg msg;
> -	bool found = false;
> +	bool found;
>   	int count = 0, ret;
>   	u64 addr;
>   
> @@ -744,6 +744,7 @@ static int sdw_program_device_num(struct sdw_bus *bus)
>   
>   		sdw_extract_slave_id(bus, addr, &id);
>   
> +		found = false;
>   		/* Now compare with entries */
>   		list_for_each_entry_safe(slave, _s, &bus->slaves, node) {
>   			if (sdw_compare_devid(slave, id) == 0) {
> 

      reply	other threads:[~2021-03-08 16:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 11:37 Srinivas Kandagatla
2021-03-08 15:51 ` Pierre-Louis Bossart [this message]

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=1e7cadc4-7da8-712a-7ebb-b977254d496f@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /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

all inboxes | Powered by JetHome®