]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: remove unused substream in macro soc_dai_mark_pop
authorHongbo Li <lihongbo22@huawei.com>
Wed, 21 Aug 2024 07:08:13 +0000 (15:08 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 29 Sep 2024 23:09:53 +0000 (01:09 +0200)
The soc_dai_mark_pop don't need substream, and also
substream is not used in this macro, so we can remove it.
This is detected by macro_checker.py script.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240821070815.2326534-4-lihongbo22@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dai.c

index 4e08892d24c62d2fb4c9fc309b6019d1044f27e8..4a1c85ad5a8d60eb1cd71773102b97551f9acd71 100644 (file)
@@ -37,7 +37,7 @@ static inline int _soc_dai_ret(const struct snd_soc_dai *dai,
  * In such case, we can update these macros.
  */
 #define soc_dai_mark_push(dai, substream, tgt) ((dai)->mark_##tgt = substream)
-#define soc_dai_mark_pop(dai, substream, tgt)  ((dai)->mark_##tgt = NULL)
+#define soc_dai_mark_pop(dai, tgt)     ((dai)->mark_##tgt = NULL)
 #define soc_dai_mark_match(dai, substream, tgt)        ((dai)->mark_##tgt == substream)
 
 /**
@@ -416,7 +416,7 @@ void snd_soc_dai_hw_free(struct snd_soc_dai *dai,
                dai->driver->ops->hw_free(substream, dai);
 
        /* remove marked substream */
-       soc_dai_mark_pop(dai, substream, hw_params);
+       soc_dai_mark_pop(dai, hw_params);
 }
 
 int snd_soc_dai_startup(struct snd_soc_dai *dai,
@@ -453,7 +453,7 @@ void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
                dai->driver->ops->shutdown(substream, dai);
 
        /* remove marked substream */
-       soc_dai_mark_pop(dai, substream, startup);
+       soc_dai_mark_pop(dai, startup);
 }
 
 int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
@@ -640,7 +640,7 @@ int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream,
                        r = soc_dai_trigger(dai, substream, cmd);
                        if (r < 0)
                                ret = r; /* use last ret */
-                       soc_dai_mark_pop(dai, substream, trigger);
+                       soc_dai_mark_pop(dai, trigger);
                }
        }
 
@@ -704,7 +704,7 @@ void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai,
                dai->driver->cops->shutdown(cstream, dai);
 
        /* remove marked cstream */
-       soc_dai_mark_pop(dai, cstream, compr_startup);
+       soc_dai_mark_pop(dai, compr_startup);
 }
 EXPORT_SYMBOL_GPL(snd_soc_dai_compr_shutdown);