[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1s_toN_J=M8gxcVrtEazZ+Mu9UYbKMVkG3MzDLSCEOfQ@mail.gmail.com>
Date: Thu, 18 Nov 2021 07:50:40 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kernel test robot <lkp@...el.com>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
ALSA Development Mailing List <alsa-devel@...a-project.org>
Subject: Re: [PATCH] sound/oss/dmasound: fix build when some drivers are =m
and others are =y
On Thu, Nov 18, 2021 at 7:21 AM Randy Dunlap <rdunlap@...radead.org> wrote:
>
> When CONFIG_DMASOUND_ATARI=y and CONFIG_DMASOUND_Q40=m,
> dmasound_atari.o is built first (listed first in the Makefile),
> so dmasound_core.o is built as builtin, not for use by loadable
> modules. Then dmasound_q40.o is built and linked with the
> already-built dmasound_core.o, but the latter does not support
> use by loadable modules. This causes the missing symbol to be
> undefined.
>
> Fixes this build error:
> ERROR: modpost: "dmasound_deinit" [sound/oss/dmasound/dmasound_q40.ko] undefined!
I suspect your patch now breaks the case where multiple drivers are
built-in, because that puts the same global symbols into vmlinux more
than once.
> -EXPORT_SYMBOL(dmasound);
> -EXPORT_SYMBOL(dmasound_init);
> -#ifdef MODULE
> -EXPORT_SYMBOL(dmasound_deinit);
> -#endif
>From a very brief look, I would think that removing this #ifdef and
unconditionally defining dmasound_deinit is the correct solution
here, to solve the case of the core driver being built-in but called
from a loadable module, the Makefile logic is otherwise correct.
Arnd
Powered by blists - more mailing lists