OSDN Git Service

can: esd_usb: Improve code readability by means of replacing struct esd_usb_msg with...
authorFrank Jungclaus <frank.jungclaus@esd.eu>
Wed, 22 Feb 2023 16:37:54 +0000 (17:37 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 24 Mar 2023 18:12:38 +0000 (19:12 +0100)
commita57915aee31596d2380a875964c78f743162383c
treed3e050de03c35cba7363dd674f65228d5df4c05a
parentaf54c4590d8d886be722f17ef255664bb9ff508d
can: esd_usb: Improve code readability by means of replacing struct esd_usb_msg with a union

As suggested by Vincent Mailhol, declare struct esd_usb_msg as a union
instead of a struct. Then replace all msg->msg.something constructs,
that make use of esd_usb_msg, with simpler and prettier looking
msg->something variants.

Link: https://lore.kernel.org/all/CAMZ6RqKRzJwmMShVT9QKwiQ5LJaQupYqkPkKjhRBsP=12QYpfA@mail.gmail.com/
Suggested-by: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Signed-off-by: Frank Jungclaus <frank.jungclaus@esd.eu>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20230222163754.3711766-1-frank.jungclaus@esd.eu
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/esd_usb.c