On 02.04.2025 11:36, Andrew Cooper wrote: > On 02/04/2025 10:30 am, Jan Beulich wrote: >> On 02.04.2025 11:21, Andrew Cooper wrote: >>> On 01/04/2025 11:09 am, Jan Beulich wrote: >>>> --- a/xen/common/bitmap.c >>>> +++ b/xen/common/bitmap.c >>>> @@ -359,12 +343,11 @@ static void bitmap_byte_to_long(unsigned >>>> >>>> #elif defined(__LITTLE_ENDIAN) >>>> >>>> -static void bitmap_long_to_byte(uint8_t *bp, const unsigned long *lp, >>>> - unsigned int nbits) >>>> -{ >>>> - memcpy(bp, lp, DIV_ROUND_UP(nbits, BITS_PER_BYTE)); >>>> - clamp_last_byte(bp, nbits); >>>> -} >>>> +#define LITTLE_ENDIAN 1 /* For IS_ENABLED(). */ >>> I guess I can fix this in my bswap series by giving __LITTLE_ENDIAN the >>> value of 1 when it is defined ? >> Hmm, that's an option, yes. Yet then I didn't pay close enough attention >> to that part of the respective patch in that series, as I was blindly >> assuming it to instead be >> >> #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ >> # define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ >> #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ >> # define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ >> #endif >> >> to keep the values of the symbols unaltered. > > I saw no value doing that, after auditing that it was only ever used in > an #ifdef kind of way. IS_ENABLED() is an extension of the same > concept, but requiring a 1 to work.
Fair enough then, and a (tiny) simplification here. I'll see about getting the change here in, so you can re-base over it. Jan