summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-03-18 12:10:37 -0700
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-03-19 23:55:27 +0100
commite61af3ca893363838f263f3528476f6e1faed9aa (patch)
tree88d136b6d9fc2b226ea44dddc61f6cf4c9dff902 /include/linux
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff)
downloadlwn-e61af3ca893363838f263f3528476f6e1faed9aa.tar.gz
lwn-e61af3ca893363838f263f3528476f6e1faed9aa.zip
hsi: hsi_core: use kzalloc_flex
Simplifies allocations by using a flexible array member in this struct. Add __counted_by to get extra runtime analysis. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260318191037.5661-1-rosenp@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hsi/hsi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hsi/hsi.h b/include/linux/hsi/hsi.h
index 6ca92bff02c6..ea6bef9b6012 100644
--- a/include/linux/hsi/hsi.h
+++ b/include/linux/hsi/hsi.h
@@ -271,7 +271,7 @@ struct hsi_controller {
struct module *owner;
unsigned int id;
unsigned int num_ports;
- struct hsi_port **port;
+ struct hsi_port *port[] __counted_by(num_ports);
};
#define to_hsi_controller(dev) container_of(dev, struct hsi_controller, device)