[PATCH v11 2/2] lib/test_bitmap: add tests for bitmap_{read,write}()

Alexander Potapenko glider at google.com
Thu Nov 9 06:35:52 PST 2023


On Thu, Nov 9, 2023 at 3:32 PM Alexander Lobakin
<aleksander.lobakin at intel.com> wrote:
>
> From: Alexander Potapenko <glider at google.com>
> Date: Thu, 9 Nov 2023 15:28:56 +0100
>
> >>
> >> Could we maybe rather extend __check_eq_uint to take ulongs? Doesn't
> >> seem like they differ a lot.
> >
> > We could redefine expect_eq_uint as:
> >
> > #define expect_eq_uint(x, y)           expect_eq_ulong((unsigned
> > int)(x), (unsigned int)(y))
>
> Do we need explicit casts here tho?

We do.
test_bitmap_arr64() passes u64 values to expect_eq_uint(), which
results in test failures.
We could add an explicit cast there instead, but I think it's more
natural to let the users rely on expect_eq_uint() taking uints.



More information about the linux-arm-kernel mailing list