diff options
| author | Gustavo A. R. Silva <[email protected]> | 2019-05-23 10:58:00 -0500 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2019-05-28 15:51:46 +0100 |
| commit | b11c5b5e573968d69aa9fec7507de7aa8fbf76e6 (patch) | |
| tree | 736a9378d5058c8f2c69f29a8badcb0bee2b63ca /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 99afc8df8b6f2d039b1ab20d879e4721068a6c34 (diff) | |
ASoC: SOF: Use struct_size() in kmemdup()
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.
So, replace code of the following form:
sizeof(*w) + sizeof(struct sof_ipc_window_elem) * w->num_windows
with:
struct_size(w, window, w->num_windows)
Notice that variable size is unnecessary, hence it is removed.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions