Message ID | 20210513193204.816681-1-davidgow@google.com |
---|---|
State | Accepted |
Commit | 6e62dfa6d14f8fd2b07ad30b8a1c597d40d36ac1 |
Headers | show |
Series | [v2,01/10] kunit: Do not typecheck binary assertions | expand |
On Fri, 14 May 2021, at 05:02, David Gow wrote: > With KUnit's EXPECT macros no longer typechecking arguments as strictly, > get rid of a number of now unnecessary casts. > > Signed-off-by: David Gow <davidgow@google.com> > --- > This should be a no-op functionality wise, and while it depends on the > first couple of patches in this series, it's otherwise independent from > the others. I think this makes the test more readable, but if you > particularly dislike it, I'm happy to drop it. No, happy to have that cleaned up. Thanks David. Acked-by: Andrew Jeffery <andrew@aj.id.au>
Hi, On Thu, May 13, 2021 at 12:32:01PM -0700, David Gow wrote: > With some of the stricter type checking in KUnit's EXPECT macros > removed, several casts in the thunderbolt KUnit tests are no longer > required. > > Remove the unnecessary casts, making the conditions clearer. > > Signed-off-by: David Gow <davidgow@google.com> Looks good. Does this go through KUnit tree or you want me to take it? In case of the former feel free to add: Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
On 5/14/21 1:27 AM, David Gow wrote: > On Fri, May 14, 2021 at 2:08 PM Mika Westerberg > <mika.westerberg@linux.intel.com> wrote: >> >> Hi, >> >> On Thu, May 13, 2021 at 12:32:01PM -0700, David Gow wrote: >>> With some of the stricter type checking in KUnit's EXPECT macros >>> removed, several casts in the thunderbolt KUnit tests are no longer >>> required. >>> >>> Remove the unnecessary casts, making the conditions clearer. >>> >>> Signed-off-by: David Gow <davidgow@google.com> >> >> Looks good. >> >> Does this go through KUnit tree or you want me to take it? In case of >> the former feel free to add: >> >> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> >> > > Thanks. I think it's probably easier for this to go in via the KUnit > tree, unless Brendan or Shuah have any objections. > It is fine either way unless there are dependencies on the KUnit tree. I can take this in through KUnit once Brendan looks at it. thanks, -- Shuah
diff --git a/include/kunit/test.h b/include/kunit/test.h index 49601c4b98b8..4c56ffcb7403 100644 --- a/include/kunit/test.h +++ b/include/kunit/test.h @@ -775,7 +775,6 @@ void kunit_do_assertion(struct kunit *test, do { \ typeof(left) __left = (left); \ typeof(right) __right = (right); \ - ((void)__typecheck(__left, __right)); \ \ KUNIT_ASSERTION(test, \ __left op __right, \