Re: [PATCH v4 12/32] sound: usb: Export USB SND APIs for modules

From: Greg KH
Date: Tue Jul 25 2023 - 01:34:05 EST


On Mon, Jul 24, 2023 at 07:33:56PM -0700, Wesley Cheng wrote:
> --- a/sound/usb/pcm.c
> +++ b/sound/usb/pcm.c
> @@ -87,7 +87,7 @@ static snd_pcm_uframes_t snd_usb_pcm_pointer(struct snd_pcm_substream *substream
> /*
> * find a matching audio format
> */
> -static const struct audioformat *
> +const struct audioformat *
> find_format(struct list_head *fmt_list_head, snd_pcm_format_t format,
> unsigned int rate, unsigned int channels, bool strict_match,
> struct snd_usb_substream *subs)
> @@ -147,8 +147,9 @@ find_format(struct list_head *fmt_list_head, snd_pcm_format_t format,
> }
> return found;
> }
> +EXPORT_SYMBOL_GPL(find_format);

This is a horrible symbol name for a global function, same for the other
ones in this file. If you really want to export them, please put them
in the proper "snd_" prefix namespace, or better yet, use a module
namespace as well to ensure that we know who is using them.

thanks,

greg k-h