Skip to contentSkip to conversation

ASoC: SOF: imx: add header file for ops

PATCH In review Peter Ujfalusi 2 participants 2 messages Sep 28, 2021

Subsystems (4)
lore
Share & tools
lore

Peter Ujfalusi

author maintainer
#0 lore raw

PATCH 1/1 ASoC: SOF: imx: add header file for ops

From: Pierre-Louis Bossart <[email protected]>

Sparse (make C=2) complains about undeclared variables. Fix by adding a real prototype instead of 'extern' in sof-of-dev.c

---
 sound/soc/sof/imx/imx-ops.h | 10 ++++++++++
 sound/soc/sof/imx/imx8.c    |  1 +
 sound/soc/sof/imx/imx8m.c   |  1 +
 sound/soc/sof/sof-of-dev.c  |  5 +----
 4 files changed, 13 insertions(+), 4 deletions(-)
 create mode 100644 sound/soc/sof/imx/imx-ops.h
sound/soc/sof/imx/imx-ops.h new file +10 -0
new file mode 100644
index 000000000000..24235ef8c8fa
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
+
+#ifndef __IMX_OPS_H__
+#define __IMX_OPS_H__
+
+extern struct snd_sof_dsp_ops sof_imx8_ops;
+extern struct snd_sof_dsp_ops sof_imx8x_ops;
+extern struct snd_sof_dsp_ops sof_imx8m_ops;
+
+#endif
sound/soc/sof/imx/imx8.c +1 -0
index 82ca920a69ab..cf27ee66b577 100644
@@ -22,6 +22,7 @@
 #include <dt-bindings/firmware/imx/rsrc.h>
 #include "../ops.h"
 #include "imx-common.h"
+#include "imx-ops.h"
 
 /* DSP memories */
 #define IRAM_OFFSET		0x10000
sound/soc/sof/imx/imx8m.c +1 -0
index 76f4ffd9d540..932c0e73a8b0 100644
@@ -18,6 +18,7 @@
 
 #include "../ops.h"
 #include "imx-common.h"
+#include "imx-ops.h"
 
 #define MBOX_OFFSET	0x800000
 #define MBOX_SIZE	0x1000
sound/soc/sof/sof-of-dev.c +1 -4
index d1a21edfa05d..f0f819a46456 100644
@@ -11,10 +11,7 @@
 #include <sound/sof.h>
 
 #include "ops.h"
-
-extern struct snd_sof_dsp_ops sof_imx8_ops;
-extern struct snd_sof_dsp_ops sof_imx8x_ops;
-extern struct snd_sof_dsp_ops sof_imx8m_ops;
+#include "imx/imx-ops.h"
 
 /* platform specific devices */
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8)
Signature · 1 line
2.33.0
maintainer
#1 lore raw
Quoted 6 lines · Peter Ujfalusi

From: Pierre-Louis Bossart <[email protected]>

Sparse (make C=2) complains about undeclared variables. Fix by adding a real prototype instead of 'extern' in sof-of-dev.c

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: imx: add header file for ops

      commit: 3e5cdded931a2b3653f87602113cc72f0f0ba99b

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark