diff options
author | Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> | 2022-02-08 04:56:06 +0300 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2022-02-14 20:50:57 +0300 |
commit | be24835f83234380ab6a980dc57560f1f97f67f0 (patch) | |
tree | d35b8b6b75137eb8683d5e7ec63b86d8c5c1f6c2 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 1e15aacd12386d8f1372929a3fd52db9ef3344fc (diff) | |
download | linux-be24835f83234380ab6a980dc57560f1f97f67f0.tar.xz |
wcn36xx: use struct_size over open coded arithmetic
Replace zero-length array with flexible-array member and make use
of the struct_size() helper in kmalloc(). For example:
struct wcn36xx_hal_ind_msg {
struct list_head list;
size_t msg_len;
u8 msg[];
};
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220208015606.1514022-1-chi.minghao@zte.com.cn
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions