[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240603180005.191578-1-thorsten.blum@toblux.com>
Date: Mon, 3 Jun 2024 20:00:07 +0200
From: Thorsten Blum <thorsten.blum@...lux.com>
To: lucas.demarchi@...el.com,
ogabbay@...nel.org,
thomas.hellstrom@...ux.intel.com,
maarten.lankhorst@...ux.intel.com,
mripard@...nel.org,
tzimmermann@...e.de,
airlied@...il.com,
daniel@...ll.ch
Cc: intel-xe@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Thorsten Blum <thorsten.blum@...lux.com>
Subject: [PATCH] drm/xe/vm: Simplify if condition
The if condition !A || A && B can be simplified to !A || B.
Fixes the following Coccinelle/coccicheck warning reported by
excluded_middle.cocci:
WARNING !A || A && B is equivalent to !A || B
Compile-tested only.
Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
---
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 4aa3943e6f29..3137cbbaabde 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -85,8 +85,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.39.2
Powered by blists - more mailing lists