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 8236B12C46E; Tue, 30 Apr 2024 10:41:56 +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=1714473716; cv=none; b=ezEYOs73AiKXkmen6mlVZ48klh4/fVNGBGbiAQN1sP27NMXGhKNkLFd9aMtxk98wkyPnfn9Wm9tL4rWYIiC6dXr15/n4zs+SjxwQDinE95GE+RplDnBTj3X6WYUwCvJajeZh27HXqn3nFgeStIyZWEtAVLzQghw8NGm/P7547FE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714473716; c=relaxed/simple; bh=ElqRgTYShYq77hfjsD6q0LaFWPIONq0Wf0VCZZD4XME=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sairI79cn0yBvrtYxHjNGGHLeE61aFz9PZEIZl7RNFEPm0ujZ6yR3cDTBOWa11yDC68LGQ9Xin65atDRJ3oHPWDvPS5h1bTHwhEDI8EzICGByB7qT0x34rhIwKH51B15ssvlX67RbumAR9t8NxkE8qvWpAzNxl6o8Qn8kukfl74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Xg4MMqjb; 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="Xg4MMqjb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F13B3C2BBFC; Tue, 30 Apr 2024 10:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714473716; bh=ElqRgTYShYq77hfjsD6q0LaFWPIONq0Wf0VCZZD4XME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xg4MMqjbTcSUdWMkysp7U/i3Xenmi+2Yr12SH7e/qd5RqF1qcBJEdPsN3Qr4ied+P 9PtJLWJWBRM3bFky6IYoS0vacLnRO0e18bP8TwoXrLkx3VKHQSJWo2G+GrwDFONpzE 00COtyjnA5B67hszpzAC6+k7m8iDx4+7zFrJ7x4I= 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 4.19 03/77] nouveau: fix function cast warning Date: Tue, 30 Apr 2024 12:38:42 +0200 Message-ID: <20240430103041.217996734@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240430103041.111219002@linuxfoundation.org> References: <20240430103041.111219002@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 4.19-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