mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 06:44:36 -05:00
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>
This commit is contained in:
committed by
Mark Brown
parent
46e7ea05bf
commit
fcdf212fd9
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user