Re: [PATCH] ASoC: SOF: Intel: Initialize chip in hda_sdw_check_wakeen_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/9/23 13:12, Nathan Chancellor wrote:
> Clang warns (or errors with CONFIG_WERROR):
> 
>   sound/soc/sof/intel/hda.c:423:6: error: variable 'chip' is uninitialized when used here [-Werror,-Wuninitialized]
>     423 |         if (chip && chip->check_sdw_wakeen_irq)
>         |             ^~~~
>   sound/soc/sof/intel/hda.c:418:39: note: initialize the variable 'chip' to silence this warning
>     418 |         const struct sof_intel_dsp_desc *chip;
>         |                                              ^
>         |                                               = NULL
>   1 error generated.
> 
> Add the missing initialization, following the pattern of the other irq
> functions.
> 
> Fixes: 9362ab78f175 ("ASoC: SOF: Intel: add abstraction for SoundWire wake-ups")
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>

Indeed, thanks Nathan for flagging this obvious mistake. I must have
done something wrong when extracting the patches.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>

That said, we DO compile with clang and there was no warning
https://github.com/thesofproject/linux/actions/runs/5542372669/job/15010818307

Is this dependent on a specific version of clang? I'd like to make sure
our tools and tests are updated.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux