lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZqNawRmAqBRLIoQq@opensource.cirrus.com>
Date: Fri, 26 Jul 2024 09:13:53 +0100
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Javier Carrasco <javier.carrasco.cruz@...il.com>
CC: Tim Harvey <tharvey@...eworks.com>,
        Mauro Carvalho Chehab
	<mchehab@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>, Mark Brown
	<broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai
	<tiwai@...e.com>,
        Ray Jui <rjui@...adcom.com>, Scott Branden
	<sbranden@...adcom.com>,
        Broadcom internal kernel review list
	<bcm-kernel-feedback-list@...adcom.com>,
        David Rhodes
	<david.rhodes@...rus.com>,
        Richard Fitzgerald <rf@...nsource.cirrus.com>,
        Shenghao Ding <shenghao-ding@...com>, Kevin Lu <kevin-lu@...com>,
        Baojun Xu
	<baojun.xu@...com>,
        Olivier Moysan <olivier.moysan@...s.st.com>,
        "Arnaud
 Pouliquen" <arnaud.pouliquen@...s.st.com>,
        Maxime Coquelin
	<mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
        Masami Hiramatsu
	<mhiramat@...nel.org>, <linux-media@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-sound@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <alsa-devel@...a-project.org>,
        <patches@...nsource.cirrus.com>,
        <linux-stm32@...md-mailman.stormreply.com>
Subject: Re: [PATCH 2/2] ASoC: constify snd_soc_component_driver struct

On Thu, Jul 25, 2024 at 12:31:40PM +0200, Javier Carrasco wrote:
> The instances of the `snd_soc_component_driver` struct are not modified
> after their declaration, and they are only passed to
> `devm_snd_soc_register_component()`, which expects a constant
> `snd_soc_component_driver`.
> 
> Move all instances of `snd_soc_component_driver` to read-only sections
> by declaring them const.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
>  sound/soc/codecs/cs43130.c           | 2 +-

> -static struct snd_soc_component_driver soc_component_dev_cs43130 = {
> +static const struct snd_soc_component_driver soc_component_dev_cs43130 = {
>  	.probe			= cs43130_probe,
>  	.controls		= cs43130_snd_controls,
>  	.num_controls		= ARRAY_SIZE(cs43130_snd_controls),

This won't work for cs43130, whilst what the driver does is
clearly slightly sketch it directly modifies this struct before
registering it with ASoC. That would need fixed first before this
change can be made.

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ