qemu/bswap: Let cpu_to_endian() functions handle constant expressions
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | qemu/bswap: Move const_le() definitions aroundinclude/ | +19 | 0 replies | |
| 2/4 | qemu/bswap: add const_be16() and const_be32()include/ | +11 | 0 replies | |
| 3/4 | qemu/bswap: Add const_le64() and const_be64()include/ | +21 | 1 reply | |
| 4/4 | qemu/bswap: Let cpu_to_endian() functions handle constant expressionsinclude/ | +6 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] qemu/bswap: Let cpu_to_endian() functions handle constant expressions
Stefan Hajnoczi suggested we can use __builtin_constant_p() in the cpu_to_ENDIAN()/ENDIAN_to_cpu() functions to check if expression is constant, and if so use the const_ENDIAN() macros.
This series modifies cpu_to_ENDIAN() to use const_ENDIAN() when possible.
Philippe Mathieu-Daudé (4):
qemu/bswap: Move const_le() definitions around
qemu/bswap: add const_be16() and const_be32()
qemu/bswap: Add const_le64() and const_be64()
qemu/bswap: Let cpu_to_endian() functions handle constant expressions
include/qemu/bswap.h | 75 +++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 21 deletions(-)
Signature · 1 line
2.26.2