Re: [PATCH v9 04/15] xen/bitops: put __ffs() into linux compatible header

2024-05-15 Thread Rahul Singh
Hi Oleksii, > On 6 May 2024, at 11:15 AM, Oleksii Kurochko > wrote: > > The mentioned macros exist only because of Linux compatible purpose. > > The patch defines __ffs() in terms of Xen bitops and it is safe > to define in this way ( as __ffs() - 1 ) as considering that __ffs() > was defined

Re: [PATCH v9 04/15] xen/bitops: put __ffs() into linux compatible header

2024-05-15 Thread Michal Orzel
On 06/05/2024 12:15, Oleksii Kurochko wrote: > > > The mentioned macros exist only because of Linux compatible purpose. > > The patch defines __ffs() in terms of Xen bitops and it is safe > to define in this way ( as __ffs() - 1 ) as considering that __ffs() > was defined as

[PATCH v9 04/15] xen/bitops: put __ffs() into linux compatible header

2024-05-06 Thread Oleksii Kurochko
The mentioned macros exist only because of Linux compatible purpose. The patch defines __ffs() in terms of Xen bitops and it is safe to define in this way ( as __ffs() - 1 ) as considering that __ffs() was defined as __builtin_ctzl(x), which has undefined behavior when x=0, so it is assumed that