Re: [PATCH v3 3/6] thunderbolt: test: use NULL macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 7, 2022 at 1:11 PM Ricardo Ribalda <ribalda@xxxxxxxxxxxx> wrote:
>
> Replace the NULL checks with the more specific and idiomatic NULL macros.
>
> Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>

Acked-by: Daniel Latypov <dlatypov@xxxxxxxxxx>

Saw one typo down below

> ---
>  drivers/thunderbolt/test.c | 130 ++++++++++++++++++-------------------
>  1 file changed, 65 insertions(+), 65 deletions(-)
>
> diff --git a/drivers/thunderbolt/test.c b/drivers/thunderbolt/test.c
> index 1f69bab236ee..b8c9dc7cc02f 100644
> --- a/drivers/thunderbolt/test.c
> +++ b/drivers/thunderbolt/test.c

<snip>

> @@ -2584,10 +2584,10 @@ static void compare_dirs(struct kunit *test, struct tb_property_dir *d1,
>         int n1, n2, i;
>
>         if (d1->uuid) {
> -               KUNIT_ASSERT_TRUE(test, d2->uuid != NULL);
> +               KUNIT_ASSERT_NOT_NULL(test, d2->uuid);
>                 KUNIT_ASSERT_TRUE(test, uuid_equal(d1->uuid, d2->uuid));
>         } else {
> -               KUNIT_ASSERT_TRUE(test, d2->uuid == NULL);
> +               KUNIT_ASSERT_NOT_NULL(test, d2->uuid);

Looks like this one should be
KUNIT_ASSERT_NULL(test, d2->uuid)



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux