[PATCH v3] sound/oss/dmasound: fix build when drivers are mixed =y/=m
Randy Dunlap
rdunlap at infradead.org
Fri Apr 15 16:45:36 CEST 2022
On 4/15/22 06:48, Guenter Roeck wrote:
> On Tue, Apr 05, 2022 at 04:41:18PM -0700, Randy Dunlap wrote:
>> When CONFIG_DMASOUND_ATARI=m and CONFIG_DMASOUND_Q40=y (or vice versa),
>> dmasound_core.o can be built without dmasound_deinit() being defined,
>> causing a build error:
>>
>> ERROR: modpost: "dmasound_deinit" [sound/oss/dmasound/dmasound_atari.ko] undefined!
>>
>> Modify dmasound_core.c and dmasound.h so that dmasound_deinit() is
>> always available.
>>
>> The mixed modes (=y/=m) also mean that several variables and structs
>> have to be declared in all cases.
>>
>> Suggested-by: Arnd Bergmann <arnd at arndb.de>
>> Suggested-by: Geert Uytterhoeven <geert at linux-m68k.org>
>> Signed-off-by: Randy Dunlap <rdunlap at infradead.org>
>> Reported-by: kernel test robot <lkp at intel.com>
>> Link: lore.kernel.org/r/202204032138.EFT9qGEd-lkp at intel.com
>> Cc: Geert Uytterhoeven <geert at linux-m68k.org>
>> Cc: Jaroslav Kysela <perex at perex.cz>
>> Cc: Takashi Iwai <tiwai at suse.com>
>> Cc: alsa-devel at alsa-project.org
>> ---
>
> m68k:allmodconfig fails to build with this patch in the tree.
>
> Error log:
> sound/oss/dmasound/dmasound_core.c:1431:12: error: 'dmasound_setup' defined but not used
>
> ... because __setup() is empty if MODULE is defined.
>
> Guenter
Takashi has already merged a patch for this from Miles Chen.
thanks.
--
~Randy
More information about the Alsa-devel
mailing list