Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp58848lqz; Fri, 29 Mar 2024 08:29:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXyhV0Jh4fdq8kwIhuuMbGPWPldMnMmdEkZjyLxA79WOe0CHTfSjVmsGu6wcWw47jPtS3iWUBHDofRjLI2J/3jyTXc7JlHmDzDITWUorA== X-Google-Smtp-Source: AGHT+IHq3Eatz4GGE3WcqXK5BDpsohtJdU9nUebPfhFC5gxLvAamXHfYyYjcAeB9bHNBl1lpo7Yr X-Received: by 2002:a05:6870:c7ac:b0:22a:57a2:7021 with SMTP id dy44-20020a056870c7ac00b0022a57a27021mr1900063oab.55.1711726148855; Fri, 29 Mar 2024 08:29:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711726148; cv=pass; d=google.com; s=arc-20160816; b=sxLtJaHQ1m6kuCxZN1kEIRXDHTGJwh6JoRWIlTBU8ZOuSb6VEZxFV5KPc8f4U4Nh+U MrcsmxFSWZSSaJD+PYrHb7gsbb/+zy6XDUHF1G1crTO4O2wktfSkgqM24AREfrZV0++A ds92gPlOx1RKUTcyMWUncIlXLL7qbieG+7vHFWvxu85Yea3Cm+w3eePr/g/xFDhIcNcW 7J8rXFUpHJszLVTnNWVJOTUkjLipEbHnWRYeRQ35rot1MYe90F5tdSfz43UAfrFD5bFS Nl5+TVzBGjEYvOXi5aTRHRu6DLvojO5sJSzt7zdcI/gMN8o29jqqCXCE7WCgV7StVt/G NPgA== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=zQhqCkbcA983IXjy9mUlFe9v7QYAyJfImXhl/9lihME=; fh=sJ2+PC/Y15nvWAq9qOT5X6ZQH797yTRY8fLij6ysngw=; b=POiwLhpqjw0C/zoM6zM4Ehier+j66PKOg+SewpH97uc0TKPV2b01zpfXx3K1aM+nfo TNxTMv0sf7iVSQN59WRVy+NSBYUhaGWEigrs1JNOLUe8us+AOjYs7Gr2DOaj27xMYSSh w3JpDb2pux7mHsbughexEWw/rljXXl8n6mR12jQZQAJ96e3/9Y0BZnDNlfICcgyjmuhU hLaWcVTzRr1EKgq9clqh2KVeAlxjQqREbBPSuNTOqiUg85dXPmZ4rccNMDfuLqAr3E2O bVU9GDGqDnWCvHvLdZd9+4zdk/fmnjIq/gFAuCI/8YdQa8gI1kdNAqa4Dfl/zU9Kz49V 09cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="TX3tMM4/"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-124986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a1-20020a63e841000000b005e84426a174si3849751pgk.397.2024.03.29.08.29.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 08:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="TX3tMM4/"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-124986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 75A6BB26C44 for ; Fri, 29 Mar 2024 14:44:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 157BF1AF59D; Fri, 29 Mar 2024 12:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="TX3tMM4/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MHu6ehBQ" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 499641509B2; Fri, 29 Mar 2024 12:49:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716571; cv=none; b=WFNp0eh+Ox+2Ws1hU6lhcjTkBggS84PPHreImeVFYa4RXNNXEzD5rVSAbkdmb6wIh+0ArkDnA/WmPh8j6gTjEd5TiyFPlbdErEzfVvPvGNN5YfN/29s/gCFlaICBWf4PGmlQvWDaAbI1s5XEsL2oDbVrR5Y+nSAwWQjofgS4Fzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716571; c=relaxed/simple; bh=nXxhZPz8FVTyUJ4AlqPr2hJ9WUeCgGrDJRtsuIgYtB4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KDV8sYJYXjrsuuMNpifAbzR8aWW6QmKW2Dmna6/Ity0tNXMGscS2Mdnz/RLkrlnVSDzBzdqC+/ecloGgkPBoH+hSiOWh/QSEJ5gKDM+ZvVSGp7BRGOZv7uU4hzen2VIYCxxioN5tgnk0hxoDIEkYuYtte2fDq9lGJ67Yla+jAlQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=TX3tMM4/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MHu6ehBQ; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 53A585C557; Fri, 29 Mar 2024 12:49:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711716562; h=from:from:reply-to: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=zQhqCkbcA983IXjy9mUlFe9v7QYAyJfImXhl/9lihME=; b=TX3tMM4/0DjXLSlOV6rNKv0mTwK6vHbYjCJUJIf+m141IiLAZgrLezUsm9IoMpVSxIqBpb Nw2FazFcE/0sfVCBYRf13AFTNNsTwDwJHU5O1lLiHXuXRXmEm0I1bC2psHoEYfnctfojY8 AJ9qR4vx6Pf4NAWmIu8GiBRQklQxKjk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711716562; h=from:from:reply-to: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=zQhqCkbcA983IXjy9mUlFe9v7QYAyJfImXhl/9lihME=; b=MHu6ehBQl41Fw65AwEvYTP7et0t4RxErT1i4Ng+Vbesf8KQTLSDzybkHgFdoaJLo8+9aXE IF6K0dNWhL/Su/Cg== Authentication-Results: smtp-out2.suse.de; dkim=none Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id A88D313A89; Fri, 29 Mar 2024 12:49:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id ZGB1ItC4BmaDRgAAn2gu4w (envelope-from ); Fri, 29 Mar 2024 12:49:20 +0000 Date: Fri, 29 Mar 2024 13:49:17 +0100 From: Jean Delvare To: Arnd Bergmann Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Greg Kroah-Hartman , Nicolas Schier , Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 05/12] firmware: dmi-id: add a release callback function Message-ID: <20240329134917.579c3557@endymion.delvare> In-Reply-To: <20240326145140.3257163-4-arnd@kernel.org> References: <20240326144741.3094687-1-arnd@kernel.org> <20240326145140.3257163-4-arnd@kernel.org> Organization: SUSE Linux X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-suse-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 53A585C557 X-Spamd-Result: default: False [-3.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_SHORT(-0.19)[-0.945]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWELVE(0.00)[12]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:98:from]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email] X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Score: -3.30 X-Spam-Level: X-Spam-Flag: NO Hi Arnd, On Tue, 26 Mar 2024 15:51:30 +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > dmi_class uses kfree() as the .release function, but that now causes > a warning with clang-16 as it violates control flow integrity (KCFI) > rules: > > drivers/firmware/dmi-id.c:174:17: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] > 174 | .dev_release = (void(*)(struct device *)) kfree, > > Add an explicit function to call kfree() instead. > > Fixes: 4f5c791a850e ("DMI-based module autoloading") Not sure if this fixes tag is really warranted. As I understand it, your change only removes a warning but there was no actual bug, right? > Link: https://lore.kernel.org/lkml/20240213100238.456912-1-arnd@kernel.org/ > Signed-off-by: Arnd Bergmann > --- > I sent this before but got no comments for it I indeed overlooked your initial submission, my bad. > --- > drivers/firmware/dmi-id.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c > index 5f3a3e913d28..d19c78a78ae3 100644 > --- a/drivers/firmware/dmi-id.c > +++ b/drivers/firmware/dmi-id.c > @@ -169,9 +169,14 @@ static int dmi_dev_uevent(const struct device *dev, struct kobj_uevent_env *env) > return 0; > } > > +static void dmi_dev_release(struct device *dev) > +{ > + kfree(dev); > +} > + > static struct class dmi_class = { > .name = "dmi", > - .dev_release = (void(*)(struct device *)) kfree, > + .dev_release = dmi_dev_release, > .dev_uevent = dmi_dev_uevent, > }; > Looks good to me, thanks for doing that. Signed-off-by: Jean Delvare Will you get this upstream, or do you expect me to take it in my dmi/for-next branch? -- Jean Delvare SUSE L3 Support