Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2950375rdb; Tue, 13 Feb 2024 02:09:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWFwZB9u1SNpDVRsTs6xY1Gd8UQHFl/cQv3AhJkJ6NB8jSulhlRnpcmNRvmTykp0H0K/vWChshqExSk6u+9gEB5HM3yhr30yAOoVJrYHg== X-Google-Smtp-Source: AGHT+IFyMx7Jfau9bTGdkYx7C94b1QTLHT0IhCCbr7+ePZMve88GOs71ZloO2GW0XuaBBUgjjGHr X-Received: by 2002:a17:90a:3e85:b0:297:12da:505d with SMTP id k5-20020a17090a3e8500b0029712da505dmr2929225pjc.8.1707818978003; Tue, 13 Feb 2024 02:09:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707818977; cv=pass; d=google.com; s=arc-20160816; b=kOWXlXlV+P8q+dk6IUFo6OZEddfsRdi12NY6QYqRtFu42QKwKgbrTjJh0o/xeRU+1W +7OxUCmLYPWZ10bzFvIgw3usUEn3f5XUbyIPmvfA98DMNBIQOT9Z7WAwNOuOsubAMglg e9N5cqjdrofRTx2+/J1PdEErDJsGSpLv8NJJPAHqLmz/CrIWa3LAHd8F1EhLAPKHB9Vd rQ+8dfrf2aH/IgPLsnmmVSCEJmlQvTMTjzLTUKL3frJBTdvmApa7DZSxOsobhImzLiFP +90SDnjTstFBP+mKOXE95erhyos4PPDQCal3pShIXrtPPlBZdAl6WZoQCKDr9uX3yvYx p69g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=6noDLLXGK0QNemnr07WGrJQ2KoYnpnwq5XzOzKaUnis=; fh=3b16+wZF7bM5bAuA86dwCvV32MY31JCY3zU8IiBJZy8=; b=P36sc99Zp77AVhwJfdCkqbYa8b/iccOVEjPYAV7x5FNdhHlkaSayIvA4Z6th6UoJME GF91OMVm+M/psR9sgGSQdQLpfjm0kW/sJpjODszKnq9FleG5GLvcG5dWfiREx7eFipjX hggq8kZ+E+4LSJQnlCA3BNy2foaFvOs0mHLVk3vrznbzA/HuQIQXb8gmNHZoNKkA1Rrn VmJ6w5E85nJ7KhJcguhxCxlunnDXYJPozqncOEhzFDALv88Ag/9mAoq6od3cuLYCrDBe aLrqxLfcY3Wb7rOC0m11Kr2urgkgt9RmlSr/4v5hrXDwuKazjNGHc0BC9yDzedXBcP/O pIvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZD68QcUv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUA9/4IzSD7Hf0thDkM61YEavyokAeglQ7xIc3toyfWnUJyYSKKyHTZydw9b5qFFHr+nr0hZbLmSVGtnBkJ4UHtf9/HI6gGQUUAqE/EAg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ck22-20020a056a02091600b005dc875b87ddsi709009pgb.223.2024.02.13.02.09.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:09:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZD68QcUv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 05282281E27 for ; Tue, 13 Feb 2024 09:59:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4004224F2; Tue, 13 Feb 2024 09:58:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZD68QcUv" 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 CC07D224C6; Tue, 13 Feb 2024 09:57:59 +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=1707818279; cv=none; b=rTx9pxTsNXN+OtZ/lAvYx7rKmmj8hmtVilO7XvL8FkuqM0ctvGKE/arNaFcRkKbETSnyFV/P+EcP2kDVF2Jmex5H3I3d1C46kOK/PaFvKH4qPrFY8AaeofIbIi+fcb1Th4maVSvYXsyoPwaNZ3PSZm+sw3MRZ3zaklwYylmqv1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707818279; c=relaxed/simple; bh=Glcc2MGW7elmBxt2g9iRaVB3TCJHQ7FpBrYtJp1jN/s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=meD8I7EQcGs4CGAEcYFJy0reMw1mPI9NX8UHrVt6r/KGep/dpDesYmFRty2I+X/Wjg7T5ijLA2yO70Lge8bpYUeCvSuTHem8LyVO00Bs2MQDSL20cZuxlGf3VVyT5WTPLhQju5YH6cIjnQkTrsIj3kXPUy22svRgae/msKwRW7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZD68QcUv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E178C433F1; Tue, 13 Feb 2024 09:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707818279; bh=Glcc2MGW7elmBxt2g9iRaVB3TCJHQ7FpBrYtJp1jN/s=; h=From:To:Cc:Subject:Date:From; b=ZD68QcUv2ZwGhDjFT+aX2PpfQ0DNORu4GNAQoEqkZcUP5+/AKgE8mLG6d5P+Ala/2 JgsEzVcOHxTLoiZS/JJa0v+ed59naCZ+hJgCDf/8QvC+C8+QfIXm+SnV1ol1EfdYgU 69ueNLZZTxa9OsqmWkri/TRLM7yaydQIeYZDTIMQqGfqV+XiCEQo3nf3oJaYUvwT6D hx92u6Dd/yAG6nP2/dJ5Je9ptkKV4AGtYYCyxqNzOYkLgZReLTChxkUMtJ4dSIszum kUZ0r1tK7DZoezWKznY/o55nG1ArKoFbSH/fWYOxK/rliNgBuPgNX/ech4pFC6lb1Q APD1uBMpOdQmw== From: Arnd Bergmann To: Karol Herbst , Lyude Paul , Danilo Krummrich Cc: Arnd Bergmann , David Airlie , Daniel Vetter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Ben Skeggs , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] nouveau: fix function cast warnings Date: Tue, 13 Feb 2024 10:57:37 +0100 Message-Id: <20240213095753.455062-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann 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 --- 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 19188683c8fc..8c2bf1c16f2a 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.39.2