Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1280893rdb; Fri, 16 Feb 2024 10:27:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWUECjsE5ZIOcj3D+5e1l/FLCQbRr3SbR7m6/eWojDS1ise1lOTMiMrsmXXlvCU8eZH0kl7pWKqth565/CP8L4w+6CjTEHNKSiNgrOVWQ== X-Google-Smtp-Source: AGHT+IHZkxcbHJmJdDrqZtaDs1rBZFf5/D0HCHSzsRQWhmEdgGdugfbTQ1duLHWKTnqaGxHwSano X-Received: by 2002:a17:906:7196:b0:a3c:240e:e1db with SMTP id h22-20020a170906719600b00a3c240ee1dbmr4397057ejk.33.1708108074756; Fri, 16 Feb 2024 10:27:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708108074; cv=pass; d=google.com; s=arc-20160816; b=uXdUvTxu6TgwqVob/LaO1N3PwjjCar2erLayuE+auFkFRylBYoE5Ez4kv0cwAkMSKq E5Ast/LvqfzCWg0V+OkIcdcqDeJRRzTGR5Gr04Fg60VFwMBljXEcjtixHcuHC3jTC41W 4MzfAujMkkdabH/y58sIuV/06Kz+Of2jivbSoZ4hkLxQJhH2atO8rPFyLcLHOduy3rkR WAedr6EoVnHyFrehxWeiSnsvQ46Z9DDXZjc2CLXyTq9H/aur+yz9SwBTQl93vD27ya29 5fj8arLEYgCblBu16RJ7A0Ku/iHhAdlzYI9IKplNLQlzu4iq8eR7nl0pK1pO6yPsMCDX DYTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=3pAxnKiY0v6Unt1MeteP4zhCiQHYAe7S4qrGIbBvNAI=; fh=3r2E1leJPv6/qJ2rg1q/3S2pGIQ0Mhgrv0au9+A68tg=; b=laeDpnT02BiCaPfklAHDCZQMQsvpoIFQCWUuHdJw3f6qt3qUN5esxacaqDE4nvtm6z YSCyn2jElZlvBR9mnxWL4ROnzRR3wBkgoaSguqWQyfRBt/Sia92muBW8PyVK90aQF+DG oQbDUdqTGhLBsS/ebxv1ctZi5etDzJIoACx1gUyXsSx3jItP4Qg9P2c69tyZvVZeDVWy lnRjeXQxd5Pq4r6U4kVTXhkPEW1uXe4BUCi1fdqHOIAN4Y4xLP6nnGdEnXG4OHzMH0jU CPaH1WtpFuTGDuWjfyGwU+J+O9RE1U4Tstwk897yFCVOiIL87BOckIqb6lorv4+lre8w Jw1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GjfbCtA9; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-69150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69150-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g15-20020a1709067c4f00b00a3df592c05dsi153055ejp.621.2024.02.16.10.27.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:27:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GjfbCtA9; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-69150-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69150-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5863F1F216C6 for ; Fri, 16 Feb 2024 18:27:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EDC11350F6; Fri, 16 Feb 2024 18:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GjfbCtA9" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 9931113174B for ; Fri, 16 Feb 2024 18:27:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708108061; cv=none; b=WDXJAtWjnJKH5mFcbXaWmhYx1xDV9W1kwxt0JvPCKFZz2JECff9FGOVRYFC3jYuaKNCESaI5y4VoiuaD13aBH7nTaedpckUufmE3PrxRpcjwFid9pnee9GNh5KLzwAfqrFFTD0s24jQsqfAho6xnhBOeweJJTBVHq+Bf3hAU2MQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708108061; c=relaxed/simple; bh=UnShZ8EdBWD5I7RRNruBpEbtffINfrd97Kk9hac9+lQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=r+PPvTBxbaN1Wa8QvDx+BKVDYeF1fbsP8QDkB2lKfFTLRUTxpzOyOUhh4KhRwGeIqranS60coDt/OclRfygLy4Tqyi3PbCpACpd4rZI7V++x7WNw5CJuYte5awbTwwq7s8f7W+AFzt2D7tkIPhd2o0VSF29QPkJ6+5mgo8ZBxCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GjfbCtA9; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708108055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3pAxnKiY0v6Unt1MeteP4zhCiQHYAe7S4qrGIbBvNAI=; b=GjfbCtA9flktVchGPdcx621/wFUrJgrVIpkMD1GAuGJ46Y8H4IbJV2uUja6OxBifaEJZgT aXiGvkObZFD+OH2T0ZsvQ8se0HxT7ZgW14zsBEy0hGnigjuSKbcumFP2NNL/8RBt+qcA7D Pz7aSdfffXqUykA57zmYJP7j9zCACRc= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-91-LYwSfQq_NNu3PJieQw9TOA-1; Fri, 16 Feb 2024 13:27:33 -0500 X-MC-Unique: LYwSfQq_NNu3PJieQw9TOA-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a2c4e9cb449so173543366b.1 for ; Fri, 16 Feb 2024 10:27:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708108052; x=1708712852; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3pAxnKiY0v6Unt1MeteP4zhCiQHYAe7S4qrGIbBvNAI=; b=r7dKSwgjzvme3W3rf4F8LrVRav4zpWgu6v3Ryv3uYxe8AM1Bj1IAMBwaVCIrWLa0+S 0DC5wEIULCPCLwD5upNjeOUzZTWfzERBwe1iP+8Pu8UZpK+8w6irjWe6GjMN7w4EpgO4 0lzL6CS13RgVsQ20tHeoEDWb8BBax1UzTXdeJpH4LpjZfHQ/QbLTM+RnlC1YfkFzbmVI 6GrL8lhyqJMXfOxRdMC8Wo5IrqkOTuGHo5s0srQNAyFfdbyVk2U+wCBFF2Zm074y9Hwu sK9vWWjkSo2lLMmBBqS73QXNE7vIsM1Tdprs9f8TTXVzPOOgESwdXy2nS6IPCqPXTUVi KukQ== X-Forwarded-Encrypted: i=1; AJvYcCVi/kZhCCB1mUJ+ixPynoQ83t7/nsKOFHBPzT0+IzPPsj50wGreHBYXunp9Lhe1pAJlPUfMTiEOZcJCbTCcts2rBi7zwKCrF3j7L5Va X-Gm-Message-State: AOJu0YxYaoLWtIsmi+DpGo2v1fmtXBFy2m5JcBCEgZPaBtDEg6/g5w1Q eB1QMGtzsPeJ/98vrg3R6Ab0Xjxd4ke39PUnlBK7vtGQiclo0UuexCRmQi1YLmt1YYC5KZMd1VH NX3Wm9NU7aEgh7IF1onDutaxcEiLGHOafsyctXkkqBnA2cf+gdus7J64vUg/rKA== X-Received: by 2002:aa7:de0e:0:b0:564:7b9:8c18 with SMTP id h14-20020aa7de0e000000b0056407b98c18mr1164588edv.22.1708108052534; Fri, 16 Feb 2024 10:27:32 -0800 (PST) X-Received: by 2002:aa7:de0e:0:b0:564:7b9:8c18 with SMTP id h14-20020aa7de0e000000b0056407b98c18mr1164581edv.22.1708108052264; Fri, 16 Feb 2024 10:27:32 -0800 (PST) Received: from ?IPV6:2a02:810d:4b3f:ee94:abf:b8ff:feee:998b? ([2a02:810d:4b3f:ee94:abf:b8ff:feee:998b]) by smtp.gmail.com with ESMTPSA id p27-20020a056402501b00b00562d908daf4sm224163eda.84.2024.02.16.10.27.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Feb 2024 10:27:31 -0800 (PST) Message-ID: <9d9fcdeb-4d0c-4371-b871-ad1fb8055033@redhat.com> Date: Fri, 16 Feb 2024 19:27:29 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nouveau: fix function cast warnings Content-Language: en-US To: Arnd Bergmann , Karol Herbst , Lyude Paul 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 References: <20240213095753.455062-1-arnd@kernel.org> From: Danilo Krummrich Organization: RedHat In-Reply-To: <20240213095753.455062-1-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/13/24 10:57, Arnd Bergmann wrote: > 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 Applied to drm-misc-fixes, thanks! > --- > 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, > };