]> xenbits.xensource.com Git - xen.git/commit
byteorder: replace __u32
authorJan Beulich <jbeulich@suse.com>
Thu, 31 Oct 2024 11:39:33 +0000 (12:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 31 Oct 2024 11:39:33 +0000 (12:39 +0100)
commit60db1b1ccd8dd5ac9e442e236d6b23e69cfb248b
treef246b1970837a7ef6eb8cd87ef8cc0286dac6bc3
parent61ea18e39acce4db43d173da148b071d1a591faa
byteorder: replace __u32

In {big,little}_endian.h the changes are entirely mechanical, except for
dealing with casting away of const from pointers-to-const on lines
touched anyway.

In swab.h the casting of constants is done away with as well - I simply
don't see what the respective comment is concerned about in our
environment (sizeof(int) >= 4, sizeof(long) >= {4,8} depending on
architecture, sizeof(long long) >= 8). The comment is certainly relevant
in more general cases. Excess parentheses are dropped as well,
___swab32()'s local variable is renamed, and __arch__swab32()'s is
dropped as being redundant with ___swab32()'s.

The masking operation is also dropped from __fswab64().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Frediano Ziglio <frediano.ziglio@cloud.com>
xen/include/xen/byteorder/big_endian.h
xen/include/xen/byteorder/little_endian.h
xen/include/xen/byteorder/swab.h