Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1221056lqj; Mon, 3 Jun 2024 14:11:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6LLx0vj7zN4UZaVDDaXsLQdab4XrKFbNvGShz93l8GsVCRyyarQVoEhFQLyPIsd5pE2O31uAXZumRoduwuzpIQn9cPw6nYIpnyPk+Bg== X-Google-Smtp-Source: AGHT+IF7owOwltAnQQylHYiszu/k7vLMPmyG22fsbdU/P0W77Z7J2hWeEBa0igrpFZmVKU3C3pfZ X-Received: by 2002:a05:6a20:324b:b0:1af:f875:63b0 with SMTP id adf61e73a8af0-1b26f265036mr8971430637.48.1717449075275; Mon, 03 Jun 2024 14:11:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717449075; cv=pass; d=google.com; s=arc-20160816; b=AuGAcU6NazINJ1XEPfKIuFZNGEnrrdWQUqm2fYQ5NetCpVwXNm4bkD5EvBBCcGJH2c A1u59nelNwZwxEgCXB8Gt7r8FhQfSuNRkEl4NLD2VZvIdSSMCfjbNlskEcRsPuMgqrmp 8qExk2wuo8ROR7km0fvVvVTpIfPDh3V8vvpe6eVdoNemgeqtLFTy+UREocE+D67Ll3fA Dm7/MHaK6+SARlSSNT/JT8S5sH8ajyJM47i4cc4+ZQxy7w8g/wDCnSPD1MezAkGkWK8L IjdSRXOm5WwM94uwQ4Q7x3eCHw04E4ZCnfjoBDzqeNk9NCShffSMF7tddVJRImg2AOTW VnRA== ARC-Message-Signature: i=2; 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:dkim-signature; bh=7TPkYuHgg+gLnBsrbKhRQC0OqluG4mID27p8/iWKRL4=; fh=Lk4m/GE7krL3tr3X8/2dQMXQu5GISvxn2kDiSRjLXv0=; b=oBtCOJgWyDaM9cYCH6CC6ohDDisMdm59BvsJFv+Gi7ieyT699x3E/W3re64sKsKevW 8vOtSIRTfwxoSmmicczt54W+tu5kCkqQqlkCru1n6SnRDvFPFEeljMlDyFaCJf+lJnJj UHI3DdUjr1x31q85DW/BsALSeigdJNUuHIAZKWKPG/COnrq2Vz/TNBjtVRTdUlMMFko7 f7J7kidNg4EZxcPUMLT6rZj8YftEmDBRpY9FSJUzJyo+g1p0m81k42A/ZCYHukokMBh+ AXQBSUNqQwkbezb1H6LLgtRAq10sA72lXU/z5ovfPi+8JBp+Rxe8P/AgKwnDYoYczF/a rTEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=j2qs75v7; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-199544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199544-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-702423e0068si6983346b3a.74.2024.06.03.14.11.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 14:11:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=j2qs75v7; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-199544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199544-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 58CE2B22BD1 for ; Mon, 3 Jun 2024 18:03:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4425B137C2A; Mon, 3 Jun 2024 18:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b="j2qs75v7" Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7516135A46 for ; Mon, 3 Jun 2024 18:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717437822; cv=none; b=cUGkAYcdXJzdywteaUuGnhBZtQMvia6HCTcH6VvLgymFY0Yppo22vWpFGtybUvKVDH1f7krYDy/yflBTwzWZ+jXNKgBzIcMrj5hARQROz12w33vh8cpibqk7CIhjqqLcYnAgjV6sAodxV/uw8PZ1Qa6GwQS8izVGQ+SyEfSFToc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717437822; c=relaxed/simple; bh=qkR+XwK2cnQzgCZgDWp8dL3MNwc2lgcgu16NqnlBhRU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ufZwPS8bEFKJmq2CNUWNeN2XKfAGdpj9LzTE8ZehO1X1fhp3+qp8Mk9/KsgMesuYg0RP6UOjdA5GNnptio3waOdfsG6uFGPY3hVkSHBQAZP3tYpd/c3UL5xQmjrhk+mlzFPkwWDQXZ1Z4azgPbzfAt8T0hQ7yBIswPRPuaoAczU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com; spf=none smtp.mailfrom=toblux.com; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b=j2qs75v7; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=toblux.com Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-57a32b0211aso144867a12.2 for ; Mon, 03 Jun 2024 11:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toblux-com.20230601.gappssmtp.com; s=20230601; t=1717437819; x=1718042619; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7TPkYuHgg+gLnBsrbKhRQC0OqluG4mID27p8/iWKRL4=; b=j2qs75v7IyagH3DJAwm3MpTe3MrGGVdXlA936x32HT+27zkaWTXfwwboXb58IyLbvj 0B/rNIeS1NQ0N25/RQ1biTKtvqU5mVCvyFHbJE7R9XGr7y2FUYOd9gHIvz6sYXVPeOA5 41QzT7Ze/t7gd8jJfKb8pmcXYtb7gqoS0GSU9uzIB2Y4zcwdRbJ/Wt0vUoCz7zXhGBFc B0DVBXHJa4+53jh5QFX4i4PLwZHI8W141Dln8P9nKiy3023FRf4mrxpMXbzGzy/krB33 rmOg1LBe6Iuyub5Ic/VziCWE4bGNGiUeu1sAkucWTdrTwomxaINCD++ZjtU36e0qHNCu erKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717437819; x=1718042619; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7TPkYuHgg+gLnBsrbKhRQC0OqluG4mID27p8/iWKRL4=; b=igacPOTwqrCWP6XbWnWPKwdlPRX3TsLzfxTcmzLUkKYhDL13aSTE0/ICQFyQgOF/Vy tqEzQybE6R6NuDUdk3bpx7+m9H/CQJBpFgBqQdf/cBXiMZ+wV5tliFfu9IHrq4WAi2Np aVRJPu5oV0B1bz8VAV1GJzTm3m9pl5qDVqCkPdOj5wrJkPd4n0Q/hzVpFqoLcT6fNYta 7Jp6e6AllHEIhDK5RTETaaVawHDO2wBV3zL7bvn5C/Pva8CiJGgKqJ+rcayan+lizZ1v kExCdQgDfej5i4sS4kAV6wJ0HloV6j/+ZVamk53aY/EeMdZthwtcJJbfd9LG/TZghM2h Y4lg== X-Forwarded-Encrypted: i=1; AJvYcCWe3V1SlKgpmKoepNMN+VmeD6w2MNwHyFS8jfJr9AcbO4Bu8yxmmET7PdLYn93t+mf/En4fpee6VHDHv23N6Z5o0U8BCRvbG907s3gQ X-Gm-Message-State: AOJu0YwoRuAxgjFNa8ce6bQ1s4SugMXSezkh07/ODtOyWe580STcAYN1 pM0ZG/D1l+9tV74Ycl/9aUxieuArEqxFpWgYKGZnW1fO7YoJ+qJsWormThqK8oU= X-Received: by 2002:a17:906:f8c4:b0:a59:e52b:39dc with SMTP id a640c23a62f3a-a682234b8d4mr621238766b.67.1717437818913; Mon, 03 Jun 2024 11:03:38 -0700 (PDT) Received: from debian.fritz.box. (aftr-82-135-80-81.dynamic.mnet-online.de. [82.135.80.81]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68b4b09cb9sm391917366b.178.2024.06.03.11.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 11:03:38 -0700 (PDT) From: Thorsten Blum To: lucas.demarchi@intel.com, 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 Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH] drm/xe/vm: Simplify if condition Date: Mon, 3 Jun 2024 20:00:07 +0200 Message-Id: <20240603180005.191578-1-thorsten.blum@toblux.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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