Thread (34 messages) 34 messages, 6 authors, 2014-02-28

Re: [PATCH v5] can: add Renesas R-Car CAN driver

From: Sergei Shtylyov <hidden>
Date: 2014-01-20 12:12:53
Also in: linux-can, linux-sh

Hello.

On 20-01-2014 15:43, Geert Uytterhoeven wrote:
quoted
Changes in version 3:
quoted
- added '__packed' to 'struct rcar_can_mbox_regs' and 'struct rcar_can_regs';
- removed unneeded type cast in the probe() method.
quoted
+/* Mailbox registers structure */
+struct rcar_can_mbox_regs {
+       u32 id;         /* IDE and RTR bits, SID and EID */
+       u8 stub;        /* Not used */
+       u8 dlc;         /* Data Length Code - bits [0..3] */
+       u8 data[8];     /* Data Bytes */
+       u8 tsh;         /* Time Stamp Higher Byte */
+       u8 tsl;         /* Time Stamp Lower Byte */
+} __packed;
Sorry, I missed the earlier discussion, but why the _packed?
One u32 and 12 bytes makes a nice multiple of 4.
    Mainly for consistency as this is a structure representing the hardware 
registers.
Gr{oetje,eeting}s,
                         Geert
WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help