mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-22 17:55:24 -04:00
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>
This commit is contained in:
committed by
Jani Nikula
parent
55c771b0d8
commit
30c3ffb880
@@ -1921,7 +1921,7 @@ static int perform_bb_shadow(struct parser_exec_state *s)
|
||||
if (!bb)
|
||||
return -ENOMEM;
|
||||
|
||||
bb->ppgtt = (s->buf_addr_type == GTT_BUFFER) ? false : true;
|
||||
bb->ppgtt = s->buf_addr_type != GTT_BUFFER;
|
||||
|
||||
/*
|
||||
* The start_offset stores the batch buffer's start gma's
|
||||
|
||||
Reference in New Issue
Block a user