lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [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@infradead.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

    \
     
     \ /
      Last update: 2021-11-18 07:51    [W:4.873 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site