X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos.h;h=df706ab7be4150d8589b2130e96e5c4ef1b09bb6;hb=1f440ece6127d2d274b961b6af0aa9091787702a;hp=98b45321962309baa304c3b87b30b819c3aa0888;hpb=7221da3796145cf778ded56024c5e1efa00a3901;p=fio.git diff --git a/os/os.h b/os/os.h index 98b45321..df706ab7 100644 --- a/os/os.h +++ b/os/os.h @@ -200,22 +200,31 @@ static inline uint64_t fio_swap64(uint64_t val) #endif #endif /* FIO_HAVE_BYTEORDER_FUNCS */ +#ifdef FIO_INTERNAL #define le16_to_cpu(val) ({ \ + typecheck(uint16_t, val); \ __le16_to_cpu(val); \ }) #define le32_to_cpu(val) ({ \ + typecheck(uint32_t, val); \ __le32_to_cpu(val); \ }) #define le64_to_cpu(val) ({ \ - __le64_to_cpu(val); \ + typecheck(uint64_t, val); \ + __le64_to_cpu(val); \ }) +#endif + #define cpu_to_le16(val) ({ \ + typecheck(uint16_t, val); \ __cpu_to_le16(val); \ }) #define cpu_to_le32(val) ({ \ + typecheck(uint32_t, val); \ __cpu_to_le32(val); \ }) #define cpu_to_le64(val) ({ \ + typecheck(uint64_t, val); \ __cpu_to_le64(val); \ })