can: esd_usb: Replace hardcoded message length given to USB commands
authorFrank Jungclaus <frank.jungclaus@esd.eu>
Fri, 19 May 2023 19:55:59 +0000 (21:55 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 22 Jun 2023 07:38:24 +0000 (09:38 +0200)
commit299a557651d7847c2acb5c43674e2a1c85d38d16
tree3694fcfcad85d28742df0e14ed193117d76d5255
parent8ef426e1f605cea86f9375ca75b59b3e7afab5f7
can: esd_usb: Replace hardcoded message length given to USB commands

Replace all hardcoded values supplied to the len element of
esd_usb_msg (and its siblings) by more readable expressions, based on
sizeof(), offsetof(), etc.
Also spend documentation / comments that the len element of esd_usb_msg
is in multiples of 32bit words and not in bytes.

Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/
Suggested-by: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Signed-off-by: Frank Jungclaus <frank.jungclaus@esd.eu>
Link: https://lore.kernel.org/r/20230519195600.420644-6-frank.jungclaus@esd.eu
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/esd_usb.c