ALT Linux kernel packages development
 help / color / mirror / Atom feed
From: kovalev@altlinux.org
To: devel-kernel@lists.altlinux.org
Subject: [d-kernel] [PATCH 7/7] ASoC: codecs: fix warning for the es8316 codec build
Date: Wed,  6 Dec 2023 19:44:13 +0300
Message-ID: <20231206164413.126554-8-kovalev@altlinux.org> (raw)
In-Reply-To: <20231206164413.126554-1-kovalev@altlinux.org>

From: Vasiliy Kovalev <kovalev@altlinux.org>

sound/soc/codecs/es8316.c:517:2: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
  517 |  static u8 only_one = 0;
      |  ^~~~~~

Fixes: f63b2a193575f82 ("ASoC: AMD: add ACP machine driver for ES8336")
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
---
 sound/soc/codecs/es8316.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index f6e3f0e7e56583..754d9e62a7e6a2 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -460,6 +460,8 @@ static int es8316_pcm_startup(struct snd_pcm_substream *substream,
 	return 0;
 }
 
+static u8 flag_print_div_once = 0;
+
 static int es8316_pcm_hw_params(struct snd_pcm_substream *substream,
 				struct snd_pcm_hw_params *params,
 				struct snd_soc_dai *dai)
@@ -513,9 +515,8 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 	}
 
-	static u8 only_one = 0;
-	if (!only_one) {
-		only_one = 1;
+	if (!flag_print_div_once) {
+		flag_print_div_once = 1;
 		if (mclk_div == 2)
 			dev_info(component->dev, "Activating MCLK div by 2\n");
 
-- 
2.33.8



  parent reply	other threads:[~2023-12-06 16:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 16:44 [d-kernel] [PATCH 0/7] ASoC: Intel/codecs: fix support es83x6 codecs drivers kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 1/7] ASoC: Intel: update strategy UCM components for es8336 driver kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 2/7] ASoC: Intel: add more DMI info into sof-essx8336 driver kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 3/7] ASoC: codecs: downgrade es8326 codec to stable state kovalev
2023-12-06 22:05   ` Vitaly Chikunov
2023-12-06 16:44 ` [d-kernel] [PATCH 4/7] ASoC: Intel: add UCM component for es8336 headset mic + Dmic inverse topology kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 5/7] ASoC: Intel: sof-essx8336 - add DMI info of the HUAWEI BOD-WXX9-PCB-B4 laptop kovalev
2023-12-06 16:44 ` [d-kernel] [PATCH 6/7] ASoC: Intel: sof-essx8336 - add DMI info of the Kraftway ACCORD S15T laptop kovalev
2023-12-06 16:44 ` kovalev [this message]
2023-12-06 22:06 ` [d-kernel] [PATCH 0/7] ASoC: Intel/codecs: fix support es83x6 codecs drivers Vitaly Chikunov

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=20231206164413.126554-8-kovalev@altlinux.org \
    --to=kovalev@altlinux.org \
    --cc=devel-kernel@lists.altlinux.org \
    /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

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git