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 A422E13B2B9; Tue, 27 Feb 2024 13:45:51 +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=1709041551; cv=none; b=nYjaOvwIspbT0fzQ2y+JEd1yXhqsc0t1vXA0N74QoLn3YaLoSR1ABWz7kEAtNuGCNWdNCz9bjlcmwsJxcFwlLZMwBbpCwutjkoLfcheiI1vHYz20Dz/UNE6+e8jE9SnH5513/0TugKgBawMWYg/KErwx2M6x2h23YbUyyQHAX0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709041551; c=relaxed/simple; bh=0t6bQujChL++YSyyGglJ4E54wmPSW/u3juzNWHbMrlw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s63uf2djI+R6f9QxuKpSz6E6UDnovIgt2jslCSXBh0et/cvD+KKZ/7mNJELGzu/nkGv5o1Mq6Pu1E7v40FYj589eeFWDJ7/Ork8LVHiRPgLgkoSYLjn64QOM+YXINMz9+gZ9ilUSRPbuTtfZOoLTXRzxVKj08+G4MiuDl0caU0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OMVygS/P; 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="OMVygS/P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D41D7C433F1; Tue, 27 Feb 2024 13:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709041551; bh=0t6bQujChL++YSyyGglJ4E54wmPSW/u3juzNWHbMrlw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OMVygS/P3sXAe9YBcLITui/mGe6WZS8qtpwfohm+/V8w1s7cuT5+qR+pE2GO4R2Zl ieXwDWEeNlM3J0qyNCKfJPF8RHEX3oB2GEWV3+loFmApoB9fKGS+AuG5o0m1BEfw9n m/LyKrMr7fmSTiB5lYeEX/lvzZl23FNY6JNHnuBg= 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 44/52] nouveau: fix function cast warnings Date: Tue, 27 Feb 2024 14:26:31 +0100 Message-ID: <20240227131549.982093662@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227131548.514622258@linuxfoundation.org> References: <20240227131548.514622258@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 0affdba22aca5573f9d989bcb1d71d32a6a03efe ] clang-16 warns about casting between incompatible function types: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c:161:10: error: cast from 'void (*)(const struct firmware *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 161 | .fini = (void(*)(void *))release_firmware, This one was done to use the generic shadow_fw_release() function as a callback for struct nvbios_source. Change it to use the same prototype as the other five instances, with a trivial helper function that actually calls release_firmware. Fixes: 70c0f263cc2e ("drm/nouveau/bios: pull in basic vbios subdev, more to come later") Signed-off-by: Arnd Bergmann Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240213095753.455062-1-arnd@kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c index 4b571cc6bc70f..6597def18627e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c @@ -154,11 +154,17 @@ shadow_fw_init(struct nvkm_bios *bios, const char *name) return (void *)fw; } +static void +shadow_fw_release(void *fw) +{ + release_firmware(fw); +} + static const struct nvbios_source shadow_fw = { .name = "firmware", .init = shadow_fw_init, - .fini = (void(*)(void *))release_firmware, + .fini = shadow_fw_release, .read = shadow_fw_read, .rw = false, }; -- 2.43.0