Re: [PATCH net v2] net: marvell: prestera: fix hw structure laid out

From: Geert Uytterhoeven
Date: Thu Nov 04 2021 - 05:12:43 EST


Hi Volodymyr,

On Wed, Nov 3, 2021 at 10:56 AM Volodymyr Mytnyk
<volodymyr.mytnyk@xxxxxxxxxxx> wrote:
> From: Volodymyr Mytnyk <vmytnyk@xxxxxxxxxxx>
>
> - fix structure laid out discussed in:
> [PATCH net-next v4] net: marvell: prestera: add firmware v4.0 support
> https://www.spinics.net/lists/kernel/msg4127689.html
>
> - fix review comments discussed in:
> [PATCH] [-next] net: marvell: prestera: Add explicit padding
> https://www.spinics.net/lists/kernel/msg4130293.html
>
> - fix patchwork issues
> - rebase on net master
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Fixes: bb5dbf2cc64d ("net: marvell: prestera: add firmware v4.0 support")
> Signed-off-by: Volodymyr Mytnyk <vmytnyk@xxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/net/ethernet/marvell/prestera/prestera_hw.c
> +++ b/drivers/net/ethernet/marvell/prestera/prestera_hw.c

> struct prestera_msg_port_flood_param {
> u8 type;
> u8 enable;
> -};
> + u8 __pad[2];
> +} __packed;

What's the point of having __packed on a struct of bytes?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds