Skip to content

Commit 30c3ffb

Browse files
LiaoYuanhong-vivojnikula
authored andcommitted
drm/i915/gvt: Remove redundant ternary operators
For ternary operators in the form of "a ? false : true", if 'a' itself returns a boolean result, the ternary operator can be omitted. Remove redundant ternary operators to clean up the code. Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Link: https://lore.kernel.org/r/20250904112644.350512-1-liaoyuanhong@vivo.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 55c771b commit 30c3ffb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/i915/gvt/cmd_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,7 @@ static int perform_bb_shadow(struct parser_exec_state *s)
19211921
if (!bb)
19221922
return -ENOMEM;
19231923

1924-
bb->ppgtt = (s->buf_addr_type == GTT_BUFFER) ? false : true;
1924+
bb->ppgtt = s->buf_addr_type != GTT_BUFFER;
19251925

19261926
/*
19271927
* The start_offset stores the batch buffer's start gma's

0 commit comments

Comments
 (0)