Skip to contentSkip to conversation

platform/mellanox: Simplify bool conversion

PATCH In review Yang Li 2 participants 2 messages Nov 21, 2023

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 platform/mellanox: Simplify bool conversion

./drivers/platform/mellanox/mlxbf-tmfifo.c:94:41-46: WARNING: conversion to bool not needed here

---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/mellanox/mlxbf-tmfifo.c +1 -1
index 5c683b4eaf10..8ba23eb5be0b 100644
@@ -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)
Signature · 1 line
2.20.1.7.g153144c
maintainer
#1 lore raw
Quoted 5 lines · Yang Li

./drivers/platform/mellanox/mlxbf-tmfifo.c:94:41-46: WARNING: conversion to bool not needed here

Thank you for your patch.

This is already fixed by the commit 57eb82ff34e3 ("platform/mellanox:
mlxbf-tmfifo: Remove unnecessary bool conversion") that is currently queued in pdf86.git/review-hans branch.

Also, next time write a better changelog, it's not enough to just quote an error message.

Signature · 1 line
 i.