Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
On Sun, 22 Apr 2018 20:05:03 +0200, kbuild test robot wrote: > > Hi Mauro, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on linuxtv-media/master] > [also build test WARNING on v4.17-rc1 next-20180420] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-radio-allow-building-ISA-drivers-with-COMPILE_TEST/20180422-180508 > base: git://linuxtv.org/media_tree.git master > reproduce: > # apt-get install sparse > make ARCH=x86_64 allmodconfig > make C=1 CF=-D__CHECK_ENDIAN__ > > > sparse warnings: (new ones prefixed by >>) > > >> sound/isa/wss/wss_lib.c:551:14: sparse: restricted snd_pcm_format_t > >> degrades to integer Oh, so many minor issues surfaced by COMPILE_TEST. But these are all legacy ISA drivers, so I'll work on and take only safe fixes that are obvious and trivial, if any. thanks, Takashi
Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.17-rc1 next-20180420] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/media-radio-allow-building-ISA-drivers-with-COMPILE_TEST/20180422-180508 base: git://linuxtv.org/media_tree.git master reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> sound/isa/wss/wss_lib.c:551:14: sparse: restricted snd_pcm_format_t degrades >> to integer sound/isa/wss/wss_lib.c:552:14: sparse: restricted snd_pcm_format_t degrades to integer sound/isa/wss/wss_lib.c:553:14: sparse: restricted snd_pcm_format_t degrades to integer sound/isa/wss/wss_lib.c:554:14: sparse: restricted snd_pcm_format_t degrades to integer sound/isa/wss/wss_lib.c:555:14: sparse: restricted snd_pcm_format_t degrades to integer >> sound/isa/wss/wss_lib.c:1003:58: sparse: incorrect type in argument 2 >> (different base types) @@expected int [signed] format @@got >> restricted sndint [signed] format @@ sound/isa/wss/wss_lib.c:1003:58:expected int [signed] format sound/isa/wss/wss_lib.c:1003:58:got restricted snd_pcm_format_t sound/isa/wss/wss_lib.c:1046:58: sparse: incorrect type in argument 2 (different base types) @@expected int [signed] format @@got restricted sndint [signed] format @@ sound/isa/wss/wss_lib.c:1046:58:expected int [signed] format sound/isa/wss/wss_lib.c:1046:58:got restricted snd_pcm_format_t -- >> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using >> sizeof(void) >> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using >> sizeof(void) >> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using >> sizeof(void) >> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using >> sizeof(void) >> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using >> sizeof(void) >> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using >> sizeof(void) >> drivers/media/radio/radio-miropcm20.c:292:21: sparse: expression using >> sizeof(void) -- >> sound/isa/cmi8328.c:195:5: sparse: symbol 'array_find' was not declared. >> Should it be static? >> sound/isa/cmi8328.c:206:5: sparse: symbol 'array_find_l' was not declared. >> Should it be static? -- >> sound/isa/sscape.c:477:23: sparse: expression using sizeof(void) >> sound/isa/sscape.c:477:23: sparse: expression using sizeof(void) -- >> sound/isa/msnd/msnd_pinnacle.c:85:32: sparse: incorrect type in assignment >> (different base types) @@expected int [signed] play_sample_size @@ >> got restricted snd_pcm_format_int [signed] play_sample_size @@ sound/isa/msnd/msnd_pinnacle.c:85:32:expected int [signed] play_sample_size sound/isa/msnd/msnd_pinnacle.c:85:32:got restricted snd_pcm_format_t [usertype] >> sound/isa/msnd/msnd_pinnacle.c:88:35: sparse: incorrect type in assignment >> (different base types) @@expected int [signed] capture_sample_size @@ >> got restricted snd_pcm_format_int [signed] capture_sample_size @@ sound/isa/msnd/msnd_pinnacle.c:88:35:expected int [signed] capture_sample_size sound/isa/msnd/msnd_pinnacle.c:88:35:got restricted snd_pcm_format_t [usertype] >> sound/isa/msnd/msnd_pinnacle.c:172:45: sparse: incorrect type in initializer >> (different address spaces) @@expected void *pwDSPQData @@got void >> [noderef] * >> sound/isa/msnd/msnd_pinnacle.c:185:62: sparse: incorrect type in argument 1 >> (different address spaces) @@expected void const volatile [noderef] >> *addr @@got sn:2>*addr @@ sound/isa/msnd/msnd_pinnacle.c:185:62:expected void const volatile [noderef] *addr sound/isa/msnd/msnd_pinnacle.c:185:62:got void * >> sound/isa/msnd/msnd_pinnacle.c:344:33: sparse: incorrect type in argument 1 >> (different address spaces) @@expected void *base @@got void >> [noderef] *DAPQ sound/isa/msnd/msnd_pinnacle.c:348:33: sparse: incorrect type in argument 1 (different address spaces) @@expected void *base @@got void [noderef] *DARQ sound/isa/msnd/msnd_pinnacle.c:352:33: sparse: incorrect type in argument 1 (different address spaces) @@expected void *base @@got void [noderef] *MODQ sound/isa/msnd/msnd_pinnacle.c:356:33: sparse: incorrect type in argument 1 (different address spaces) @@expected void *base @@got void [noderef] *MIDQ sound/isa/msnd/msnd_pinnacle.c:360:33: sparse: incorrect type in argument 1 (different address spaces) @@expected void *base @@got void [noderef] *DSPQ >> sound/isa/msnd/msnd_pinnacle.c:813:1: sparse: Using plain integer as NULL >> pointer -- >> sound/isa/msnd/msnd.c:59:43: sparse:
Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
Em Fri, 20 Apr 2018 14:58:15 +0200 Takashi Iwaiescreveu: > On Fri, 20 Apr 2018 14:51:29 +0200, > Mauro Carvalho Chehab wrote: > > > > Em Fri, 20 Apr 2018 14:37:46 +0200 > > Takashi Iwai escreveu: > > > > > On Fri, 20 Apr 2018 14:32:15 +0200, > > > Mauro Carvalho Chehab wrote: > > > > > > > > All sound drivers that don't depend on PNP can be safelly > > > > build with COMPILE_TEST, as ISA provides function stubs to > > > > be used for such purposes. > > > > > > > > As a side effect, with this change, the radio-miropcm20 > > > > can now be built outside i386 with COMPILE_TEST. > > > > > > > > Signed-off-by: Mauro Carvalho Chehab > > > > --- > > > > drivers/media/radio/Kconfig | 3 ++- > > > > sound/isa/Kconfig | 9 + > > > > 2 files changed, 7 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig > > > > index d363726e9eb1..8fa403c7149e 100644 > > > > --- a/drivers/media/radio/Kconfig > > > > +++ b/drivers/media/radio/Kconfig > > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE > > > > > > > > config RADIO_MIROPCM20 > > > > tristate "miroSOUND PCM20 radio" > > > > - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND > > > > + depends on ISA || COMPILE_TEST > > > > + depends on ISA_DMA_API && VIDEO_V4L2 && SND > > > > select SND_ISA > > > > select SND_MIRO > > > > ---help--- > > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig > > > > index cb54d9c0a77f..d2a6cdd0395c 100644 > > > > --- a/sound/isa/Kconfig > > > > +++ b/sound/isa/Kconfig > > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP > > > > > > > > menuconfig SND_ISA > > > > bool "ISA sound devices" > > > > - depends on ISA && ISA_DMA_API > > > > + depends on ISA || COMPILE_TEST > > > > + depends on ISA_DMA_API > > > > default y > > > > help > > > > Support for sound devices connected via the ISA bus. > > > > @@ -38,7 +39,7 @@ config SND_ADLIB > > > > > > > > config SND_AD1816A > > > > tristate "Analog Devices SoundPort AD1816A" > > > > - depends on PNP > > > > + depends on PNP && ISA > > > > select ISAPNP > > > > select SND_OPL3_LIB > > > > select SND_MPU401_UART > > > > > > Just from curiosity: what's the reason for this explicit CONFIG_ISA > > > dependency? What error did you get? > > > > Kconfig complains with "select ISAPNP": > > > > WARNING: unmet direct dependencies detected for ISAPNP > > Depends on [n]: PNP [=y] && ISA [=n] > > Selected by [y]: > > - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && > > PNP [=y] > > > > Because it is declared as: > > > > config ISAPNP > > bool "ISA Plug and Play support" > > depends on ISA > > I see. Then it'd be better to put this explanations in the changelog > as well. Added. See enclosed. > > > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST, > > but I suspect that would touch on yet another subsystem and has > > the potential to point to other things that need changes, as > > a lot more drivers will be selected. > > > > Anyway, after a quick look at include/linux/isapnp.h, I suspect > > that this can work. > > > > I'll run some tests here. > > At least a dumb stub is there, so let's hope we can widen the test > coverage :) Yes, that's the idea :-) Right now, for every patch I receive, I build media drivers for i386 (I just made all of them build on i386), but I'm considering doing such builds on x86_64 instead, as it also enables compat32 code. Thanks, Mauro [PATCH v2] sound, media: allow building ISA drivers it with COMPILE_TEST All sound drivers that don't depend on PNP can be safelly build with COMPILE_TEST, as ISA provides function stubs to be used for such purposes. As a side effect, with this change, the radio-miropcm20 can now be built outside i386 with COMPILE_TEST. It should be noticed that ISAPNP currently depends on ISA. So, on drivers that depend on it, we need to add an explicit dependency on ISA, at least until another patch removes it. Signed-off-by: Mauro Carvalho Chehab --- v2: only patch description changed, with the addition of a note about ISA explicit dependency on 3 drivers. diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index d363726e9eb1..8fa403c7149e 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE config RADIO_MIROPCM20 tristate "miroSOUND PCM20 radio" - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND + depends on ISA || COMPILE_TEST + depends on ISA_DMA_API && VIDEO_V4L2 && SND select SND_ISA select SND_MIRO ---help--- diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index cb54d9c0a77f..d2a6cdd0395c
Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
On Fri, 20 Apr 2018 15:01:22 +0200, Mauro Carvalho Chehab wrote: > > Em Fri, 20 Apr 2018 09:51:29 -0300 > Mauro Carvalho Chehabescreveu: > > > Em Fri, 20 Apr 2018 14:37:46 +0200 > > Takashi Iwai escreveu: > > > > > On Fri, 20 Apr 2018 14:32:15 +0200, > > > Mauro Carvalho Chehab wrote: > > > > > > > > All sound drivers that don't depend on PNP can be safelly > > > > build with COMPILE_TEST, as ISA provides function stubs to > > > > be used for such purposes. > > > > > > > > As a side effect, with this change, the radio-miropcm20 > > > > can now be built outside i386 with COMPILE_TEST. > > > > > > > > Signed-off-by: Mauro Carvalho Chehab > > > > --- > > > > drivers/media/radio/Kconfig | 3 ++- > > > > sound/isa/Kconfig | 9 + > > > > 2 files changed, 7 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig > > > > index d363726e9eb1..8fa403c7149e 100644 > > > > --- a/drivers/media/radio/Kconfig > > > > +++ b/drivers/media/radio/Kconfig > > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE > > > > > > > > config RADIO_MIROPCM20 > > > > tristate "miroSOUND PCM20 radio" > > > > - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND > > > > + depends on ISA || COMPILE_TEST > > > > + depends on ISA_DMA_API && VIDEO_V4L2 && SND > > > > select SND_ISA > > > > select SND_MIRO > > > > ---help--- > > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig > > > > index cb54d9c0a77f..d2a6cdd0395c 100644 > > > > --- a/sound/isa/Kconfig > > > > +++ b/sound/isa/Kconfig > > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP > > > > > > > > menuconfig SND_ISA > > > > bool "ISA sound devices" > > > > - depends on ISA && ISA_DMA_API > > > > + depends on ISA || COMPILE_TEST > > > > + depends on ISA_DMA_API > > > > default y > > > > help > > > > Support for sound devices connected via the ISA bus. > > > > @@ -38,7 +39,7 @@ config SND_ADLIB > > > > > > > > config SND_AD1816A > > > > tristate "Analog Devices SoundPort AD1816A" > > > > - depends on PNP > > > > + depends on PNP && ISA > > > > select ISAPNP > > > > select SND_OPL3_LIB > > > > select SND_MPU401_UART > > > > > > Just from curiosity: what's the reason for this explicit CONFIG_ISA > > > dependency? What error did you get? > > > > Kconfig complains with "select ISAPNP": > > > > WARNING: unmet direct dependencies detected for ISAPNP > > Depends on [n]: PNP [=y] && ISA [=n] > > Selected by [y]: > > - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && > > PNP [=y] > > > > Because it is declared as: > > > > config ISAPNP > > bool "ISA Plug and Play support" > > depends on ISA > > > > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST, > > but I suspect that would touch on yet another subsystem and has > > the potential to point to other things that need changes, as > > a lot more drivers will be selected. > > > > Anyway, after a quick look at include/linux/isapnp.h, I suspect > > that this can work. > > > > I'll run some tests here. > > Yes, removing the ISAPNP dependency if COMPILE_TEST is trivial too. > > Just sent a separate patch to be applied after this one with such > removal. > > I opted to make it as a separate patch as, if the drivers there > fail to build on some weird architecture, we won't need to discard > this one. OK, then feel free to take my ack: Acked-by: Takashi Iwai But still it'd be better to mention about the CONFIG_ISA change, even though it'll be removed again after the ISAPNP COMIPLE_TEST patch. thanks, Takashi
Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
Em Fri, 20 Apr 2018 09:51:29 -0300 Mauro Carvalho Chehabescreveu: > Em Fri, 20 Apr 2018 14:37:46 +0200 > Takashi Iwai escreveu: > > > On Fri, 20 Apr 2018 14:32:15 +0200, > > Mauro Carvalho Chehab wrote: > > > > > > All sound drivers that don't depend on PNP can be safelly > > > build with COMPILE_TEST, as ISA provides function stubs to > > > be used for such purposes. > > > > > > As a side effect, with this change, the radio-miropcm20 > > > can now be built outside i386 with COMPILE_TEST. > > > > > > Signed-off-by: Mauro Carvalho Chehab > > > --- > > > drivers/media/radio/Kconfig | 3 ++- > > > sound/isa/Kconfig | 9 + > > > 2 files changed, 7 insertions(+), 5 deletions(-) > > > > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig > > > index d363726e9eb1..8fa403c7149e 100644 > > > --- a/drivers/media/radio/Kconfig > > > +++ b/drivers/media/radio/Kconfig > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE > > > > > > config RADIO_MIROPCM20 > > > tristate "miroSOUND PCM20 radio" > > > - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND > > > + depends on ISA || COMPILE_TEST > > > + depends on ISA_DMA_API && VIDEO_V4L2 && SND > > > select SND_ISA > > > select SND_MIRO > > > ---help--- > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig > > > index cb54d9c0a77f..d2a6cdd0395c 100644 > > > --- a/sound/isa/Kconfig > > > +++ b/sound/isa/Kconfig > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP > > > > > > menuconfig SND_ISA > > > bool "ISA sound devices" > > > - depends on ISA && ISA_DMA_API > > > + depends on ISA || COMPILE_TEST > > > + depends on ISA_DMA_API > > > default y > > > help > > > Support for sound devices connected via the ISA bus. > > > @@ -38,7 +39,7 @@ config SND_ADLIB > > > > > > config SND_AD1816A > > > tristate "Analog Devices SoundPort AD1816A" > > > - depends on PNP > > > + depends on PNP && ISA > > > select ISAPNP > > > select SND_OPL3_LIB > > > select SND_MPU401_UART > > > > Just from curiosity: what's the reason for this explicit CONFIG_ISA > > dependency? What error did you get? > > Kconfig complains with "select ISAPNP": > > WARNING: unmet direct dependencies detected for ISAPNP > Depends on [n]: PNP [=y] && ISA [=n] > Selected by [y]: > - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP > [=y] > > Because it is declared as: > > config ISAPNP > bool "ISA Plug and Play support" > depends on ISA > > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST, > but I suspect that would touch on yet another subsystem and has > the potential to point to other things that need changes, as > a lot more drivers will be selected. > > Anyway, after a quick look at include/linux/isapnp.h, I suspect > that this can work. > > I'll run some tests here. Yes, removing the ISAPNP dependency if COMPILE_TEST is trivial too. Just sent a separate patch to be applied after this one with such removal. I opted to make it as a separate patch as, if the drivers there fail to build on some weird architecture, we won't need to discard this one. Thanks, Mauro
Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
On Fri, 20 Apr 2018 14:51:29 +0200, Mauro Carvalho Chehab wrote: > > Em Fri, 20 Apr 2018 14:37:46 +0200 > Takashi Iwaiescreveu: > > > On Fri, 20 Apr 2018 14:32:15 +0200, > > Mauro Carvalho Chehab wrote: > > > > > > All sound drivers that don't depend on PNP can be safelly > > > build with COMPILE_TEST, as ISA provides function stubs to > > > be used for such purposes. > > > > > > As a side effect, with this change, the radio-miropcm20 > > > can now be built outside i386 with COMPILE_TEST. > > > > > > Signed-off-by: Mauro Carvalho Chehab > > > --- > > > drivers/media/radio/Kconfig | 3 ++- > > > sound/isa/Kconfig | 9 + > > > 2 files changed, 7 insertions(+), 5 deletions(-) > > > > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig > > > index d363726e9eb1..8fa403c7149e 100644 > > > --- a/drivers/media/radio/Kconfig > > > +++ b/drivers/media/radio/Kconfig > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE > > > > > > config RADIO_MIROPCM20 > > > tristate "miroSOUND PCM20 radio" > > > - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND > > > + depends on ISA || COMPILE_TEST > > > + depends on ISA_DMA_API && VIDEO_V4L2 && SND > > > select SND_ISA > > > select SND_MIRO > > > ---help--- > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig > > > index cb54d9c0a77f..d2a6cdd0395c 100644 > > > --- a/sound/isa/Kconfig > > > +++ b/sound/isa/Kconfig > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP > > > > > > menuconfig SND_ISA > > > bool "ISA sound devices" > > > - depends on ISA && ISA_DMA_API > > > + depends on ISA || COMPILE_TEST > > > + depends on ISA_DMA_API > > > default y > > > help > > > Support for sound devices connected via the ISA bus. > > > @@ -38,7 +39,7 @@ config SND_ADLIB > > > > > > config SND_AD1816A > > > tristate "Analog Devices SoundPort AD1816A" > > > - depends on PNP > > > + depends on PNP && ISA > > > select ISAPNP > > > select SND_OPL3_LIB > > > select SND_MPU401_UART > > > > Just from curiosity: what's the reason for this explicit CONFIG_ISA > > dependency? What error did you get? > > Kconfig complains with "select ISAPNP": > > WARNING: unmet direct dependencies detected for ISAPNP > Depends on [n]: PNP [=y] && ISA [=n] > Selected by [y]: > - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP > [=y] > > Because it is declared as: > > config ISAPNP > bool "ISA Plug and Play support" > depends on ISA I see. Then it'd be better to put this explanations in the changelog as well. > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST, > but I suspect that would touch on yet another subsystem and has > the potential to point to other things that need changes, as > a lot more drivers will be selected. > > Anyway, after a quick look at include/linux/isapnp.h, I suspect > that this can work. > > I'll run some tests here. At least a dumb stub is there, so let's hope we can widen the test coverage :) thanks, Takashi
Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
Em Fri, 20 Apr 2018 14:37:46 +0200 Takashi Iwaiescreveu: > On Fri, 20 Apr 2018 14:32:15 +0200, > Mauro Carvalho Chehab wrote: > > > > All sound drivers that don't depend on PNP can be safelly > > build with COMPILE_TEST, as ISA provides function stubs to > > be used for such purposes. > > > > As a side effect, with this change, the radio-miropcm20 > > can now be built outside i386 with COMPILE_TEST. > > > > Signed-off-by: Mauro Carvalho Chehab > > --- > > drivers/media/radio/Kconfig | 3 ++- > > sound/isa/Kconfig | 9 + > > 2 files changed, 7 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig > > index d363726e9eb1..8fa403c7149e 100644 > > --- a/drivers/media/radio/Kconfig > > +++ b/drivers/media/radio/Kconfig > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE > > > > config RADIO_MIROPCM20 > > tristate "miroSOUND PCM20 radio" > > - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND > > + depends on ISA || COMPILE_TEST > > + depends on ISA_DMA_API && VIDEO_V4L2 && SND > > select SND_ISA > > select SND_MIRO > > ---help--- > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig > > index cb54d9c0a77f..d2a6cdd0395c 100644 > > --- a/sound/isa/Kconfig > > +++ b/sound/isa/Kconfig > > @@ -20,7 +20,8 @@ config SND_SB16_DSP > > > > menuconfig SND_ISA > > bool "ISA sound devices" > > - depends on ISA && ISA_DMA_API > > + depends on ISA || COMPILE_TEST > > + depends on ISA_DMA_API > > default y > > help > > Support for sound devices connected via the ISA bus. > > @@ -38,7 +39,7 @@ config SND_ADLIB > > > > config SND_AD1816A > > tristate "Analog Devices SoundPort AD1816A" > > - depends on PNP > > + depends on PNP && ISA > > select ISAPNP > > select SND_OPL3_LIB > > select SND_MPU401_UART > > Just from curiosity: what's the reason for this explicit CONFIG_ISA > dependency? What error did you get? Kconfig complains with "select ISAPNP": WARNING: unmet direct dependencies detected for ISAPNP Depends on [n]: PNP [=y] && ISA [=n] Selected by [y]: - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y] Because it is declared as: config ISAPNP bool "ISA Plug and Play support" depends on ISA I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST, but I suspect that would touch on yet another subsystem and has the potential to point to other things that need changes, as a lot more drivers will be selected. Anyway, after a quick look at include/linux/isapnp.h, I suspect that this can work. I'll run some tests here. Thanks, Mauro
Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
On Fri, 20 Apr 2018 14:32:15 +0200, Mauro Carvalho Chehab wrote: > > All sound drivers that don't depend on PNP can be safelly > build with COMPILE_TEST, as ISA provides function stubs to > be used for such purposes. > > As a side effect, with this change, the radio-miropcm20 > can now be built outside i386 with COMPILE_TEST. > > Signed-off-by: Mauro Carvalho Chehab> --- > drivers/media/radio/Kconfig | 3 ++- > sound/isa/Kconfig | 9 + > 2 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig > index d363726e9eb1..8fa403c7149e 100644 > --- a/drivers/media/radio/Kconfig > +++ b/drivers/media/radio/Kconfig > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE > > config RADIO_MIROPCM20 > tristate "miroSOUND PCM20 radio" > - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND > + depends on ISA || COMPILE_TEST > + depends on ISA_DMA_API && VIDEO_V4L2 && SND > select SND_ISA > select SND_MIRO > ---help--- > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig > index cb54d9c0a77f..d2a6cdd0395c 100644 > --- a/sound/isa/Kconfig > +++ b/sound/isa/Kconfig > @@ -20,7 +20,8 @@ config SND_SB16_DSP > > menuconfig SND_ISA > bool "ISA sound devices" > - depends on ISA && ISA_DMA_API > + depends on ISA || COMPILE_TEST > + depends on ISA_DMA_API > default y > help > Support for sound devices connected via the ISA bus. > @@ -38,7 +39,7 @@ config SND_ADLIB > > config SND_AD1816A > tristate "Analog Devices SoundPort AD1816A" > - depends on PNP > + depends on PNP && ISA > select ISAPNP > select SND_OPL3_LIB > select SND_MPU401_UART Just from curiosity: what's the reason for this explicit CONFIG_ISA dependency? What error did you get? thanks, Takashi > @@ -66,7 +67,7 @@ config SND_AD1848 > > config SND_ALS100 > tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx" > - depends on PNP > + depends on PNP && ISA > select ISAPNP > select SND_OPL3_LIB > select SND_MPU401_UART > @@ -107,7 +108,7 @@ config SND_AZT2316 > > config SND_AZT2320 > tristate "Aztech Systems AZT2320" > - depends on PNP > + depends on PNP && ISA > select ISAPNP > select SND_OPL3_LIB > select SND_MPU401_UART > -- > 2.14.3 > >
[PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST
All sound drivers that don't depend on PNP can be safelly build with COMPILE_TEST, as ISA provides function stubs to be used for such purposes. As a side effect, with this change, the radio-miropcm20 can now be built outside i386 with COMPILE_TEST. Signed-off-by: Mauro Carvalho Chehab--- drivers/media/radio/Kconfig | 3 ++- sound/isa/Kconfig | 9 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index d363726e9eb1..8fa403c7149e 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE config RADIO_MIROPCM20 tristate "miroSOUND PCM20 radio" - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND + depends on ISA || COMPILE_TEST + depends on ISA_DMA_API && VIDEO_V4L2 && SND select SND_ISA select SND_MIRO ---help--- diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index cb54d9c0a77f..d2a6cdd0395c 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig @@ -20,7 +20,8 @@ config SND_SB16_DSP menuconfig SND_ISA bool "ISA sound devices" - depends on ISA && ISA_DMA_API + depends on ISA || COMPILE_TEST + depends on ISA_DMA_API default y help Support for sound devices connected via the ISA bus. @@ -38,7 +39,7 @@ config SND_ADLIB config SND_AD1816A tristate "Analog Devices SoundPort AD1816A" - depends on PNP + depends on PNP && ISA select ISAPNP select SND_OPL3_LIB select SND_MPU401_UART @@ -66,7 +67,7 @@ config SND_AD1848 config SND_ALS100 tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx" - depends on PNP + depends on PNP && ISA select ISAPNP select SND_OPL3_LIB select SND_MPU401_UART @@ -107,7 +108,7 @@ config SND_AZT2316 config SND_AZT2320 tristate "Aztech Systems AZT2320" - depends on PNP + depends on PNP && ISA select ISAPNP select SND_OPL3_LIB select SND_MPU401_UART -- 2.14.3