[-next] platform/mellanox: Simplify bool conversion
Commit Message
./drivers/platform/mellanox/mlxbf-tmfifo.c:94:41-46: WARNING: conversion to bool not needed here
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7584
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/platform/mellanox/mlxbf-tmfifo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, 21 Nov 2023, Yang Li wrote:
> ./drivers/platform/mellanox/mlxbf-tmfifo.c:94:41-46: WARNING: conversion to bool not needed here
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7584
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
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.
@@ -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)