Re: [PATCH net] mlxsw: spectrum: Do not rely on machine endianness

2020-06-22 Thread David Miller
From: Ido Schimmel Date: Sun, 21 Jun 2020 11:29:17 +0300 > From: Ido Schimmel > > The second commit cited below performed a cast of 'u32 buffsize' to > '(u16 *)' when calling mlxsw_sp_port_headroom_8x_adjust(): > > mlxsw_sp_port_headroom_8x_adjust(mlxsw_sp_port, (u16 *) &buffsize); > > Colin

[PATCH net] mlxsw: spectrum: Do not rely on machine endianness

2020-06-21 Thread Ido Schimmel
From: Ido Schimmel The second commit cited below performed a cast of 'u32 buffsize' to '(u16 *)' when calling mlxsw_sp_port_headroom_8x_adjust(): mlxsw_sp_port_headroom_8x_adjust(mlxsw_sp_port, (u16 *) &buffsize); Colin noted that this will behave differently on big endian architectures compare