diff mbox series

[1/2] ALSA: compress_offload: import DMA_BUF namespace

Message ID 20241216093410.377112-1-arnd@kernel.org (mailing list archive)
State New
Headers show
Series [1/2] ALSA: compress_offload: import DMA_BUF namespace | expand

Commit Message

Arnd Bergmann Dec. 16, 2024, 9:33 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The compression offload code cannot be in a loadable module unless it
imports that namespace:

ERROR: modpost: module snd-compress uses symbol dma_buf_get from namespace DMA_BUF, but does not import it.
ERROR: modpost: module snd-compress uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
ERROR: modpost: module snd-compress uses symbol dma_buf_fd from namespace DMA_BUF, but does not import it.

Fixes: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/core/compress_offload.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Shengjiu Wang Dec. 16, 2024, 10:15 a.m. UTC | #1
On Mon, Dec 16, 2024 at 5:34 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The compression offload code cannot be in a loadable module unless it
> imports that namespace:
>
> ERROR: modpost: module snd-compress uses symbol dma_buf_get from namespace DMA_BUF, but does not import it.
> ERROR: modpost: module snd-compress uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
> ERROR: modpost: module snd-compress uses symbol dma_buf_fd from namespace DMA_BUF, but does not import it.
>
> Fixes: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

Best regards
Shengjiu Wang
> ---
>  sound/core/compress_offload.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> index 86ed2fbee0c8..ec2485c00e49 100644
> --- a/sound/core/compress_offload.c
> +++ b/sound/core/compress_offload.c
> @@ -1247,6 +1247,7 @@ void snd_compr_task_finished(struct snd_compr_stream *stream,
>  }
>  EXPORT_SYMBOL_GPL(snd_compr_task_finished);
>
> +MODULE_IMPORT_NS("DMA_BUF");
>  #endif /* CONFIG_SND_COMPRESS_ACCEL */
>
>  static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
> --
> 2.39.5
>
>
Vinod Koul Dec. 16, 2024, 4:28 p.m. UTC | #2
On 16-12-24, 10:33, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The compression offload code cannot be in a loadable module unless it
> imports that namespace:

Acked-by: Vinod Koul <vkoul@kernel.org>
diff mbox series

Patch

diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 86ed2fbee0c8..ec2485c00e49 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -1247,6 +1247,7 @@  void snd_compr_task_finished(struct snd_compr_stream *stream,
 }
 EXPORT_SYMBOL_GPL(snd_compr_task_finished);
 
+MODULE_IMPORT_NS("DMA_BUF");
 #endif /* CONFIG_SND_COMPRESS_ACCEL */
 
 static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)