platform/mellanox: mlxbf-tmfifo: Remove unnecessary bool conversion
authorJules Irenge <jbi.octave@gmail.com>
Fri, 3 Nov 2023 23:54:08 +0000 (23:54 +0000)
committerHans de Goede <hdegoede@redhat.com>
Mon, 20 Nov 2023 12:20:33 +0000 (13:20 +0100)
This commit fixes coccinelle warning in macro function
IS_VRING_DROP() which complains conversion to bool not needed here.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/ZUWIIKbz4vukl8qb@octinomon
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/mlxbf-tmfifo.c

index 5c683b4eaf10adc88e933a52c6e1954ff100d6be..ed16ec422a7b33e9b529bfe1912d0ff687e4db5d 100644 (file)
@@ -91,7 +91,7 @@ struct mlxbf_tmfifo_vring {
 /* Check whether vring is in drop mode. */
 #define IS_VRING_DROP(_r) ({ \
        typeof(_r) (r) = (_r); \
-       (r->desc_head == &r->drop_desc ? true : false); })
+       r->desc_head == &r->drop_desc; })
 
 /* A stub length to drop maximum length packet. */
 #define VRING_DROP_DESC_MAX_LEN                GENMASK(15, 0)