diff options
| author | Gustavo A. R. Silva <[email protected]> | 2019-02-18 14:21:53 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-02-19 14:41:38 +0100 |
| commit | 01bdf01c7ba8cfdbe205c664f0fd6f9b6f586195 (patch) | |
| tree | fc3a5093c2f64a7e6b70bf533b9add2309f5799e /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
| parent | 5ebf5c890324ffa5eaca579dac6913f3e29a28e3 (diff) | |
usb: wusbcore: wa-xfer: use struct_size() helper
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, change the following form:
sizeof(*packet_desc) + (sizeof(packet_desc->PacketLength[0]) * seg->isoc_frame_count)
to :
struct_size(packet_status, PacketStatus, seg->isoc_frame_count);
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions