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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 30 Apr 2024 17:52:39 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>, Jaroslav Kysela <perex@...ex.cz>,
 Takashi Iwai <tiwai@...e.com>, linux-sound@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: use inline function for type safety in
 snd_soc_substream_to_rtd()

On 30/04/2024 16:56, Mark Brown wrote:
> On Tue, Apr 30, 2024 at 04:09:38PM +0200, Krzysztof Kozlowski wrote:
> 
>> -#define snd_soc_substream_to_rtd(substream) \
>> -	(struct snd_soc_pcm_runtime *)snd_pcm_substream_chip(substream)
>> +
>> +static inline struct snd_soc_pcm_runtime *
>> +snd_soc_substream_to_rtd(const struct snd_pcm_substream *substream)
>> +{
>> +	return substream->private_data;
>> +}
> 
> This is not an obvious direct substitution, we've skipped the
> snd_pcm_subsystem_chip() (which is also a macro, but that just suggests
> it could do with it's own cleanup) and the commit log didn't mention it.

Yes, you're right. I should keep snd_pcm_substream_chip().

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ