On 03.09.2022 20:25:58, Jimmy Assarsson wrote:
Add struct kvaser_usb_busparams containing the busparameters used in CMD_{SET,GET}_BUSPARAMS* commands.
| drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c:167:30: error: field | busparams within 'struct kvaser_cmd_busparams' is less aligned than | 'struct kvaser_usb_busparams' and is usually due to 'struct | kvaser_cmd_busparams' being packed, which can lead to unaligned | accesses [-Werror,-Wunaligned-access] | struct kvaser_usb_busparams busparams; | ^ | 1 error generated.
Fixed while applying.
diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb.h b/drivers/net/can/usb/kvaser_usb/kvaser_usb.h index 040885c7d0c4..778b61c90c2b 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb.h +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb.h @@ -82,7 +82,7 @@ struct kvaser_usb_busparams { u8 tseg2; u8 sjw; u8 nsamples; -}; +} __packed;
struct kvaser_usb { struct usb_device *udev;
Marc