From mboxrd@z Thu Jan 1 00:00:00 1970 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 E0EF21CD15; Sat, 3 Feb 2024 04:18:08 +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=1706933889; cv=none; b=uQADTZxUeKTHFsPV7oBHYTiTZay2sMwa86mOifmYMW4N9n4Bzks9luxeluCNqGuQvVpUPwaA32T+KtyewOqksE8EWGHpBszUyIg1hDTdoSvHjtPrT5OcJmHU/SZIDOmhDjjBRWzlHyyxDt398ALsWORXXN6vEWjMRvfPnVUnvEo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933889; c=relaxed/simple; bh=OySBzL5UeXKKlRvsvX398yqCV1BX8iKs+bmKbjT3ug0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FiUZKF5DgUoBPCShGjHAgUfhmLH9fuLdCVFuTW79fs40Dcg9MZnYotby7bOBt9LZgoZOLv+qDTJPXRizfFc3gulPbHRQTHWonMcJAvNOg6xMdPtDhw+pVAFwBZgJSSNy0/F9zO5qzz5O4akTne7oPu7mpEbpuwSzmKu//fONKUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=USTb5RzU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="USTb5RzU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8987C433C7; Sat, 3 Feb 2024 04:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933888; bh=OySBzL5UeXKKlRvsvX398yqCV1BX8iKs+bmKbjT3ug0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=USTb5RzUPoJ6ZkmhpXEQzNFLCZ66RteHh8ifjvS6wUyFKldTLOIUY4GeD6vdMdBsc EYB34bOBZ777N7EUjIzGRE1mpcEFFrzJqA+iIXp9fsCsXinDlGvYNi2JZzP7W2/P9G +i+V+qWWTysI9PeteT7QhejVGX4ybtC0isIlDCoA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Felix Kuehling , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Srinivasan Shanmugam , Felix Kuehling , Sasha Levin Subject: [PATCH 6.7 233/353] drm/amdgpu: Drop fence check in to_amdgpu_amdkfd_fence() Date: Fri, 2 Feb 2024 20:05:51 -0800 Message-ID: <20240203035411.048892229@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035403.657508530@linuxfoundation.org> References: <20240203035403.657508530@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.7-stable review patch. If anyone has any objections, please let me know. ------------------ 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