mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
mfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_by
Use the __counted_by compiler attribute for the "struct clk *ch_clk[]" flexible array member to improve the results of array bound sanitizers. The comments for the variables are no longer needed as it is now clear what is what. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240620-omap-usb-tll-counted_by-v1-1-77797834bb9a@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
committed by
Lee Jones
parent
6b10f1c581
commit
fa0c3667d0
@@ -98,8 +98,8 @@
|
||||
|
||||
struct usbtll_omap {
|
||||
void __iomem *base;
|
||||
int nch; /* num. of channels */
|
||||
struct clk *ch_clk[]; /* must be the last member */
|
||||
int nch;
|
||||
struct clk *ch_clk[] __counted_by(nch);
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user