On Thu, 04 Sep 2025, Liao Yuanhong <[email protected]> wrote: > 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 <[email protected]>
Pushed to drm-intel-next, thanks for the patch. BR, Jani. > --- > drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c > b/drivers/gpu/drm/i915/gvt/cmd_parser.c > index a91e23c22ea1..d432fdd69833 100644 > --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c > +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c > @@ -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 -- Jani Nikula, Intel
