Gustavo A. R. Silva 01bdf01c7b 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>
2019-02-19 14:41:38 +01:00
..
2019-01-28 08:44:58 +01:00
2019-02-15 09:08:57 +01:00
2019-02-15 09:08:57 +01:00
2019-02-15 09:08:57 +01:00
2019-02-15 09:08:57 +01:00
2019-01-28 08:44:58 +01:00