lkml.org 
[lkml]   [2023]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v11 2/2] lib/test_bitmap: add tests for bitmap_{read,write}()
On Thu, Nov 9, 2023 at 3:32 PM Alexander Lobakin
<aleksander.lobakin@intel.com> wrote:
>
> From: Alexander Potapenko <glider@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.

\
 
 \ /
  Last update: 2023-11-20 13:54    [W:0.041 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site