On 23.11.21 09:38, Jan Beulich wrote:
> On 22.11.2021 10:28, Oleksandr Andrushchenko wrote:
>> --- a/xen/include/xen/rangeset.h
>> +++ b/xen/include/xen/rangeset.h
>> @@ -51,6 +51,9 @@ void rangeset_limit(
>>    /* Pretty-print range limits in hexadecimal. */
>>   #define _RANGESETF_prettyprint_hex 0
>>   #define RANGESETF_prettyprint_hex  (1U << _RANGESETF_prettyprint_hex)
>> +/* Do not print entries marked with this flag. */
>> +#define _RANGESETF_no_print 1
> There's no need for this, so I'd like to ask that you add ...
>
>> +#define RANGESETF_no_print  (1U << _RANGESETF_no_print)
> ... just this. In due course we should do away with
> _RANGESETF_prettyprint_hex as well (unless you want to do so right
> at this occasion).
Ok, I can remove "#define _RANGESETF_prettyprint_hex 0" as well
and have both flags defined as
  /* Pretty-print range limits in hexadecimal. */
#define RANGESETF_prettyprint_hex  (1U << 0)
/* Do not print entries marked with this flag. */
#define RANGESETF_no_print         (1U << 1)

Or we can use BIT macro here:

/* Pretty-print range limits in hexadecimal. */
#define RANGESETF_prettyprint_hex  BIT(0, U)
/* Do not print entries marked with this flag. */
#define RANGESETF_no_print         BIT(1, U)

What's your preference here?
>
> Jan
>
Thank you,
Oleksandr

Reply via email to