Re: [PATCH] Fix 'assignment to __be16' warning

From: Al Viro
Date: Thu Apr 15 2021 - 16:37:32 EST


On Mon, Apr 12, 2021 at 11:53:02AM +0000, Bence Csókás wrote:
> While the preamble field _is_ technically big-endian, its value is always 0x2A2A,
> which is the same in either endianness, therefore it should be u16 instead.

Just replace the assignment with htons(0x2A2A) and be done with that - it's
a constant expression and compiler will yield the same assembler.