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 8F6BC76919; Mon, 15 Apr 2024 14:42:34 +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=1713192154; cv=none; b=u+NO96OmvEeX+fdWZLiavAQPbL89Mf11GwHIWLM+xlTiKPLJdysoLbiGKojU8/eQaDx2T1UuKT2uqiCjytAgd/1DADljU+Km33Xs8koxMfObEXuJGETySiZ3QkEAWSthXDRZGiOzxyZmRVqEQnHIIZceHj+xVXjZ1oIehJkNAcs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713192154; c=relaxed/simple; bh=pZlL/VEdyiu8iMnyaFeUf54zgHI4FM6OI9AQW1aYQWI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L4XlUVl4BlhxHjc7Rw+Ex+l1hURE0/Bh6ICypoO+fgHk4BC/WUxIfMX0W4FN80JOIL/9Kn7C+KvFqDVuJ/L0cCBrKGJQUduvkH2em7/zsk6ZBbhpGuDmmXGLTRJnI3YS9o2o/MV4sPoNJsty8IidItPWAf0+pQq9DAmtCJFTfHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Tum+rVIo; 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="Tum+rVIo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18E25C3277B; Mon, 15 Apr 2024 14:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713192154; bh=pZlL/VEdyiu8iMnyaFeUf54zgHI4FM6OI9AQW1aYQWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tum+rVIowuGDUP8NIhYb6Njqa+IIw225r0H0EEi3tMfJR2AUU4VvXWT2I0XEU863r PN8pNeEI/PvYHUWi1hD/EkzZGu0WpokfTyCVH9cWGf5nXEU/f9zXmE2E2vDFycCQog lKgquXMUMQELgoY30V4iBn5o6kzZkIcb9a1EA5eM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Arnd Bergmann , Danilo Krummrich , Sasha Levin Subject: [PATCH 5.15 07/45] nouveau: fix function cast warning Date: Mon, 15 Apr 2024 16:21:14 +0200 Message-ID: <20240415141942.462885455@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240415141942.235939111@linuxfoundation.org> References: <20240415141942.235939111@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-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann [ Upstream commit 185fdb4697cc9684a02f2fab0530ecdd0c2f15d4 ] Calling a function through an incompatible pointer type causes breaks kcfi, so clang warns about the assignment: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c:73:10: error: cast from 'void (*)(const void *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 73 | .fini = (void(*)(void *))kfree, Avoid this with a trivial wrapper. Fixes: c39f472e9f14 ("drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)") Signed-off-by: Arnd Bergmann Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240404160234.2923554-1-arnd@kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c index 4bf486b571013..cb05f7f48a98b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowof.c @@ -66,11 +66,16 @@ of_init(struct nvkm_bios *bios, const char *name) return ERR_PTR(-EINVAL); } +static void of_fini(void *p) +{ + kfree(p); +} + const struct nvbios_source nvbios_of = { .name = "OpenFirmware", .init = of_init, - .fini = (void(*)(void *))kfree, + .fini = of_fini, .read = of_read, .size = of_size, .rw = false, -- 2.43.0