* [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container
@ 2023-05-17 11:14 Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 02/12] ASoC: codecs: rt1316: " Krzysztof Kozlowski
` (12 more replies)
0 siblings, 13 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt1308-sdw.c | 5 +----
sound/soc/codecs/rt1308-sdw.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c
index 1797af824f60..313e97c94532 100644
--- a/sound/soc/codecs/rt1308-sdw.c
+++ b/sound/soc/codecs/rt1308-sdw.c
@@ -304,9 +304,6 @@ static int rt1308_update_status(struct sdw_slave *slave,
{
struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt1308->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt1308->hw_init = false;
@@ -314,7 +311,7 @@ static int rt1308_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt1308->hw_init || rt1308->status != SDW_SLAVE_ATTACHED)
+ if (rt1308->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt1308-sdw.h b/sound/soc/codecs/rt1308-sdw.h
index 04ff18fa18e2..f816c73e247e 100644
--- a/sound/soc/codecs/rt1308-sdw.h
+++ b/sound/soc/codecs/rt1308-sdw.h
@@ -159,7 +159,6 @@ struct rt1308_sdw_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct sdw_slave *sdw_slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/12] ASoC: codecs: rt1316: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 14:40 ` Mark Brown
2023-05-17 11:14 ` [PATCH 03/12] ASoC: codecs: rt1318: " Krzysztof Kozlowski
` (11 subsequent siblings)
12 siblings, 1 reply; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt1316-sdw.c | 5 +----
sound/soc/codecs/rt1316-sdw.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt1316-sdw.c b/sound/soc/codecs/rt1316-sdw.c
index 2ee5e763e345..601b76320124 100644
--- a/sound/soc/codecs/rt1316-sdw.c
+++ b/sound/soc/codecs/rt1316-sdw.c
@@ -323,9 +323,6 @@ static int rt1316_update_status(struct sdw_slave *slave,
{
struct rt1316_sdw_priv *rt1316 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt1316->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt1316->hw_init = false;
@@ -333,7 +330,7 @@ static int rt1316_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt1316->hw_init || rt1316->status != SDW_SLAVE_ATTACHED)
+ if (rt1316->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt1316-sdw.h b/sound/soc/codecs/rt1316-sdw.h
index e37121655bc1..dc1bfe40edd3 100644
--- a/sound/soc/codecs/rt1316-sdw.h
+++ b/sound/soc/codecs/rt1316-sdw.h
@@ -42,7 +42,6 @@ struct rt1316_sdw_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct sdw_slave *sdw_slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/12] ASoC: codecs: rt1318: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 02/12] ASoC: codecs: rt1316: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 04/12] ASoC: codecs: rt5682: " Krzysztof Kozlowski
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt1318-sdw.c | 5 +----
sound/soc/codecs/rt1318-sdw.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt1318-sdw.c b/sound/soc/codecs/rt1318-sdw.c
index 795accedc22c..3751d923611c 100644
--- a/sound/soc/codecs/rt1318-sdw.c
+++ b/sound/soc/codecs/rt1318-sdw.c
@@ -456,9 +456,6 @@ static int rt1318_update_status(struct sdw_slave *slave,
{
struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt1318->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt1318->hw_init = false;
@@ -466,7 +463,7 @@ static int rt1318_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt1318->hw_init || rt1318->status != SDW_SLAVE_ATTACHED)
+ if (rt1318->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt1318-sdw.h b/sound/soc/codecs/rt1318-sdw.h
index 85918c184f16..86e83d63a017 100644
--- a/sound/soc/codecs/rt1318-sdw.h
+++ b/sound/soc/codecs/rt1318-sdw.h
@@ -88,7 +88,6 @@ struct rt1318_sdw_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct sdw_slave *sdw_slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/12] ASoC: codecs: rt5682: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 02/12] ASoC: codecs: rt1316: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 03/12] ASoC: codecs: rt1318: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 05/12] ASoC: codecs: rt700: " Krzysztof Kozlowski
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt5682-sdw.c | 5 +----
sound/soc/codecs/rt5682.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c
index 6e3b5c5eced1..67404f45389f 100644
--- a/sound/soc/codecs/rt5682-sdw.c
+++ b/sound/soc/codecs/rt5682-sdw.c
@@ -500,9 +500,6 @@ static int rt5682_update_status(struct sdw_slave *slave,
{
struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt5682->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt5682->hw_init = false;
@@ -510,7 +507,7 @@ static int rt5682_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt5682->hw_init || rt5682->status != SDW_SLAVE_ATTACHED)
+ if (rt5682->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt5682.h b/sound/soc/codecs/rt5682.h
index d568c6993c33..301d1817f8f1 100644
--- a/sound/soc/codecs/rt5682.h
+++ b/sound/soc/codecs/rt5682.h
@@ -1440,7 +1440,6 @@ struct rt5682_priv {
bool disable_irq;
struct mutex calibrate_mutex;
struct sdw_slave *slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/12] ASoC: codecs: rt700: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 04/12] ASoC: codecs: rt5682: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 06/12] ASoC: codecs: rt711-sdca: " Krzysztof Kozlowski
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt700-sdw.c | 5 +----
sound/soc/codecs/rt700.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c
index 96fc5f36d0d0..ba7767bee07c 100644
--- a/sound/soc/codecs/rt700-sdw.c
+++ b/sound/soc/codecs/rt700-sdw.c
@@ -315,9 +315,6 @@ static int rt700_update_status(struct sdw_slave *slave,
{
struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt700->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt700->hw_init = false;
@@ -325,7 +322,7 @@ static int rt700_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt700->hw_init || rt700->status != SDW_SLAVE_ATTACHED)
+ if (rt700->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt700.h b/sound/soc/codecs/rt700.h
index 93c44005d38c..491774d207de 100644
--- a/sound/soc/codecs/rt700.h
+++ b/sound/soc/codecs/rt700.h
@@ -15,7 +15,6 @@ struct rt700_priv {
struct regmap *regmap;
struct regmap *sdw_regmap;
struct sdw_slave *slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/12] ASoC: codecs: rt711-sdca: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (3 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 05/12] ASoC: codecs: rt700: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 07/12] ASoC: codecs: rt711: " Krzysztof Kozlowski
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt711-sdca-sdw.c | 5 +----
sound/soc/codecs/rt711-sdca.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt711-sdca-sdw.c b/sound/soc/codecs/rt711-sdca-sdw.c
index 51f3335343e0..2c5eb28259dc 100644
--- a/sound/soc/codecs/rt711-sdca-sdw.c
+++ b/sound/soc/codecs/rt711-sdca-sdw.c
@@ -143,9 +143,6 @@ static int rt711_sdca_update_status(struct sdw_slave *slave,
{
struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt711->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt711->hw_init = false;
@@ -168,7 +165,7 @@ static int rt711_sdca_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt711->hw_init || rt711->status != SDW_SLAVE_ATTACHED)
+ if (rt711->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt711-sdca.h b/sound/soc/codecs/rt711-sdca.h
index 22076f268577..11d421e8ab2b 100644
--- a/sound/soc/codecs/rt711-sdca.h
+++ b/sound/soc/codecs/rt711-sdca.h
@@ -19,7 +19,6 @@ struct rt711_sdca_priv {
struct regmap *regmap, *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/12] ASoC: codecs: rt711: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (4 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 06/12] ASoC: codecs: rt711-sdca: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 08/12] ASoC: codecs: rt712-sdca-dmic: " Krzysztof Kozlowski
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt711-sdw.c | 5 +----
sound/soc/codecs/rt711.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c
index 4fe68bcf2a7c..b8ed3c6236d8 100644
--- a/sound/soc/codecs/rt711-sdw.c
+++ b/sound/soc/codecs/rt711-sdw.c
@@ -319,9 +319,6 @@ static int rt711_update_status(struct sdw_slave *slave,
{
struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt711->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt711->hw_init = false;
@@ -329,7 +326,7 @@ static int rt711_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt711->hw_init || rt711->status != SDW_SLAVE_ATTACHED)
+ if (rt711->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt711.h b/sound/soc/codecs/rt711.h
index b31351f11df9..491e357191f9 100644
--- a/sound/soc/codecs/rt711.h
+++ b/sound/soc/codecs/rt711.h
@@ -15,7 +15,6 @@ struct rt711_priv {
struct regmap *sdw_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/12] ASoC: codecs: rt712-sdca-dmic: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (5 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 07/12] ASoC: codecs: rt711: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 09/12] ASoC: codecs: rt712-sdca: " Krzysztof Kozlowski
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt712-sdca-dmic.c | 5 +----
sound/soc/codecs/rt712-sdca-dmic.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt712-sdca-dmic.c b/sound/soc/codecs/rt712-sdca-dmic.c
index 09807b6d6353..847198e6c07e 100644
--- a/sound/soc/codecs/rt712-sdca-dmic.c
+++ b/sound/soc/codecs/rt712-sdca-dmic.c
@@ -803,9 +803,6 @@ static int rt712_sdca_dmic_update_status(struct sdw_slave *slave,
{
struct rt712_sdca_dmic_priv *rt712 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt712->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt712->hw_init = false;
@@ -813,7 +810,7 @@ static int rt712_sdca_dmic_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt712->hw_init || rt712->status != SDW_SLAVE_ATTACHED)
+ if (rt712->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt712-sdca-dmic.h b/sound/soc/codecs/rt712-sdca-dmic.h
index 74c29677c251..110154e74efe 100644
--- a/sound/soc/codecs/rt712-sdca-dmic.h
+++ b/sound/soc/codecs/rt712-sdca-dmic.h
@@ -16,7 +16,6 @@ struct rt712_sdca_dmic_priv {
struct regmap *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/12] ASoC: codecs: rt712-sdca: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (6 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 08/12] ASoC: codecs: rt712-sdca-dmic: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 10/12] ASoC: codecs: rt715-sdca: " Krzysztof Kozlowski
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt712-sdca-sdw.c | 5 +----
sound/soc/codecs/rt712-sdca.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt712-sdca-sdw.c b/sound/soc/codecs/rt712-sdca-sdw.c
index 3f319459dfec..8f65516e7562 100644
--- a/sound/soc/codecs/rt712-sdca-sdw.c
+++ b/sound/soc/codecs/rt712-sdca-sdw.c
@@ -140,9 +140,6 @@ static int rt712_sdca_update_status(struct sdw_slave *slave,
{
struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt712->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt712->hw_init = false;
@@ -165,7 +162,7 @@ static int rt712_sdca_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt712->hw_init || rt712->status != SDW_SLAVE_ATTACHED)
+ if (rt712->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt712-sdca.h b/sound/soc/codecs/rt712-sdca.h
index c6a94a23f46e..ff79e03118ce 100644
--- a/sound/soc/codecs/rt712-sdca.h
+++ b/sound/soc/codecs/rt712-sdca.h
@@ -20,7 +20,6 @@ struct rt712_sdca_priv {
struct regmap *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/12] ASoC: codecs: rt715-sdca: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (7 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 09/12] ASoC: codecs: rt712-sdca: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 11/12] ASoC: codecs: rt715: " Krzysztof Kozlowski
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt715-sdca-sdw.c | 5 +----
sound/soc/codecs/rt715-sdca.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt715-sdca-sdw.c b/sound/soc/codecs/rt715-sdca-sdw.c
index 38a82e4e2f95..7e5ddce8097d 100644
--- a/sound/soc/codecs/rt715-sdca-sdw.c
+++ b/sound/soc/codecs/rt715-sdca-sdw.c
@@ -121,14 +121,11 @@ static int rt715_sdca_update_status(struct sdw_slave *slave,
{
struct rt715_sdca_priv *rt715 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt715->status = status;
-
/*
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt715->hw_init || rt715->status != SDW_SLAVE_ATTACHED)
+ if (rt715->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt715-sdca.h b/sound/soc/codecs/rt715-sdca.h
index 7577f3151934..e5d6928ecaba 100644
--- a/sound/soc/codecs/rt715-sdca.h
+++ b/sound/soc/codecs/rt715-sdca.h
@@ -24,7 +24,6 @@ struct rt715_sdca_priv {
int dbg_nid;
int dbg_vid;
int dbg_payload;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 11/12] ASoC: codecs: rt715: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (8 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 10/12] ASoC: codecs: rt715-sdca: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 12/12] ASoC: codecs: rt722-sdca: " Krzysztof Kozlowski
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt715-sdw.c | 4 +---
sound/soc/codecs/rt715.h | 1 -
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c
index 5ffe9a00dfd8..6db87442b783 100644
--- a/sound/soc/codecs/rt715-sdw.c
+++ b/sound/soc/codecs/rt715-sdw.c
@@ -417,13 +417,11 @@ static int rt715_update_status(struct sdw_slave *slave,
{
struct rt715_priv *rt715 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt715->status = status;
/*
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt715->hw_init || rt715->status != SDW_SLAVE_ATTACHED)
+ if (rt715->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt715.h b/sound/soc/codecs/rt715.h
index 17a8d041c1c3..12a0ae656d09 100644
--- a/sound/soc/codecs/rt715.h
+++ b/sound/soc/codecs/rt715.h
@@ -18,7 +18,6 @@ struct rt715_priv {
int dbg_nid;
int dbg_vid;
int dbg_payload;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 12/12] ASoC: codecs: rt722-sdca: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (9 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 11/12] ASoC: codecs: rt715: " Krzysztof Kozlowski
@ 2023-05-17 11:14 ` Krzysztof Kozlowski
2023-05-17 13:27 ` [PATCH 01/12] ASoC: codecs: rt1308: " Pierre-Louis Bossart
2023-05-18 17:20 ` Mark Brown
12 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 11:14 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
Cc: Krzysztof Kozlowski
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/codecs/rt722-sdca-sdw.c | 5 +----
sound/soc/codecs/rt722-sdca.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index 0a791a14215e..bfb2dac6bfee 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -163,9 +163,6 @@ static int rt722_sdca_update_status(struct sdw_slave *slave,
{
struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev);
- /* Update the status */
- rt722->status = status;
-
if (status == SDW_SLAVE_UNATTACHED)
rt722->hw_init = false;
@@ -188,7 +185,7 @@ static int rt722_sdca_update_status(struct sdw_slave *slave,
* Perform initialization only if slave status is present and
* hw_init flag is false
*/
- if (rt722->hw_init || rt722->status != SDW_SLAVE_ATTACHED)
+ if (rt722->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
/* perform I/O transfers required for Slave initialization */
diff --git a/sound/soc/codecs/rt722-sdca.h b/sound/soc/codecs/rt722-sdca.h
index 5bc6184d09aa..44af8901352e 100644
--- a/sound/soc/codecs/rt722-sdca.h
+++ b/sound/soc/codecs/rt722-sdca.h
@@ -20,7 +20,6 @@ struct rt722_sdca_priv {
struct regmap *mbq_regmap;
struct snd_soc_component *component;
struct sdw_slave *slave;
- enum sdw_slave_status status;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (10 preceding siblings ...)
2023-05-17 11:14 ` [PATCH 12/12] ASoC: codecs: rt722-sdca: " Krzysztof Kozlowski
@ 2023-05-17 13:27 ` Pierre-Louis Bossart
2023-05-18 17:20 ` Mark Brown
12 siblings, 0 replies; 15+ messages in thread
From: Pierre-Louis Bossart @ 2023-05-17 13:27 UTC (permalink / raw)
To: Krzysztof Kozlowski, Oder Chiou, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
On 5/17/23 06:14, Krzysztof Kozlowski wrote:
> Driver in its update status callback stores Soundwire device status in
> state container but it never uses it later. Simplify the code a bit.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Good cleanup, not sure why we added this internal status many moons ago.
There's already a slave->status that's updated in
drivers/soundwire/bus.c, fewer state variables are better and in this
case there's no reason to keep a value that could be stale.
For the series
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> sound/soc/codecs/rt1308-sdw.c | 5 +----
> sound/soc/codecs/rt1308-sdw.h | 1 -
> 2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c
> index 1797af824f60..313e97c94532 100644
> --- a/sound/soc/codecs/rt1308-sdw.c
> +++ b/sound/soc/codecs/rt1308-sdw.c
> @@ -304,9 +304,6 @@ static int rt1308_update_status(struct sdw_slave *slave,
> {
> struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(&slave->dev);
>
> - /* Update the status */
> - rt1308->status = status;
> -
> if (status == SDW_SLAVE_UNATTACHED)
> rt1308->hw_init = false;
>
> @@ -314,7 +311,7 @@ static int rt1308_update_status(struct sdw_slave *slave,
> * Perform initialization only if slave status is present and
> * hw_init flag is false
> */
> - if (rt1308->hw_init || rt1308->status != SDW_SLAVE_ATTACHED)
> + if (rt1308->hw_init || status != SDW_SLAVE_ATTACHED)
> return 0;
>
> /* perform I/O transfers required for Slave initialization */
> diff --git a/sound/soc/codecs/rt1308-sdw.h b/sound/soc/codecs/rt1308-sdw.h
> index 04ff18fa18e2..f816c73e247e 100644
> --- a/sound/soc/codecs/rt1308-sdw.h
> +++ b/sound/soc/codecs/rt1308-sdw.h
> @@ -159,7 +159,6 @@ struct rt1308_sdw_priv {
> struct snd_soc_component *component;
> struct regmap *regmap;
> struct sdw_slave *sdw_slave;
> - enum sdw_slave_status status;
> struct sdw_bus_params params;
> bool hw_init;
> bool first_hw_init;
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 02/12] ASoC: codecs: rt1316: do not store status in state container
2023-05-17 11:14 ` [PATCH 02/12] ASoC: codecs: rt1316: " Krzysztof Kozlowski
@ 2023-05-17 14:40 ` Mark Brown
0 siblings, 0 replies; 15+ messages in thread
From: Mark Brown @ 2023-05-17 14:40 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Oder Chiou, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
On Wed, May 17, 2023 at 01:14:06PM +0200, Krzysztof Kozlowski wrote:
> Driver in its update status callback stores Soundwire device status in
> state container but it never uses it later. Simplify the code a bit.
Please provide cover letters when sending patch serieses.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
` (11 preceding siblings ...)
2023-05-17 13:27 ` [PATCH 01/12] ASoC: codecs: rt1308: " Pierre-Louis Bossart
@ 2023-05-18 17:20 ` Mark Brown
12 siblings, 0 replies; 15+ messages in thread
From: Mark Brown @ 2023-05-18 17:20 UTC (permalink / raw)
To: Oder Chiou, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel, Krzysztof Kozlowski
On Wed, 17 May 2023 13:14:05 +0200, Krzysztof Kozlowski wrote:
> Driver in its update status callback stores Soundwire device status in
> state container but it never uses it later. Simplify the code a bit.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/12] ASoC: codecs: rt1308: do not store status in state container
commit: cc3ff544a296b5b4bb021f4dc415b53a6955b980
[02/12] ASoC: codecs: rt1316: do not store status in state container
commit: 70207b95b2245502496443475c9fc4eb72ba3b66
[03/12] ASoC: codecs: rt1318: do not store status in state container
commit: 28eb1e4224c3b3ff29fe4c29bcdc011d3a0ffd07
[04/12] ASoC: codecs: rt5682: do not store status in state container
commit: 758665b15acc1adb21a833c6456746ffbce07ed7
[05/12] ASoC: codecs: rt700: do not store status in state container
commit: 9564c9f691128bc2dc69de02f7eed205d9b2513f
[06/12] ASoC: codecs: rt711-sdca: do not store status in state container
commit: 8322947e9228ef7f8c3dd13822d32c491f9488e7
[07/12] ASoC: codecs: rt711: do not store status in state container
commit: 22e15c18b4a91c71bf66de06187b8a3199bb8cad
[08/12] ASoC: codecs: rt712-sdca-dmic: do not store status in state container
commit: d7a79616fc723305094fd7391085428b7a893636
[09/12] ASoC: codecs: rt712-sdca: do not store status in state container
commit: 5cd02f96f49a7e6d2f8b96ddc42092776b554873
[10/12] ASoC: codecs: rt715-sdca: do not store status in state container
commit: cda72c89d082f5953fab9948fc1212ca0df11d96
[11/12] ASoC: codecs: rt715: do not store status in state container
commit: 0315dac5406c9c0b8e334195aa01c4ec155adf47
[12/12] ASoC: codecs: rt722-sdca: do not store status in state container
commit: b932f21f6678659bd434c0d47e3bebc94bae0a51
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-05-18 17:21 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-17 11:14 [PATCH 01/12] ASoC: codecs: rt1308: do not store status in state container Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 02/12] ASoC: codecs: rt1316: " Krzysztof Kozlowski
2023-05-17 14:40 ` Mark Brown
2023-05-17 11:14 ` [PATCH 03/12] ASoC: codecs: rt1318: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 04/12] ASoC: codecs: rt5682: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 05/12] ASoC: codecs: rt700: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 06/12] ASoC: codecs: rt711-sdca: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 07/12] ASoC: codecs: rt711: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 08/12] ASoC: codecs: rt712-sdca-dmic: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 09/12] ASoC: codecs: rt712-sdca: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 10/12] ASoC: codecs: rt715-sdca: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 11/12] ASoC: codecs: rt715: " Krzysztof Kozlowski
2023-05-17 11:14 ` [PATCH 12/12] ASoC: codecs: rt722-sdca: " Krzysztof Kozlowski
2023-05-17 13:27 ` [PATCH 01/12] ASoC: codecs: rt1308: " Pierre-Louis Bossart
2023-05-18 17:20 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).