* [PATCH] ASoC: SDCA: Fix uninitialized use of name in sdca_irq_populate()
@ 2025-07-16 3:34 Nathan Chancellor
2025-07-16 8:25 ` Charles Keepax
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2025-07-16 3:34 UTC (permalink / raw)
To: Charles Keepax, Maciej Strozek, Bard Liao, Pierre-Louis Bossart,
Mark Brown
Cc: linux-sound, patches, llvm, patches, Nathan Chancellor
After a recent change in clang to strengthen uninitialized warnings [1],
it points out that name is used uninitialized in sdca_irq_populate():
sound/soc/sdca/sdca_interrupts.c:388:6: error: variable 'name' is uninitialized when used here [-Werror,-Wuninitialized]
388 | name, ret);
| ^~~~
Remove name and use the name member in the interrupt variable, as that
is the proper string to print.
Fixes: b126394d9ec6 ("ASoC: SDCA: Generic interrupt support")
Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
sound/soc/sdca/sdca_interrupts.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
index 2f85fcc6e544..6df3b1a4d599 100644
--- a/sound/soc/sdca/sdca_interrupts.c
+++ b/sound/soc/sdca/sdca_interrupts.c
@@ -342,7 +342,6 @@ int sdca_irq_populate(struct sdca_function_data *function,
int irq = control->interrupt_position;
struct sdca_interrupt *interrupt;
irq_handler_t handler;
- const char *name;
int ret;
if (irq == SDCA_NO_INTERRUPT) {
@@ -385,7 +384,7 @@ int sdca_irq_populate(struct sdca_function_data *function,
handler, interrupt);
if (ret) {
dev_err(dev, "failed to request irq %s: %d\n",
- name, ret);
+ interrupt->name, ret);
return ret;
}
}
---
base-commit: 6bd62e3ffe865ddcd9866856f7112dd3a7484b65
change-id: 20250715-sdca_interrupts-fix-const-uninit-warning-c4db91e0ca0a
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: SDCA: Fix uninitialized use of name in sdca_irq_populate()
2025-07-16 3:34 [PATCH] ASoC: SDCA: Fix uninitialized use of name in sdca_irq_populate() Nathan Chancellor
@ 2025-07-16 8:25 ` Charles Keepax
2025-07-16 20:02 ` Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: Charles Keepax @ 2025-07-16 8:25 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Maciej Strozek, Bard Liao, Pierre-Louis Bossart, Mark Brown,
linux-sound, patches, llvm, patches
On Tue, Jul 15, 2025 at 08:34:21PM -0700, Nathan Chancellor wrote:
> After a recent change in clang to strengthen uninitialized warnings [1],
> it points out that name is used uninitialized in sdca_irq_populate():
>
> sound/soc/sdca/sdca_interrupts.c:388:6: error: variable 'name' is uninitialized when used here [-Werror,-Wuninitialized]
> 388 | name, ret);
> | ^~~~
>
> Remove name and use the name member in the interrupt variable, as that
> is the proper string to print.
>
> Fixes: b126394d9ec6 ("ASoC: SDCA: Generic interrupt support")
> Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1]
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
A fix is already pending for this one:
https://lore.kernel.org/linux-sound/20250715151723.2964336-3-ckeepax@opensource.cirrus.com/T/#u
Although they are identical so don't mind which gets merged :-)
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: SDCA: Fix uninitialized use of name in sdca_irq_populate()
2025-07-16 8:25 ` Charles Keepax
@ 2025-07-16 20:02 ` Nathan Chancellor
0 siblings, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2025-07-16 20:02 UTC (permalink / raw)
To: Charles Keepax
Cc: Maciej Strozek, Bard Liao, Pierre-Louis Bossart, Mark Brown,
linux-sound, patches, llvm, patches
On Wed, Jul 16, 2025 at 09:25:20AM +0100, Charles Keepax wrote:
> On Tue, Jul 15, 2025 at 08:34:21PM -0700, Nathan Chancellor wrote:
> > After a recent change in clang to strengthen uninitialized warnings [1],
> > it points out that name is used uninitialized in sdca_irq_populate():
> >
> > sound/soc/sdca/sdca_interrupts.c:388:6: error: variable 'name' is uninitialized when used here [-Werror,-Wuninitialized]
> > 388 | name, ret);
> > | ^~~~
> >
> > Remove name and use the name member in the interrupt variable, as that
> > is the proper string to print.
> >
> > Fixes: b126394d9ec6 ("ASoC: SDCA: Generic interrupt support")
> > Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1]
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > ---
>
> A fix is already pending for this one:
>
> https://lore.kernel.org/linux-sound/20250715151723.2964336-3-ckeepax@opensource.cirrus.com/T/#u
>
> Although they are identical so don't mind which gets merged :-)
Whoops, I should have checked for duplicates like I usually do...
I see Mark has merged your change now so we are all good here.
https:///git.kernel.org/broonie/sound/c/71562278a189af2ca202eafa0ab71a9b68469207
Cheers,
Nathan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-16 20:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 3:34 [PATCH] ASoC: SDCA: Fix uninitialized use of name in sdca_irq_populate() Nathan Chancellor
2025-07-16 8:25 ` Charles Keepax
2025-07-16 20:02 ` Nathan Chancellor
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).