Re: [PATCH net 1/2] net: dsa: mxl862xx: avoid unaligned 16-bit access in api_wrap

From: Jakub Kicinski

Date: Thu Jun 25 2026 - 10:33:15 EST


On Thu, 25 Jun 2026 08:44:59 +0100 David Laight wrote:
> > struct mxl862xx_mac_table_clear {
> > u8 type;
> > u8 port_id;
> > } __packed;
>
> Does that one need an aligned(2) ?

Right, I meant that if we need to remember to do that instead of
depending on natural alignment - chances are someone will forget
while adding a new register, and the bug will be back.

> > So I guess the "just don't pack" will have some corner cases, too.