diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-04-15 11:03:55 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-04-15 12:36:04 +0100 |
| commit | fcdf212fd9b36c299d90229e9546c077db2215ce (patch) | |
| tree | b4ee75791cb3618f499a81f49fa309cce60bf831 /include | |
| parent | ASoC: cs-amp-lib: Replace offsetof() with struct_size() (diff) | |
| download | linux-fcdf212fd9b36c299d90229e9546c077db2215ce.tar.gz linux-fcdf212fd9b36c299d90229e9546c077db2215ce.zip | |
ASoC: cs-amp-lib: Annotate struct cirrus_amp_efi_data with __counted_by()
Add the __counted_by() compiler attribute to the flexible array member
'data' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250415090354.92211-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/cs-amp-lib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/cs-amp-lib.h b/include/sound/cs-amp-lib.h index f481148735e1..5459c221badf 100644 --- a/include/sound/cs-amp-lib.h +++ b/include/sound/cs-amp-lib.h @@ -23,7 +23,7 @@ struct cirrus_amp_cal_data { struct cirrus_amp_efi_data { u32 size; u32 count; - struct cirrus_amp_cal_data data[]; + struct cirrus_amp_cal_data data[] __counted_by(count); } __packed; /** |
