diff mbox series

[01/14] ASoC: SOF: debug: Constify local snd_sof_dsp_ops

Message ID 20240414-n-const-ops-var-v1-1-8f53ee5d981c@kernel.org (mailing list archive)
State New, archived
Headers show
Series ASoC: Constify local snd_sof_dsp_ops | expand

Commit Message

Krzysztof Kozlowski April 14, 2024, 6:47 p.m. UTC
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
functioon does not modify pointed data.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 sound/soc/sof/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown April 26, 2024, 2:09 a.m. UTC | #1
On Sun, Apr 14, 2024 at 08:47:26PM +0200, Krzysztof Kozlowski wrote:
> Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
> functioon does not modify pointed data.

This doesn't apply against current code, please check and resend.
Krzysztof Kozlowski April 26, 2024, 7:58 a.m. UTC | #2
On 26/04/2024 04:09, Mark Brown wrote:
> On Sun, Apr 14, 2024 at 08:47:26PM +0200, Krzysztof Kozlowski wrote:
>> Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
>> functioon does not modify pointed data.
> 
> This doesn't apply against current code, please check and resend.

Maybe I am basing on wrong tree. I applied now on for-next of your
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ and
b4 did not complain - no hunk rejects.

I will resend based on that tree, but I expect same result. Let me know
if I should use different tree.


Best regards,
Krzysztof
Krzysztof Kozlowski April 26, 2024, 8 a.m. UTC | #3
On 26/04/2024 09:58, Krzysztof Kozlowski wrote:
> On 26/04/2024 04:09, Mark Brown wrote:
>> On Sun, Apr 14, 2024 at 08:47:26PM +0200, Krzysztof Kozlowski wrote:
>>> Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
>>> functioon does not modify pointed data.
>>
>> This doesn't apply against current code, please check and resend.
> 
> Maybe I am basing on wrong tree. I applied now on for-next of your
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/ and
> b4 did not complain - no hunk rejects.
> 
> I will resend based on that tree, but I expect same result. Let me know
> if I should use different tree.

Never mind, my bad, the base commit was not public, but a commit from my
development tree, so b4 properly figured out any conflicts transparently
in my case.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index cf282c8b18af..884d85770426 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -311,8 +311,8 @@  EXPORT_SYMBOL_GPL(snd_sof_dbg_memory_info_init);
 
 int snd_sof_dbg_init(struct snd_sof_dev *sdev)
 {
+	const struct snd_sof_dsp_ops *ops = sof_ops(sdev);
 	struct snd_sof_pdata *plat_data = sdev->pdata;
-	struct snd_sof_dsp_ops *ops = sof_ops(sdev);
 	const struct snd_sof_debugfs_map *map;
 	struct dentry *fw_profile;
 	int i;