Skip to contentSkip to conversation

platform/mellanox: mlxbf-tmfifo: Remove unnecessary bool conversion

PATCH In review Jules Irenge 3 participants 5 messages Nov 3, 2023 – Nov 20, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 platform/mellanox: mlxbf-tmfifo: Remove unnecessary bool conversion

This commit fixes coccinelle warning in macro function IS_VRING_DROP() which complains 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 ab7d7a1235b8..88472c024680 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.41.0
maintainer Reviewed-by on v1 2/3
#1 lore raw
Quoted 4 lines · Jules Irenge

This commit fixes coccinelle warning in macro function IS_VRING_DROP() which complains conversion to bool not needed here.

Not an end of the world but just in case you have it stored somewhere, my email address was lacking the first letter in your post.

Signature · 1 line
 i.
Quoted 18 lines
---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/mellanox/mlxbf-tmfifo.c +1 -1
index ab7d7a1235b8..88472c024680 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)
maintainer
#2 lore raw
Quoted 11 lines · Ilpo Järvinen
Quoted 4 lines · Jules Irenge

This commit fixes coccinelle warning in macro function IS_VRING_DROP() which complains conversion to bool not needed here.

Not an end of the world but just in case you have it stored somewhere, my email address was lacking the first letter in your post.

Hi again,

I also realized right after send the reply that this is marked as 2/3 but the other two patches didn't make it into lore archives (nor into patchwork, I think).

Signature · 1 line
 i.
#3 lore raw
Quoted 8 lines

Hi again,

I also realized right after send the reply that this is marked as 2/3 but the other two patches didn't make it into lore archives (nor into patchwork, I think).

Signature · 1 line
 i.

Hello

My bad, I sent three patches but they were all to completely different drivers/subsystems with completely different warning fixes. I am still coming back to start sending patches after years maybe. I will from now on do patch series for one particular driver only then go to next.

Thanks for replying.
Jules

#4 lore raw
In reply to Jules Irenge

Hi,

Quoted 4 lines · Jules Irenge

This commit fixes coccinelle warning in macro function IS_VRING_DROP() which complains conversion to bool not needed here.

Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.

Regards,

Hans

Quoted 17 lines
---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/mellanox/mlxbf-tmfifo.c +1 -1
index ab7d7a1235b8..88472c024680 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)