All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Jimmy Assarsson <extja@kvaser.com>
Cc: linux-can@vger.kernel.org,
	Anssi Hannula <anssi.hannula@bitwise.fi>,
	Jimmy Assarsson <jimmyassarsson@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v4 14/15] can: kvaser_usb: Add struct kvaser_usb_busparams
Date: Mon, 5 Sep 2022 15:10:32 +0200	[thread overview]
Message-ID: <20220905131032.u2avrm3tbqehvdnv@pengutronix.de> (raw)
In-Reply-To: <20220903182559.189-14-extja@kvaser.com>

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]

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

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-09-05 13:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03 18:25 [PATCH v4 01/15] can: kvaser_usb_leaf: Fix overread with an invalid command Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 02/15] can: kvaser_usb: Fix use of uninitialized completion Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 03/15] can: kvaser_usb: Fix possible completions during init_completion Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 04/15] can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 05/15] can: kvaser_usb: kvaser_usb_leaf: Rename {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 06/15] can: kvaser_usb: kvaser_usb_leaf: Handle CMD_ERROR_EVENT Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 07/15] can: kvaser_usb_leaf: Set Warning state even without bus errors Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 08/15] can: kvaser_usb_leaf: Fix TX queue out of sync after restart Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 09/15] can: kvaser_usb_leaf: Fix CAN state " Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 10/15] can: kvaser_usb_leaf: Fix improved state not being reported Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 11/15] can: kvaser_usb_leaf: Fix wrong CAN state after stopping Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 12/15] can: kvaser_usb_leaf: Ignore stale bus-off after start Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 13/15] can: kvaser_usb_leaf: Fix bogus restart events Jimmy Assarsson
2022-09-03 18:25 ` [PATCH v4 14/15] can: kvaser_usb: Add struct kvaser_usb_busparams Jimmy Assarsson
2022-09-05 13:10   ` Marc Kleine-Budde [this message]
2022-09-03 18:25 ` [PATCH v4 15/15] can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming Jimmy Assarsson
  -- strict thread matches above, loose matches on Subject: below --
2022-09-03 18:23 [PATCH v4 00/15] can: kvaser_usb: Various fixes Jimmy Assarsson
2022-09-20 19:39 ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220905131032.u2avrm3tbqehvdnv@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=anssi.hannula@bitwise.fi \
    --cc=extja@kvaser.com \
    --cc=jimmyassarsson@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.