summaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-02-18 14:21:53 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-19 14:41:38 +0100
commit01bdf01c7ba8cfdbe205c664f0fd6f9b6f586195 (patch)
treefc3a5093c2f64a7e6b70bf533b9add2309f5799e /COPYING
parent5ebf5c890324ffa5eaca579dac6913f3e29a28e3 (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 <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions