alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler()
@ 2022-07-25 18:05 Nathan Chancellor
  2022-07-25 20:30 ` Tom Rix
  2022-07-26 13:07 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2022-07-25 18:05 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: alsa-devel, Venkata Prasad Potturu, Tom Rix, llvm,
	Nick Desaulniers, linux-kernel, Nathan Chancellor,
	Vijendar Mukunda

Clang warns:

  ../sound/soc/amd/acp/acp-platform.c:117:19: error: variable 'ext_intr_stat1' is uninitialized when used here [-Werror,-Wuninitialized]
                          if (stream && (ext_intr_stat1 & stream->irq_bit)) {
                                         ^~~~~~~~~~~~~~
  ../sound/soc/amd/acp/acp-platform.c:97:35: note: initialize the variable 'ext_intr_stat1' to silence this warning
          u32 ext_intr_stat, ext_intr_stat1, i;
                                           ^
                                            = 0
  1 error generated.

The variable was not properly renamed, correct it to resolve the
warning.

Fixes: 93f53881473c ("ASoC: amd: acp: Modify local variables name to generic")
Link: https://github.com/ClangBuiltLinux/linux/issues/1675
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 sound/soc/amd/acp/acp-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
index 10730d33c3b0..f561d39b33e2 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -100,7 +100,7 @@ static irqreturn_t i2s_irq_handler(int irq, void *data)
 		return IRQ_NONE;
 
 	if (adata->rsrc->no_of_ctrls == 2)
-		ext_intr_stat = readl(ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1)));
+		ext_intr_stat1 = readl(ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1)));
 
 	ext_intr_stat = readl(ACP_EXTERNAL_INTR_STAT(adata, rsrc->irqp_used));
 

base-commit: be0aa8d4b0fcb4532bf7973141e911998ab39508
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler()
  2022-07-25 18:05 [PATCH] ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler() Nathan Chancellor
@ 2022-07-25 20:30 ` Tom Rix
  2022-07-26 13:07 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rix @ 2022-07-25 20:30 UTC (permalink / raw)
  To: Nathan Chancellor, Liam Girdwood, Mark Brown
  Cc: alsa-devel, Venkata Prasad Potturu, llvm, Nick Desaulniers,
	linux-kernel, Vijendar Mukunda


On 7/25/22 11:05 AM, Nathan Chancellor wrote:
> Clang warns:
>
>    ../sound/soc/amd/acp/acp-platform.c:117:19: error: variable 'ext_intr_stat1' is uninitialized when used here [-Werror,-Wuninitialized]
>                            if (stream && (ext_intr_stat1 & stream->irq_bit)) {
>                                           ^~~~~~~~~~~~~~
>    ../sound/soc/amd/acp/acp-platform.c:97:35: note: initialize the variable 'ext_intr_stat1' to silence this warning
>            u32 ext_intr_stat, ext_intr_stat1, i;
>                                             ^
>                                              = 0
>    1 error generated.
>
> The variable was not properly renamed, correct it to resolve the
> warning.
>
> Fixes: 93f53881473c ("ASoC: amd: acp: Modify local variables name to generic")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1675
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Tom Rix <trix@redhat.com>
> ---
>   sound/soc/amd/acp/acp-platform.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
> index 10730d33c3b0..f561d39b33e2 100644
> --- a/sound/soc/amd/acp/acp-platform.c
> +++ b/sound/soc/amd/acp/acp-platform.c
> @@ -100,7 +100,7 @@ static irqreturn_t i2s_irq_handler(int irq, void *data)
>   		return IRQ_NONE;
>   
>   	if (adata->rsrc->no_of_ctrls == 2)
> -		ext_intr_stat = readl(ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1)));
> +		ext_intr_stat1 = readl(ACP_EXTERNAL_INTR_STAT(adata, (rsrc->irqp_used - 1)));
>   
>   	ext_intr_stat = readl(ACP_EXTERNAL_INTR_STAT(adata, rsrc->irqp_used));
>   
>
> base-commit: be0aa8d4b0fcb4532bf7973141e911998ab39508


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler()
  2022-07-25 18:05 [PATCH] ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler() Nathan Chancellor
  2022-07-25 20:30 ` Tom Rix
@ 2022-07-26 13:07 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-07-26 13:07 UTC (permalink / raw)
  To: Nathan Chancellor, Liam Girdwood
  Cc: alsa-devel, Venkata Prasad Potturu, Tom Rix, llvm,
	Nick Desaulniers, linux-kernel, Vijendar Mukunda

On Mon, 25 Jul 2022 11:05:39 -0700, Nathan Chancellor wrote:
> Clang warns:
> 
>   ../sound/soc/amd/acp/acp-platform.c:117:19: error: variable 'ext_intr_stat1' is uninitialized when used here [-Werror,-Wuninitialized]
>                           if (stream && (ext_intr_stat1 & stream->irq_bit)) {
>                                          ^~~~~~~~~~~~~~
>   ../sound/soc/amd/acp/acp-platform.c:97:35: note: initialize the variable 'ext_intr_stat1' to silence this warning
>           u32 ext_intr_stat, ext_intr_stat1, i;
>                                            ^
>                                             = 0
>   1 error generated.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler()
      commit: d81677410f172c2b946393c09b46ff9e8dc1b6ec

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] 3+ messages in thread

end of thread, other threads:[~2022-07-26 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25 18:05 [PATCH] ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler() Nathan Chancellor
2022-07-25 20:30 ` Tom Rix
2022-07-26 13:07 ` 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).