* [PATCH][next] ASoC: Intel: Skylake: Avoid the use of one-element array
@ 2020-07-17 21:55 Gustavo A. R. Silva
2020-07-20 9:11 ` Amadeusz Sławiński
2020-07-20 14:38 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2020-07-17 21:55 UTC (permalink / raw)
To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva
One-element arrays are being deprecated[1]. Replace the one-element
array with a simple value type 'u8 reserved'[2], once it seems this
is just a placeholder for alignment.
[1] https://github.com/KSPP/linux/issues/79
[2] https://github.com/KSPP/linux/issues/86
Tested-by: kernel test robot <lkp@intel.com>
Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/skylake-20200717.md
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
sound/soc/intel/skylake/skl-topology.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 9889f728752c..5e93ad85e06d 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -97,7 +97,7 @@ struct skl_audio_data_format {
u8 number_of_channels;
u8 valid_bit_depth;
u8 sample_type;
- u8 reserved[1];
+ u8 reserved;
} __packed;
struct skl_base_cfg {
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] ASoC: Intel: Skylake: Avoid the use of one-element array
2020-07-17 21:55 [PATCH][next] ASoC: Intel: Skylake: Avoid the use of one-element array Gustavo A. R. Silva
@ 2020-07-20 9:11 ` Amadeusz Sławiński
2020-07-20 14:38 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Amadeusz Sławiński @ 2020-07-20 9:11 UTC (permalink / raw)
To: Gustavo A. R. Silva, Cezary Rojewski, Pierre-Louis Bossart,
Liam Girdwood, Jie Yang, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: alsa-devel, linux-kernel
Looks ok and tests on our side also pass.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
On 7/17/2020 11:55 PM, Gustavo A. R. Silva wrote:
> One-element arrays are being deprecated[1]. Replace the one-element
> array with a simple value type 'u8 reserved'[2], once it seems this
> is just a placeholder for alignment.
>
> [1] https://github.com/KSPP/linux/issues/79
> [2] https://github.com/KSPP/linux/issues/86
>
> Tested-by: kernel test robot <lkp@intel.com>
> Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/skylake-20200717.md
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> sound/soc/intel/skylake/skl-topology.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
> index 9889f728752c..5e93ad85e06d 100644
> --- a/sound/soc/intel/skylake/skl-topology.h
> +++ b/sound/soc/intel/skylake/skl-topology.h
> @@ -97,7 +97,7 @@ struct skl_audio_data_format {
> u8 number_of_channels;
> u8 valid_bit_depth;
> u8 sample_type;
> - u8 reserved[1];
> + u8 reserved;
> } __packed;
>
> struct skl_base_cfg {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] ASoC: Intel: Skylake: Avoid the use of one-element array
2020-07-17 21:55 [PATCH][next] ASoC: Intel: Skylake: Avoid the use of one-element array Gustavo A. R. Silva
2020-07-20 9:11 ` Amadeusz Sławiński
@ 2020-07-20 14:38 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-07-20 14:38 UTC (permalink / raw)
To: Jaroslav Kysela, Pierre-Louis Bossart, Jie Yang,
Gustavo A. R. Silva, Takashi Iwai, Cezary Rojewski, Liam Girdwood
Cc: linux-kernel, alsa-devel
On Fri, 17 Jul 2020 16:55:00 -0500, Gustavo A. R. Silva wrote:
> One-element arrays are being deprecated[1]. Replace the one-element
> array with a simple value type 'u8 reserved'[2], once it seems this
> is just a placeholder for alignment.
>
> [1] https://github.com/KSPP/linux/issues/79
> [2] https://github.com/KSPP/linux/issues/86
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: Skylake: Avoid the use of one-element array
commit: 23f8d964f15a21991a166f0d1a7cf3cf8e4bfc9b
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:[~2020-07-20 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17 21:55 [PATCH][next] ASoC: Intel: Skylake: Avoid the use of one-element array Gustavo A. R. Silva
2020-07-20 9:11 ` Amadeusz Sławiński
2020-07-20 14:38 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox