Skip to contentSkip to conversation

staging: erofs: fix return type of erofs_workgroup_get

PATCH In review Gao Xiang 2 participants 2 messages Dec 26, 2018 Staging

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 staging: erofs: fix return type of erofs_workgroup_get

There exists a return type misuse (int'->bool') since all users assume it fails if only return value != 0, let's fix the return type to int' instead of confusing bool'.

No logic changes.

Signed-off-by Gao Xiang <gaoxiang25 at huawei.com>
---
 drivers/staging/erofs/internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/erofs/internal.h +1 -1
index e049d00c087a..49c587383315 100644
@@ -252,7 +252,7 @@ static inline int erofs_wait_on_workgroup_freezed(struct erofs_workgroup *grp)
 }
 #endif
 
-static inline bool erofs_workgroup_get(struct erofs_workgroup *grp, int *ocnt)
+static inline int erofs_workgroup_get(struct erofs_workgroup *grp, int *ocnt)
 {
 	int o;
 
Signature · 1 line
2.14.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Gao Xiang

There exists a return type misuse (int'->bool') since all users assume it fails if only return value != 0, let's fix the return type to int' instead of confusing bool'.

No logic changes.

Signed-off-by Gao Xiang <gaoxiang25 at huawei.com>
Reviewed-by Chao Yu <yuchao0 at huawei.com>

Thanks,