Re: [PATCH v4 2/3] net: ethernet: renesas: Add Ethernet Switch driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 24, 2022, at 22:35, Geert Uytterhoeven wrote:

>>
>> Regardless of which way this is expressed, it looked like there is
>> a missing __le32_to_cpu() around the high word.
>
> I think it's OK, because desc->dptrh is u8:
>
>     struct rswitch_desc {
>             __le16 info_ds; /* Descriptor size */
>             u8 die_dt;      /* Descriptor interrupt enable and type */
>             __u8  dptrh;    /* Descriptor pointer MSB */
>             __le32 dptrl;   /* Descriptor pointer LSW */
>     } __packed;

Right, that makes sense. On a completely unrelated note, you might
want to remove the __packed annotation though, as the compiler
might otherwise use bytewise access to the dptrl field instead of
a word access, which would cause some overhead in case this is
in uncached memory.

       Arnd



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux