Commit 8865aea
kernel: kprobes: Use struct_size()
Use struct_size() instead of hand-writing it, when allocating a structure
with a flex array.
This is less verbose.
Link: https://lore.kernel.org/all/20230725195424.3469242-1-ruanjinjie@huawei.com/
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>1 parent 2ccdd1b commit 8865aea
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2232 | 2232 | | |
2233 | 2233 | | |
2234 | 2234 | | |
2235 | | - | |
2236 | | - | |
| 2235 | + | |
2237 | 2236 | | |
2238 | 2237 | | |
2239 | 2238 | | |
| |||
2256 | 2255 | | |
2257 | 2256 | | |
2258 | 2257 | | |
2259 | | - | |
2260 | | - | |
| 2258 | + | |
2261 | 2259 | | |
2262 | 2260 | | |
2263 | 2261 | | |
| |||
0 commit comments