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 5C2FC78B5E; Wed, 21 Feb 2024 14:04:46 +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=1708524286; cv=none; b=jTU9JmqNqBe3RiC0ki3XfZGDDrFVfts8VtJZnGkbZJufVW9JmqxV7W3v+oD04B+54+wnt/8O5ExqCcn7x0YFr9QGQn9FS17bucnKyAHw0KcGcwdOWuTjw5pND1sX6rAwXjlcyLVCfspJM2mY9FJsJ9EEr9bI98uQhtKWuXAHiNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708524286; c=relaxed/simple; bh=uu0PaakfguRk/WZ6WWosKRPGGbuoO9JhTTfxnxIvcf4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hIl4RzGcAby4dJ/4vougYuWjNslmTSpMMo8F+C4tx5AvU4chfMnxu91nZ/sU4JmYbbAPSYDVTWPdCDJFV32N3k6jis2sRx82n1KNHJpe8Uwm80WGhTPMht6K1r3OyapWyMXeBDqooCIzDijFXfRkPAMHdkJ9pI0YcwdDR99/q74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Hrlq1TVb; 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="Hrlq1TVb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2076C433F1; Wed, 21 Feb 2024 14:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708524286; bh=uu0PaakfguRk/WZ6WWosKRPGGbuoO9JhTTfxnxIvcf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hrlq1TVbf+apUvUFHuzeMnYSERcMjldJZ2BOmFEed2Z095GVbDrxB0k64mOkPjMcp RSzhKlBxICk4RYm/y0z19x/bODp03wXkDzo1ysTvNkHSeG17qOw71avOT0OoZqAhi6 9C0z6CwKJw9E1NPIJPafGWcCmu1cxJjx5KogO7VI= 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 5.10 199/379] drm/amdgpu: Drop fence check in to_amdgpu_amdkfd_fence() Date: Wed, 21 Feb 2024 14:06:18 +0100 Message-ID: <20240221130000.790484333@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125954.917878865@linuxfoundation.org> References: <20240221125954.917878865@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.10-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 3107b9575929..eef7517c9d24 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c @@ -88,7 +88,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