2019-06-08 09:41:05

by Hariprasad Kelam

[permalink] [raw]
Subject: [PATCH] staging: erofs: fix warning Comparison to bool

fix below warnings reported by coccicheck

drivers/staging/erofs/unzip_vle.c:332:11-18: WARNING: Comparison to bool

Signed-off-by: Hariprasad Kelam <[email protected]>
---
drivers/staging/erofs/unzip_vle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index 9ecaa87..f3d0d2c 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -329,7 +329,7 @@ try_to_claim_workgroup(struct z_erofs_vle_workgroup *grp,
z_erofs_vle_owned_workgrp_t *owned_head,
bool *hosted)
{
- DBG_BUGON(*hosted == true);
+ DBG_BUGON(*hosted);

/* let's claim these following types of workgroup */
retry:
--
2.7.4


2019-06-08 12:08:07

by Gao Xiang

[permalink] [raw]
Subject: Re: [PATCH] staging: erofs: fix warning Comparison to bool



On 2019/6/8 ??????5:39, Hariprasad Kelam wrote:
> fix below warnings reported by coccicheck
>
> drivers/staging/erofs/unzip_vle.c:332:11-18: WARNING: Comparison to bool
>
> Signed-off-by: Hariprasad Kelam <[email protected]>

Reviewed-by: Gao Xiang <[email protected]>

Thanks,
Gao Xiang

> ---
> drivers/staging/erofs/unzip_vle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
> index 9ecaa87..f3d0d2c 100644
> --- a/drivers/staging/erofs/unzip_vle.c
> +++ b/drivers/staging/erofs/unzip_vle.c
> @@ -329,7 +329,7 @@ try_to_claim_workgroup(struct z_erofs_vle_workgroup *grp,
> z_erofs_vle_owned_workgrp_t *owned_head,
> bool *hosted)
> {
> - DBG_BUGON(*hosted == true);
> + DBG_BUGON(*hosted);
>
> /* let's claim these following types of workgroup */
> retry:
>

2019-06-11 01:41:40

by Chao Yu

[permalink] [raw]
Subject: Re: [PATCH] staging: erofs: fix warning Comparison to bool

On 2019/6/8 17:39, Hariprasad Kelam wrote:
> fix below warnings reported by coccicheck
>
> drivers/staging/erofs/unzip_vle.c:332:11-18: WARNING: Comparison to bool
>
> Signed-off-by: Hariprasad Kelam <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,