Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp399045rdb; Mon, 22 Jan 2024 07:36:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyFwOA25OyFbU1DtNsr+PUJdRQJv5xjF7pt3HQ7Zf+tQZQwaNQpsnMf/Q/kEL4zS/zMJX3 X-Received: by 2002:a17:90a:8d02:b0:28d:bd12:1812 with SMTP id c2-20020a17090a8d0200b0028dbd121812mr1426422pjo.48.1705937813066; Mon, 22 Jan 2024 07:36:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705937813; cv=pass; d=google.com; s=arc-20160816; b=LTByIYyU5a8llvyiv/HG2CeHFWJy74o+eaJJyA3+7/hx48vqNQjNeF4cZ6jvCXrovL Dta/1OFFBfPspKzGJDURbkh0c1uBG9EeNIPCVzsZdNzCknDThKSCPdBnDgnFVQRKqMfU g+mD6zczq3ueADau3uabLW8pl4U7znZ+/q5vXxTqMG8jQjsEU4zpBBEWW2Fc1yMovF24 70cRW6rnlO8JISW7EmLK0JznKspz8AzLVJLSJ7S0WIc8bwd1b9dQ3iBUJMvtG8QS0R7Y uYLUbhVjIy3PONY0ZcOrIsoamzVc2sq/oRXOSDSsPGTDEvJJ1qa+f1RiWoTFk0fwV32s FEmQ== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6KLpgRLYosBtoZyqHj6PsZtoZttJpItcAur+aplrJhk=; fh=QXrTUYpFb/qvPzw7EVbu/o4943O5/RmtXAeskj757Sk=; b=M2DMxBdm7WsD/qLnObHMPYgfabS88hhyXhh/RpUl7qljKFyPStmcPPU14G318qOFEb /hp1sua5elDoznjAnch0FKG3WidZY9HP3MoyJkWgDyBLpfgoVqeHVQHX9vCDyCfqe7kq tlBgWOuqA89T5H9ZNAQcFtM6/YwD/TrNjrDU4QIysvarKtxo1e9N9sNV8JKc14GRNhQI k2inWbGwDjXajvPdlc7lEWR37E0oWMcPNHXkSGf1AtMWYD0Adlo7y5y7NQ3qqrWWMmdJ oXwqgzE0bhEUep/8W9h50ar4w4/Z221NxvSvNhM8rhmhsY24uH+Od9pfdrmHwCz7oOE9 S3Mw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bnzY0tPG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33303-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h2-20020a17090adb8200b002909213c891si2444744pjv.25.2024.01.22.07.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:36:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33303-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bnzY0tPG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33303-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 010A328D348 for ; Mon, 22 Jan 2024 15:28:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 398605F858; Mon, 22 Jan 2024 15:02:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bnzY0tPG" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5F84F3D972; Mon, 22 Jan 2024 15:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935720; cv=none; b=FPzEI9p6XuHm1wCn215f/+xedt0FtJHpJ4iDZ/wnanpwdv61QSKcH7VMO0MS/RvywjiTxaS2J5MGgzC3tWRNvT1YEVCcyXj3vtZLNtHVYqiWis2ORcekF0G7aGMxrz4p37G2ea6LWanu2wLYkIwsm8yr+26E3+3XUoOs0/CRq6s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935720; c=relaxed/simple; bh=g+NLjclfFpmz90ce/DyP/hk3mJkJ7WyLtF/ExALF3/E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Qc4CY46Dt3ay5RWjlawuSdIsutDIa/tZOm/Wkx5yaQhAxzVtLbmkV+GkGsIpIfVTyDweqN/SQRp5VhYiM6Gtdy6cAXV2ZokWuUK862sn4qi3znPpAk+rM4XmT6xvYzhoGuQF9FbmtzPLuWNdsxtZO36E3HymLzJQed6Ag4Dbugg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bnzY0tPG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B56CDC433A6; Mon, 22 Jan 2024 15:01:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705935720; bh=g+NLjclfFpmz90ce/DyP/hk3mJkJ7WyLtF/ExALF3/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bnzY0tPGiSdq4g0kqh0i5a+y32+iyFIWZx7sXKEYrhvLKIOZRDb6q+GC888XdEDKq FY7XqiRN+LIEZsUEvX6zo4xb56cKKIbUbcMCnX1NJUN22EdAhDfIAMWJrCmDv5XHbz KKrexGMwJ/2nll4+4zzRhBGNcgihtcc+tjAvEo3oq5uFh6RqYZO9Z2ofqOM1cakhVr vD161QW716IxHzNFTNdt6Xx1FswkDS3t7KInkFEfllHnSFHdDzFtRI/TiMWqKnUoQA vXxXZ4xoG20rGwdV7+KiwKETdqLdyR87/Oi3S/zcPhexlpqyUWy+FZBW0w/So7DSwU d2DOI3U3c+/uQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Srinivasan Shanmugam , Felix Kuehling , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Felix Kuehling , Sasha Levin , Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.7 81/88] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' Date: Mon, 22 Jan 2024 09:51:54 -0500 Message-ID: <20240122145608.990137-81-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122145608.990137-1-sashal@kernel.org> References: <20240122145608.990137-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.7.1 Content-Transfer-Encoding: 8bit From: Srinivasan Shanmugam [ Upstream commit bf2ad4fb8adca89374b54b225d494e0b1956dbea ] Return value of container_of(...) can't be null, so null check is not required for 'fence'. Hence drop its NULL check. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c:93 to_amdgpu_amdkfd_fence() warn: can 'fence' even be NULL? Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c index 469785d33791..1ef758ac5076 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c @@ -90,7 +90,7 @@ struct amdgpu_amdkfd_fence *to_amdgpu_amdkfd_fence(struct dma_fence *f) return NULL; fence = container_of(f, struct amdgpu_amdkfd_fence, base); - if (fence && f->ops == &amdkfd_fence_ops) + if (f->ops == &amdkfd_fence_ops) return fence; return NULL; -- 2.43.0