Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1372129rdd; Wed, 10 Jan 2024 18:23:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhJEa+NPDTL3HqZiOyxtfwTxIVMe7AkqTrrKe5bJr1AZy5poxgq5dXdP61/xQXM8cpTdof X-Received: by 2002:ac8:5a51:0:b0:429:73a0:e2f2 with SMTP id o17-20020ac85a51000000b0042973a0e2f2mr46899qta.44.1704939794489; Wed, 10 Jan 2024 18:23:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704939794; cv=none; d=google.com; s=arc-20160816; b=ut/CvN9lu1Ij6Xy1FsPzCk07czZ367S61McpBN7dUi7IqZ7Zy8P+oynWoCdKZp4dJ9 qELFHJV3u1wifKaaa3Nk+QwaotApeRucYqhA9WNtiK44YBzvUw3RPjOpfzfnlWL3ewpl 8bknm1ep+MKWzY7LyB/RkY4JOMK32dosKU6Avratz1e9+v/H8lYpDDNULSuRkjpq14D9 lIcVDW7nzmt8oDqdEE1FggifsmHGFSWt9kbljY40aPLOxi4jw7ZJTvM9jTikXJQWTm6O 014sFS2FDdGSaZc6lMlKGMQmcT3CfSw8l5pFyK3neU0lX2HfLNO2QPZx/aihQbUrO7Wk OrNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=UYqqg+YYMRYSG+zlZstZepXQitDokxntn9vsV7Aev34=; fh=jPCf1/ur6yk+5E8TsRr/RlAMTKE8jpIQj7D7EjiTffs=; b=btQPuBcKy+eFzpG22vg9btUeWrZE1015NnUe6DVdu1zKrCvosvDfRhVvklZSk6aAtW ofRDTQGIWcGgWWjl3EHvezBgnjGJN8MewhRtH8gZN4Smof7w806/AW5vBCobAEjnGush vW9qi70GA7Ck+/720Xm+PQsKwtjQjgl8g6pFwCUHeyPBY/T5Gt8v1eTs1TvT4zFQOmFF 3beR6rvJ+pfGArgLAcJ/fOyyZUFeot5ygy7uOjdm0/6UgACqArXgTfczMupc8V/6ypXD BVmG1wzzx7+C8UM3klH5h55Yd+ilEeEitY+7N/3gz8hm6O7zYuRXZE4zUBZOBkPoczKB uGYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=efQQGJpB; spf=pass (google.com: domain of linux-kernel+bounces-22966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q20-20020a05622a04d400b00429c450ea29si112192qtx.353.2024.01.10.18.23.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 18:23:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=efQQGJpB; spf=pass (google.com: domain of linux-kernel+bounces-22966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 442861C23171 for ; Thu, 11 Jan 2024 02:23:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83375ED6; Thu, 11 Jan 2024 02:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=126.com header.i=@126.com header.b="efQQGJpB" 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 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: 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/amdgpu/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, unsigned int num_ibs, } need_ctx_switch = ring->current_ctx != fence_ctx; + tmp = amdgpu_sync_get_fence(&job->explicit_sync); if (ring->funcs->emit_pipeline_sync && job && - ((tmp = 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 = true; -- 2.17.1