staging: uwb: fix coccinelle warnings of comparison to bool
PATCH 1/1 staging: uwb: fix coccinelle warnings of comparison to bool
Fix warnings of comparision to bool.
Issue detected by coccinelle tool.
Signed-off-by Jules Irenge <[email protected]>
--- drivers/staging/uwb/rsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/uwb/rsv.c +2 -2
@@ -614,7 +614,7 @@ int uwb_rsv_try_move(struct uwb_rsv *rsv, struct uwb_mas_bm *available)struct uwb_rsv_move *mv;int ret =0 ; -if (bow->can_reserve_extra_mases == false) +if (!bow->can_reserve_extra_mases)return -EBUSY ; mv = &rsv->mv;
@@ -643,7 +643,7 @@ void uwb_rsv_handle_drp_avail_change(struct uwb_rc *rc)struct uwb_rsv *rsv;struct uwb_mas_bm mas; -if (bow->can_reserve_extra_mases == false) +if (!bow->can_reserve_extra_mases)return ;list_for_each_entry (rsv, &rc->reservations, rc_node) {
Signature · 1 line
2.21.0
Quoted 4 lines · Jules Irenge
Fix warnings of comparision to bool.
Issue detected by coccinelle tool.Signed-off-by Jules Irenge <[email protected]>
Acked-by Julia Lawall <[email protected]>
Quoted 30 lines
--- drivers/staging/uwb/rsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/uwb/rsv.c +2
-3@@ -614,7 +614,7 @@ int uwb_rsv_try_move(struct uwb_rsv *rsv, struct uwb_mas_bm *available)struct uwb_rsv_move *mv;int ret =0 ; -if (bow->can_reserve_extra_mases == false) +if (!bow->can_reserve_extra_mases)return -EBUSY ; mv = &rsv->mv;@@ -643,7 +643,7 @@ void uwb_rsv_handle_drp_avail_change(struct uwb_rc *rc)struct uwb_rsv *rsv;struct uwb_mas_bm mas; -if (bow->can_reserve_extra_mases == false) +if (!bow->can_reserve_extra_mases)return ;list_for_each_entry (rsv, &rc->reservations, rc_node) { --2.21.0