Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3385184lqp; Tue, 26 Mar 2024 07:53:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8X56tgY22GkqNdRPLjn1T2h+MWjPYAY5Au2JAdFfYfR5OjF1RomwQH037O9AS3ckIPdntOcdmdNqtbUrERYVnAzX4VzZuwrkASw0LZg== X-Google-Smtp-Source: AGHT+IH8CTsajiVoEwaOrInlH+IYzDqrLyjVdcHRgpCbdmDvC7OYSl7lrxbSxJKIU6UqFJRsgbI4 X-Received: by 2002:a05:6a00:63c1:b0:6ea:acbe:517a with SMTP id gi1-20020a056a0063c100b006eaacbe517amr4944670pfb.16.1711464808017; Tue, 26 Mar 2024 07:53:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711464808; cv=pass; d=google.com; s=arc-20160816; b=I7l0bu0LKbcQABfHU46FyCz0Nmv5fK8Q7wzdIc8MjmAZBSt+yCTPhYSz6YMVLlwGmg QmWpx+vWAtFH0qt/IYOdHxsDnk5GWHvCUDoRc5b3eEudtc/jS+l9UN0nPBGqU6//x6mT VJF80P/qsbUUsM1ShRKzPCe5+DYbywSk0Ge3lFZZ77lS7h1uU8RashHVWKs5TZi3S9sM O2BTtsW7sl5jY/Hmk09fsKgGgx8IGSx5pkgqS0S8lx5zxhim9soI8Tnukjfls3g8LlMQ U2BlWlYILkRsIIbtksqnz5yDYI9I4SlgVABnuDsQ8QvuNq/4W+xIviO6zU79c6jWNKIw jiag== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LUgopiqkFQ07jaUY2v1GprKCfaXHKe1UPcqjj0Bpewk=; fh=0hByR6xGluVfdcoxO33qrgSRbz8HN57+3CGmoqLLE0Q=; b=krGwMdcIta8eyDhdrjxu8q7D5tJVuAfyM6ImKKoFekqq6Kyl2QG74sq/gqEmQo1uwM TEdHYJv+6h9wImnX/upSSNBToId3hdEK4N9BBktMNbKc6p5G9SP1ewrs9ewBL9k35Otg J4PKVVDKPEZ4QGfA9bzXUQ0WrsnTkricRMb7YbKoqlAEoWB7BA+L1ybW4+vMVsuPtR1B mHfA7cP3x2yuHpxyVwdA6dZ7hDcz96eJ+by5XlDerANExuWuAYve22EGMhWardhjKgeV tzJ73D2q/wlD2MM4Gt5DvDuPupoNJMyX2qAa2jcUI4IjN82ammqTMdFudYQw58JsvaM5 MGzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O7s4j7g+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119226-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u185-20020a6379c2000000b005e84998d26dsi10014146pgc.867.2024.03.26.07.53.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 07:53:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119226-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O7s4j7g+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119226-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119226-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 3753E29B5D0 for ; Tue, 26 Mar 2024 14:53:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0657413C8F6; Tue, 26 Mar 2024 14:52:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O7s4j7g+" 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 1DAF213C833; Tue, 26 Mar 2024 14:52:49 +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=1711464769; cv=none; b=gG4w0WwVzHc6oscZgtIBocCgkg/qlO6SvwBzaGM/IvYW8JOUuBxFTQTmpeqe10Sutd3I44P0tPUyscLGnFZMJPoKlWI7G0wm8b6/0RFV1e4oAe+gn3ep+WkmxgbSG8Z9bm0dOyr6mMbXBP5lxE/7XEtNPUE07GRy84rWWxDsJTw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711464769; c=relaxed/simple; bh=+QNmHJ+DrxUP3Ae2C2ybzUy3wAJstrkccZk3eUunkcQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NPA7Ldlyx4KNbmmyRoo2Hcfh7Fj+3Gcvh17DIDGqx5z451j5xmV64XaRG/sNHYBR2hsy84YCY9BVb9bOjx6xaEsNHB9M8JGgZ873nR3gKbngmM0ehRqJyY2PoA4WJZwrf1Z+kJzvX+3Tspxn5/qxeHoRzcdKTF2ojuJqwke7Fbs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O7s4j7g+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CD7DC433F1; Tue, 26 Mar 2024 14:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711464768; bh=+QNmHJ+DrxUP3Ae2C2ybzUy3wAJstrkccZk3eUunkcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O7s4j7g+hf00jrCuUCPg5dUwHZQdGcu1Fy2VlNvtZPLtQx55NwqBTGciplojuqlTP Vz7fAq8BYbpKi3Rx1Wt39zbMeeHint8AlIov3mYJnPQaBsbRLCg5oyzT93knxGzDUs b62vy4vxsJRLIJx777mKK/sqiNoT+oIfTeRqIwoG4wv0//tmMCc6IKBH6UlXNGIL1r kIr/jrPIPHVGUm/PP/WEH3CPp7DKTONJ5qWl8+nvgnBUCfmIjEGsaMtGpV8g7CE9GC kh46CJzp83yX/NiabyiQ3Uuj8hHGMKhrtsMiJjp+pqmteinvFcpkZOuyGi8lMRbTTo lD3pcAoEUjMcA== From: Arnd Bergmann To: linux-kbuild@vger.kernel.org, Masahiro Yamada , Karol Herbst , Lyude Paul , Danilo Krummrich , David Airlie , Daniel Vetter , Nathan Chancellor , Ben Skeggs Cc: Nicolas Schier , Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 06/12] nouveau: fix function cast warning Date: Tue, 26 Mar 2024 15:51:31 +0100 Message-Id: <20240326145140.3257163-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240326144741.3094687-1-arnd@kernel.org> References: <20240326144741.3094687-1-arnd@kernel.org> 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 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 --- 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 4bf486b57101..0dbcc23305f3 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) +{ + return 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.39.2