block: aoe: replace use of __constant_htons to htons
Quoted 18 lines · David Laight
From: Amey Narkhede
Quoted 9 lines
Sent: 20 December 2020 16:46
The macro htons expands to
__swab16which has special case for constants in little endian case. In big endian case both__constant_htonsand htons macros expand to the same code. So, replace__constant_htonswith htons to get rid of the definition of__constant_htonscompletely....
Review
Quoted 4 lines
static struct
packet_typeaoe_pt__read_mostly= {(quoted diff) +1
-1- .type = __constant_htons(ETH_P_AOE), + .type = htons(ETH_P_AOE), .func = aoenet_rcv,Does this cause grief if someone is doing a
COMPILE_TESTon LE?
Quoted 6 lines
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
I did COMPILE_TEST on my x86_64 machine and it compiled without any problems.
I assume that was the point or am I missing something? I'm a beginner contributor so please let me know if there any mistakes.
Amey