Commit b500127e authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Vinod Koul

soundwire: bus: uniquify dev_err() for SCP_INT access

We have multiple cases where we read/write SCP_INT registers, but the
same error message in all cases. Add a distinct error message for each
case to help debug.
Reported-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210302091122.13952-6-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent af7254b4
...@@ -1636,7 +1636,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1636,7 +1636,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
ret = sdw_read_no_pm(slave, SDW_SCP_INT1); ret = sdw_read_no_pm(slave, SDW_SCP_INT1);
if (ret < 0) { if (ret < 0) {
dev_err(&slave->dev, dev_err(&slave->dev,
"SDW_SCP_INT1 read failed:%d\n", ret); "SDW_SCP_INT1 recheck read failed:%d\n", ret);
goto io_err; goto io_err;
} }
_buf = ret; _buf = ret;
...@@ -1644,7 +1644,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1644,7 +1644,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
ret = sdw_nread_no_pm(slave, SDW_SCP_INTSTAT2, 2, _buf2); ret = sdw_nread_no_pm(slave, SDW_SCP_INTSTAT2, 2, _buf2);
if (ret < 0) { if (ret < 0) {
dev_err(&slave->dev, dev_err(&slave->dev,
"SDW_SCP_INT2/3 read failed:%d\n", ret); "SDW_SCP_INT2/3 recheck read failed:%d\n", ret);
goto io_err; goto io_err;
} }
...@@ -1652,7 +1652,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1652,7 +1652,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
ret = sdw_read_no_pm(slave, SDW_DP0_INT); ret = sdw_read_no_pm(slave, SDW_DP0_INT);
if (ret < 0) { if (ret < 0) {
dev_err(&slave->dev, dev_err(&slave->dev,
"SDW_DP0_INT read failed:%d\n", ret); "SDW_DP0_INT recheck read failed:%d\n", ret);
goto io_err; goto io_err;
} }
sdca_cascade = ret & SDW_DP0_SDCA_CASCADE; sdca_cascade = ret & SDW_DP0_SDCA_CASCADE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment