Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6892516rdb; Tue, 2 Jan 2024 18:29:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMrxo5ZtFZLDGMkyoaLKnd2Z4fL/vn7zgDUyNh/ZeIy9PyFct7XmRXGvWcaYx1DWfmDfcI X-Received: by 2002:a05:6e02:214b:b0:360:29f:b7a6 with SMTP id d11-20020a056e02214b00b00360029fb7a6mr19910162ilv.18.1704248974191; Tue, 02 Jan 2024 18:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704248974; cv=none; d=google.com; s=arc-20160816; b=xSms+E3rY7inxRDvC6Y8oBRNGq4RpjEkDGGlXaSx1NHKX2/7t+1jlX0oZzbbgflXh5 shPa5a67lfIERXJFEQDvKM/aZ1KWpzqlCLh/dHPGZpv66F8T3/sS94265GoUNmVaU+k4 urKU9LIUX7KD1msuOCo1NE9L73SIx1cJBB/sXHlG6Y/mgUOpCm/qLfCJpyBNMi2xT4OV RMR1oMkybT0G6SfFxvXEgm2OgQqCZzsF79/mzzf3N4Jh/LSEsIS2EShW/M2LZfxjZk96 Ode3iWKJAK8gEXoEv3jtlao2pP5tLTi31kOMFCnzrrC8xHT1jTcVDIiNgLVtsLLpjBfE FHAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=ONyEwfMLLVpREnTGJyzWSiHxmvETMWSDJgyJEXnL4SE=; fh=d91R1VDbelUzNeG1I3lLQBjKY85ZfLbZktfjPUXC+lY=; b=Y/KDjSBP8EeaeUneQDv0E8xWcklyMtPgontVPyTe9ed8g9SkooiaQ8FXF+e8CDYo9/ rdld355Hff6bWlRY65LoU3Edcw588oKlpuXs5WSrQB3MI8+neEM4o5P5yeJWPw+rWv/h 94HU9c5VpyEGfsUyKHCZ4QeyZ6Th94+kDvmzwIcl9Ae+HdAHctXrgoQzjBWB48f8f00P +w9E2rrRzwfW+v94REngMRrD25oSbJ3wT/cFmepryGqOiN7vo0IMg3dbJxmM0cJBif2r s7nlXmTI5SyhDka6a7k0D8qJd20sjEeLVbqzgWtnF00YVpTz6PyQVpMedC2JurVoiNU6 oeCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15071-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e18-20020a656492000000b00585999a38a6si21129726pgv.793.2024.01.02.18.29.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 18:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15071-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CF20A284943 for ; Wed, 3 Jan 2024 02:29:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24BA317DB; Wed, 3 Jan 2024 02:29:26 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9D17185A for ; Wed, 3 Jan 2024 02:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VzsDo3j_1704248945; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VzsDo3j_1704248945) by smtp.aliyun-inc.com; Wed, 03 Jan 2024 10:29:14 +0800 From: Jiapeng Chong To: lucas.demarchi@intel.com Cc: ogabbay@kernel.org, thomas.hellstrom@linux.intel.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] drm/xe/vm: Simplify the calculation of variables Date: Wed, 3 Jan 2024 10:29:04 +0800 Message-Id: <20240103022904.106092-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ./drivers/gpu/drm/xe/xe_vm.c:187:25-27: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7818 Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/xe/xe_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 9180f2d2d71d..dd304a92d0bb 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -184,8 +184,8 @@ static bool preempt_fences_waiting(struct xe_vm *vm) list_for_each_entry(q, &vm->preempt.exec_queues, compute.link) { if (!q->compute.pfence || - (q->compute.pfence && test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, - &q->compute.pfence->flags))) { + test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, + &q->compute.pfence->flags)) { return true; } } -- 2.20.1.7.g153144c