From nobody Thu Dec 25 23:23:10 2025 Received: from m16.mail.126.com (m16.mail.126.com [220.197.31.6]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C75F6EA3 for ; Thu, 11 Jan 2024 02:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=126.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=126.com header.i=@126.com header.b="efQQGJpB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=UYqqg+YYMRYSG+zlZs tZepXQitDokxntn9vsV7Aev34=; b=efQQGJpBRsNabI6WsVYUR2dV1yJgJhMsz9 JMNBg7km+gx17zENtgP4sGRGC335MaIMbyc64tQmmz3Jb1TWIDdVQGox7dXKUU7A HqJbU3CZvbX7r9rfpl6Bd89f+PQvfL85/miMCYCuGm6UGsRT6PD6dY4YNrsyfYBW WTcrJUphw= Received: from localhost.localdomain (unknown [182.148.14.173]) by gzga-smtp-mta-g0-1 (Coremail) with SMTP id _____wD3X4X7UJ9lfpacAA--.59335S2; Thu, 11 Jan 2024 10:22:52 +0800 (CST) From: chenxuebing To: christian.koenig@amd.com, daniel@ffwll.ch, airlied@gmail.com, Xinhui.Pan@amd.com, alexander.deucher@amd.com Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, chenxuebing Subject: [PATCH] drm/amdgpu: Clean up errors in amdgpu_ib.c Date: Thu, 11 Jan 2024 02:22:49 +0000 Message-Id: <20240111022249.6151-1-chenxb_99091@126.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: _____wD3X4X7UJ9lfpacAA--.59335S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtryUWFWDAw1rtrWkKFy7GFg_yoWDCFb_CF WUJrn5Jr13urnFvr12vr45Z34vvF15uF4kWr12qF9ayry7Z3yUKryDKryrXw1ruas7CFnr X3s09rZ8Aa9xujkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRRK9atUUUUU== X-CM-SenderInfo: hfkh05lebzmiizr6ij2wof0z/1tbiOhhixWVEuXnykAABsH Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Fix the following errors reported by checkpatch: ERROR: do not use assignment in if condition Signed-off-by: chenxuebing --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/a= mdgpu/amdgpu_ib.c index 6aa3b1d845ab..440e7aa45c66 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -191,9 +191,9 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsign= ed int num_ibs, } =20 need_ctx_switch =3D ring->current_ctx !=3D fence_ctx; + tmp =3D amdgpu_sync_get_fence(&job->explicit_sync); if (ring->funcs->emit_pipeline_sync && job && - ((tmp =3D amdgpu_sync_get_fence(&job->explicit_sync)) || - (amdgpu_sriov_vf(adev) && need_ctx_switch) || + (tmp || (amdgpu_sriov_vf(adev) && need_ctx_switch) || amdgpu_vm_need_pipeline_sync(ring, job))) { need_pipe_sync =3D true; =20 --=20 2.17.1