drm/ttm: fix warning that we shouldn't mix && and ||
Subsystems (3)
PATCH 1/1 drm/ttm: fix warning that we shouldn't mix && and ||
Trivial warning fix.
Signed-off-by Christian König <[email protected]>
Fixes 4481913607e5 ("drm/ttm: fix bulk_move corruption when adding a entry")
--- drivers/gpu/drm/ttm/ttm_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_resource.c +1 -1
@@ -114,7 +114,7 @@ static void ttm_lru_bulk_move_del(struct ttm_lru_bulk_move *bulk,struct ttm_lru_bulk_move_pos *pos =ttm_lru_bulk_move_pos (bulk, res);if (unlikely (WARN_ON (!pos->first || !pos->last) || - pos->first == res && pos->last == res)) { + (pos->first == res && pos->last == res))) { pos->first =NULL ; pos->last =NULL ; }else if (pos->first == res) {
Signature · 1 line
2.34.1
Quoted 5 lines · Christian König
Trivial warning fix.
Signed-off-by Christian König <[email protected]>Fixes 4481913607e5 ("drm/ttm: fix bulk_move corruption when adding a entry")
Reviewed-by Alex Deucher <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/ttm/ttm_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_resource.c +1
-2@@ -114,7 +114,7 @@ static void ttm_lru_bulk_move_del(struct ttm_lru_bulk_move *bulk,struct ttm_lru_bulk_move_pos *pos =ttm_lru_bulk_move_pos (bulk, res);if (unlikely (WARN_ON (!pos->first || !pos->last) || - pos->first == res && pos->last == res)) { + (pos->first == res && pos->last == res))) { pos->first =NULL ; pos->last =NULL ; }else if (pos->first == res) { --2.34.1