Re: [PATCH v2 2/2] soundwire: qcom: do not send status of device 0 during alert

From: Pierre-Louis Bossart
Date: Fri Sep 16 2022 - 10:24:59 EST




On 9/16/22 15:53, Srinivas Kandagatla wrote:
> Device0 can not be in alter status. And for consistency reasons do not

typo: alert

> send status of device0 to core.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>

> ---
> drivers/soundwire/qcom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index d3ce580cdeaf..a04a8863b228 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -428,7 +428,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl)
>
> ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val);
>
> - for (dev_num = 0; dev_num <= SDW_MAX_DEVICES; dev_num++) {
> + for (dev_num = 1; dev_num <= SDW_MAX_DEVICES; dev_num++) {
> status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ));
>
> if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) {